Commit Graph

17 Commits

Author SHA1 Message Date
Martin Kleusberg
6e38cbcb1d exportcsv: Remember export settings
Save the settings made in the Export CSV Dialog in the application's
config file.

See issue #149.
2014-11-08 12:30:56 +01:00
Martin Kleusberg
e4af3b0939 csv: Quote fields during CSV export when they contain the separator char
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.
2014-11-07 21:05:01 +01:00
Martin Kleusberg
9ba36d02b2 Add initial SQLCipher support
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.
2014-11-01 12:56:53 +01:00
Peinthor Rene
f38c3f13ca csvexport: produce more rfc4180 complaint csv files 2014-10-06 20:59:09 +02:00
Peinthor Rene
62d72e6a9e csvexport: use CRLF as specified in RFC4180 2014-10-06 20:40:26 +02:00
Peinthor Rene
50731cd730 csvexport: streaming export to csv 2014-10-03 22:15:20 +02:00
Martin Kleusberg
f8b2dd0ee3 ExportCsvDialog: Add option to define custom quote/separator chars
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.
2014-05-30 18:11:49 +02:00
Martin Kleusberg
4cd5131d1a ExportCsvDialog: Set table selection to current table in Browse Data tab
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.
2014-02-14 16:22:51 +01:00
Peinthor Rene
94819f22e2 for loop pre-increment optimization's and a slight syntax style change 2013-09-20 14:49:07 +02:00
Peinthor Rene
1bac11348f include cleanup 2013-09-19 22:55:35 +02:00
Martin Kleusberg
9536e7a095 SqlExecutionArea: Support exporting result to CSV file
Add a button which allows the user to save the query results to a CSV
file.

Add some basic preparations for saving the result as a view.
2013-05-06 18:44:58 +02:00
Martin Kleusberg
1ba3169428 Fix CSV export to work with SqliteTableModel 2013-04-10 18:59:37 +02:00
Martin Kleusberg
2165e544a2 Move all settings logic to the preferences dialog
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.
2013-03-17 16:09:28 +01:00
Martin Kleusberg
6c8712d804 Change the internal data type for cell contents to a binary type
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.
2013-03-17 01:38:48 +01:00
Peinthor Rene
c5dafe9617 avoid useless string copies and fix a bug with logSQL because of that 2013-01-26 10:23:04 +01:00
Martin Kleusberg
d05e90e495 Improve translatability of the application
Head towards a translatable application by loading translation files for
the current locale and using tr() where ever it's needed.
2013-01-18 18:11:07 +01:00
Martin Kleusberg
dff9221963 Rewrite export to CSV dialog
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.
2013-01-09 20:03:48 +01:00