The code for copying the selected cells to the clipboard doesn't work
when there is just one cell selected. Fix the code by including a
special handling for this case which returns the content of the single
selected cell without any quotes or the like.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.