When a field contains the separator character it need to be quoted as
well. On the other hand, checking for \r\n as well as \n is redundant,
so the former check can be removed.
See issue #144.
Add some basic initial support for SQLCipher. Note that this is more of
a POC than a final implementation.
This commit adds an option called 'sqlcipher' to the cmake and qmake
projects which - when enabled - replaces the default SQLite3 include and
library files by their SQLCipher counter-parts. Especially on MacOS X
there might be some more work required in finding the correct include
paths. The SQLCipher library supports unencrypted databases, too, so
even if the option is enabled the program behaves like before. You can
see the difference, though, in the About Dialog where the SQLite version
string will say 'SQLCipher version xy'.
When the sqlcipher option is enabled and you try to open a file which is
neither a project file nor a normal SQLite3 database it is assumed now
that the file is an encypted database. There is no way to tell between
an invalid file and an encypted file, so in both cases a password dialog
pops up. When the correct password and page size are entered the file is
opened and can be edited like any other database before.
Creating encrypted databases isn't supported yet. So for testing you
need to fall back to the sqlcipher command line tool.
See issue #12.
Make it possible to use other quote and separator characters than those
predefined in the respective combo boxes when exporting a CSV file.
See issue #23.
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.
Read and write the settings only from the preferences dialog.
Remove all the copies of some settings which were stored in nearly every
dialog class individually.
Simplify the settings dialog code by removing all those not really
needed slots.
Store the data of a DB cell in a QByteArray, i.e. a binary data type,
instead of putting it in a QString, thus converting it to a UTF8 string.
Rewrite the reading and writing of DB cells to correctly handle binary
data containing 0x00 bytes.
Change the edit dialog to actually do all the data checks etc. on a
currently invisible QHexEdit widget instead of a QTextEdit.
All these changes combined make it possible to actually store binary
data without it being corrupted. You can for example import pictures
now, export them and actually open the exported file. So this is an
improvement.
Rewrite the dialog to export tables as CSV file using Qt Designer.
Move the entire export functionality to this dialog instead of
generating the file in the main window.
Add some options for the user to change the layout of the CSV file.