it wasn't possible to add new tab pages from the qt designer
added a QWidget container with a vertical layout as this is
done also if you create a new empty mainwindow
Add an entry for the CSV export to the context menu of the Database
Structure tab of the main windows as well which preselects the currently
selected table.
When opening the CSV export dialog via the standard menu also preselect
the currently selected table when the Database Structure tab is active.
When called while the Browse Data tab of the main window is selected
also select the current table or view in the ExportCsvDialog.
Sort the table names in the combobox of the ExportCsvDialog.
When the user selects multiple lines of SQL code and hits F5 to execute
them the execution stops after the first line because we use the
selectedText() method of the QTextCursor class to get the selected text
and this method returns Unicode U+2029 paragraph separator characters
instead of newline \n characters.
(see http://qt-project.org/doc/qt-4.8/qtextcursor.html#selectedText)
Fix this by replacing these by regular newline characters to.
Also update the table view widget and the status message in the Execute
Query tab of the main window when the query was valid but returned no
results.
Fixes#38.
Spaces in table, index and field names are actually allowed by SQLite,
so no need to check for them.
However, "`" characters cause problems when appearing in SQL statements
so disallow them instead.
Allow building the project using qmake as discussed on commit
88f66be89e. This lacks the support for generating a dynamic version
number from the Git log though and obviously most of the nice features
of CMake.
Issue #31 was about some problems in the SqliteTableModel which caused
an endless loop in the Execute SQL tab when executing statements with a
LIMIT part that didn't end with a semicolon. This was fixed in 0362d615fd
but the regular expression in this commit only worked for statements
like 'SELECT * FROM t LIMIT 0,10' and didn't detect a statement like
'SELECT * FROM t LIMIT 10' where there is only one number after 'limit',
so the bug still ocurred for those commands. This is fixed by this
commit.
Most non-bash(like) shells don't support command line arguments for the
echo command and print them like regular text. On these systems an
invalid gen_version.h file is generated. This can be fixed by using
printf instead of echo which works the same on all Unix systems.
Also fix the detection whether the gen_version.h file changed before
rewriting it. This prevents creating a file with exactly the same content
but a newer timestamp and therefore make deciding to recompile all files
including it.
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.