Commit Graph

770 Commits

Author SHA1 Message Date
Peinthor Rene e198a47ae3 building: missed path export 2013-09-15 10:11:29 +02:00
Peinthor Rene 0f55a8db1c Add a description how to cross compile windows binaries
cleanup the BUILDING file
2013-09-15 10:04:08 +02:00
Peinthor Rene d33525bd76 support cross compiling with mxe and cmake 2013-09-15 10:04:08 +02:00
Peinthor Rene 4a231c5dfe increase size of AboutDialog so all the text fits 2013-09-10 17:05:57 +02:00
Martin Kleusberg 97f1d165aa Update license information
Remove reference to public domain license from readme file.

Delete the old licensing file while keeping a reference to the author of
the icons we use.

Delete the Qt license file as we're not shipping any Qt code at all.
2013-09-10 11:01:53 +02:00
Martin Kleusberg 785a9be751 AboutDialog: Change license information
Also change the licensing information in the about dialog from public
domain to GPL3.
2013-09-09 21:39:26 +02:00
Peinthor Rene 323ef332f6 cmake/nsis: add settings to generate a nsis installer through cmake/cpack 2013-09-09 18:54:19 +02:00
Peinthor Rene c77c2528a1 add GPLv3 license file
yes sqlitebrowser3 will be licensed with GPLv3
2013-09-09 16:32:49 +02:00
Peinthor Rene 33b19895d6 fix windows antlr runtime build 2013-09-08 09:45:05 +02:00
Peinthor Rene a1db2c9a21 Merge pull request #33 from justinclift/add_screenshot
Add screenshot
2013-09-08 00:07:31 -07:00
Justin Clift 593ef686e2 Add screenshot 2013-09-08 00:21:45 +01:00
Martin Kleusberg 8475d4a5a4 Merge branch 'master' of github.com:rp-/sqlitebrowser 2013-09-07 12:18:10 +02:00
Martin Kleusberg c01a890992 MainWindow: Support deleting multiple rows at once
When multiple rows are selected in the Browse Data tab of the main
window and the delete record button is clicked delete all selected rows
and not just one of them.
2013-09-07 12:15:56 +02:00
Peinthor Rene 77618114b7 update download location 2013-09-06 14:48:19 +02:00
Peinthor Rene c881149c67 add missing DbStructuremodel to cmake 2013-09-06 14:45:04 +02:00
Martin Kleusberg bc2511434e SqliteTableModel: Fix bug in last commit to support multiline strings
Fix a bug in the last commit to correctly remove comments on multi-line
queries.
2013-09-06 14:30:50 +02:00
Martin Kleusberg 169eccbebb SqliteTableModel: Remove comments from SQL queries
Remove any single line comments from the SQL queries to fix all those
problems ocurring when a query ending with such a comment is inserted
into the COUNT query.

Executing the query
SELECT * FROM table -- comment
would otherwise lead to this one being executed as well
SELECT COUNT(*) FROM (SELECT * FROM table -- comment);
This is obviously invalid SQL and therefore returns no data, sometimes
even crashing the application, even though the original statement by the
user is perfectly fine.

The code used in this commit is a bit of a workaround and should be
replaced as soon as there is a more complete SQL parser supporting SQL
comments in our grammar tools.

Closes #31.
2013-09-06 14:08:33 +02:00
Martin Kleusberg a98c96e314 SqliteTableModel: Fix invalid SQL syntax if there's already a LIMIT
Fix the syntax of the SQL string generated by fetchData() if there is
already a LIMIT statement at the end of the query. In this case don't
add an additional one. This fixes half of issue #31.
2013-09-06 12:22:25 +02:00
Peinthor Rene 36b9c25cf8 Merge pull request #32 from justinclift/master
Updates and typo fixes
2013-09-05 23:26:43 -07:00
Justin Clift 6a15658b06 Updates and typo fixes 2013-09-05 23:21:55 +01:00
Martin Kleusberg 26d5645671 SqliteTableModel: Don't add LIMIT to query if it is a PRAGMA or EXPLAIN
Don't add a "LIMIT x,y" at the end of the query in fetchData() when it
is a PRAGMA or EXPLAIN statement. This way correct SQL code is produced
and it also fixes an endless loop when the statement didn't end in a
semicolon.
2013-07-19 22:36:28 +02:00
Martin Kleusberg 427581f51d MainWindow: Don't cancel after one INSERT or the like in SQL tab
When executing multiple INSERT/UPDATE/... statements don't cancel after
the first one. Also don't try to load them into the SqliteTableModel
class - it won't work and just generates a warning.
2013-07-19 22:13:08 +02:00
Martin Kleusberg 16b5be4a8b DbStructureModel: Also send table data when dragging one
When using drag & drop on a table also send the entire content of that
table.
2013-07-19 22:06:34 +02:00
Martin Kleusberg 6e0c68a1a0 DbStructureModel: Allow dropping of database objects
Make it possible to drop database objects (i.e. SQL code) on the tree
view in the Database Structure tab. This is far from being perfect as of
now but enables you to drag and drop entire objects between databases.
2013-07-19 21:47:19 +02:00
Martin Kleusberg 0e880cc4e6 DbStructureModel: Enable dragging of DB objects
Allow dragging (as in Drag & Drop) of database objects like tables and
views into other applications by sending the SQL code used to create
them.
2013-07-19 20:55:48 +02:00
Martin Kleusberg 64a938716f Add custom model for tree view in Database Structure tab
Use a custom model for the tree view in the "Database Structure" tab in
the main window, i.e. change from a QTreeWidget to a QTreeView and do
all the item management stuff manually. This might add some code and
complexity but also offers some more flexibility for us.
2013-07-19 20:36:48 +02:00
Peinthor Rene afc53f72c6 grammar: support string identifiers 2013-07-19 14:09:10 +02:00
Martin Kleusberg b924859392 Tests: Add test for ed04128a74
Add a test for table and column names in single quotes for which support
was added in ed04128a74.
2013-07-18 20:45:27 +02:00
Peinthor Rene e80f445c53 grammar: fix ambiguous string literal lexer part 2013-07-18 15:44:39 +02:00
Peinthor Rene 1bef2501c0 tests: make this statement work in sqlite3 2013-07-18 15:42:33 +02:00
Peinthor Rene 5c1347bb92 cmake: add git revision updating for gen_version.h 2013-07-12 22:38:54 +02:00
Peinthor Rene 11c4cf423a cmake: fix a few warnings and add an option to build unittests 2013-07-11 16:15:51 +02:00
Peinthor Rene 26bb0e1adf split unittest class into header and cpp file 2013-07-11 16:12:45 +02:00
Peinthor Rene 7c411904b9 cmake: initial version of cmake build system files 2013-07-09 23:36:43 +02:00
Martin Kleusberg 2fceab31b7 MainWindow: Reduce minimum width of some spacers
Reduce the minimum width of two horizontal spacers, the one next to the
table drop down box and the one in the SQL log dock. This way the combo
boxes can take up a bit more space when the window is not that big.
2013-07-01 19:13:32 +02:00
Martin Kleusberg ed04128a74 Grammar: Support table names in single quotes
Don't fail when parsing a CREATE statement like this:
CREATE TABLE 'test' (id INT);
2013-06-23 22:16:13 +02:00
Martin Kleusberg a6c30fea0a Don't call populateTable() twice on startup when it's not needed
We need to call MainWindow::populateTable() when an SQL script was
executed during startup to make sure the latest data is shown. There is
however no need to do so when no SQL script was specified.
2013-06-18 20:46:50 +02:00
Martin Kleusberg b4ce93c6e2 MainWindow: Don't show error message when cancelling extenstion loading
Don't show a file-not-found message box when cancelling the open file
dialog to select a SQLite extension.
2013-06-17 21:43:50 +02:00
Martin Kleusberg 7167129464 EditTableDialog: Add buttons to move a field up and down
Add two buttons to move the currently selected field up or down to allow
changing the field order of a table.

Extend the DBBrowserDB::renameColumn() method to support changing the
position of a field.
2013-06-13 20:37:19 +02:00
Martin Kleusberg bd169e034f DBBrowserDB: Remove getTableSQL() function
Delete the getTableSQL() method in DBBrowserDB. Because we reload and
store the SQL statements for tables after every change to the DB layout
we can just use these strings instead of having an extra function doing
an extra DB query. This simplifies the code a bit and also reduces the
number of SQL statements executed by the application.
2013-06-13 18:11:18 +02:00
Peinthor Rene 7bf3b87411 Fix incorrect single line comment syntax
Did never check if this syntax was correct,
now it should be fine see:
http://www.sqlite.org/lang_comment.html
2013-06-13 06:52:46 +02:00
Martin Kleusberg 1287a2cf6f MainWindow: Further simplification
Looking at this now this can be simplified even further.
2013-06-12 20:22:07 +02:00
Martin Kleusberg 8947579590 MainWindow: Remove unneeded code in fileExit()
There is no need to check for changes when exiting and showing a message
box in the main window as exactly the same code is also run in
DBBrowserDB.
2013-06-12 20:18:51 +02:00
Martin Kleusberg 66e41a1846 CreateIndexDialog: Minor code simplification 2013-06-12 20:12:39 +02:00
Martin Kleusberg b16c26f022 Readme: Fix headline size 2013-06-12 20:03:51 +02:00
MKleusberg 4589dda134 Merge pull request #29 from justinclift/typo_fix
MainWindow: Typo fix in help tooltip
2013-06-08 15:45:27 -07:00
MKleusberg 3b0efd8769 Merge pull request #28 from justinclift/we_don_need_no_steeeenkin_embedded_tabz
Converted another embedded tab to space.
2013-06-08 15:44:19 -07:00
Justin Clift da3e356bd8 Typo fix in help tooltip 2013-06-08 20:11:38 +01:00
Justin Clift af4dcbfa07 Converted another embedded tab to space.
Missed this one. :(
2013-06-08 20:01:59 +01:00
Peinthor Rene 0f37137a0a Merge pull request #27 from justinclift/we_don_need_no_steeeenkin_embedded_tabz
Convert the embedded tabs to spaces
2013-06-08 11:58:26 -07:00