Commit Graph

1034 Commits

Author SHA1 Message Date
Samir Aguiar
c8ea53bf4f qhexedit: Fix initialization order in QHexEditPrivate
This prevents use of uninitialized values in conditional jumps
as reported by Valgrind. It's already fixed in QHexEdit repository.
2015-03-20 23:31:45 +01:00
Samir Aguiar
d959080f33 unittests: Adding qtestlib to CONFIG is deprecated in Qt5+ 2015-03-20 23:27:22 +01:00
Samir Aguiar
c3c8f8ce56 sqlitetablemodel: Don't apply NULL fields colours to BLOB fields 2015-03-14 22:32:56 +01:00
Martin Kleusberg
7a6410c04f When searching for a column by name make the search case insensitive
See issue #228.
2015-03-14 01:39:53 +01:00
Martin Kleusberg
b266f6f547 grammar: Also parse foreign key clauses inside column definitions
Also parse foreign key clauses used inside column definitions as opposed
to just parsing those in the table constraints.

See issue #227.
2015-03-14 00:56:08 +01:00
Samir Aguiar
50c034012f editdialog: Set focus to text edit after clearing 2015-03-13 01:28:14 +01:00
Samir Aguiar
abc3ae11b3 preferencesdialog: Correctly send events on the frames to the parent 2015-03-13 01:09:29 +01:00
Samir Aguiar
332ed3faab editdialog: Show type as "Null" for null fields
See issue #220.
2015-03-13 01:04:46 +01:00
Samir Aguiar
9038968c88 editdialog: Differentiate NULL values from empty ones
In the edit dialog the clear button sets the data to
NULL, but because we check if the data has changed
before updating, we need to also check the NULL flag,
otherwise we can't tell NULL values from empty values.

See issue #220.
2015-03-13 00:22:06 +01:00
Samir Aguiar
56bb728c4c sqlitedb: Accept NULL values when updating through Edit Dialog
See issue #220.
2015-03-13 00:22:06 +01:00
Samir Aguiar
0dfae63cee sqlitetablemodel: Only return NULL text for display role and NULL fields 2015-03-13 00:22:06 +01:00
Samir Aguiar
c15235f15e preferencesdialog: Center text in line edit 2015-03-11 22:43:31 +01:00
Samir Aguiar
6473ea6aa0 preferencesdialog: Move regex checkbox before tabWidget in tabstop list 2015-03-11 20:54:05 +01:00
Samir Aguiar
994d37f99d preferencesdialog: Add NULL fields style options to Data Browser tab
This adds the ability to customize the text, font colour
and background colour of NULL fields.
2015-03-11 20:19:45 +01:00
Samir Aguiar
ede523269a preferencesdialog: Remove color for NULL fields 2015-03-11 20:19:45 +01:00
Samir Aguiar
0a23dfe1a2 preferencesdialog: Add new "Data Browser" tab 2015-03-11 20:19:45 +01:00
Martin Kleusberg
fa1acf0a4b Make version numbers in About Dialog selectable
See issue #222.
2015-03-11 18:30:29 +01:00
Samir Aguiar
d4215052dd unittests: Pass a safely modifiable arg to QCoreApplication
This also silents C++11 warning about deprecated conversion.
2015-03-10 10:18:56 +01:00
Samir Aguiar
9fa8e24bfd exportcsvdialog: Use QString::toLatin1() to preserve Qt5 compatibility 2015-03-09 22:46:03 +01:00
Samir Aguiar
80edba2cae exportcsvdialog: Escape especial characters in headers and values
When exporting to CSV, escape the chosen separator, the quote
character and the accepted line endings (CR, LF and CRLF).

See issue #219.
2015-03-09 21:28:57 +01:00
Martin Kleusberg
6d1a874f80 Add implementation of the REGEXP operator
When not configured otherwise in the Preferences Dialog register a
SQLite function for performing the regular expression matching which
SQLite doesn't implement. This adds support for the REGEXP operator even
when no extension which implements this is loaded.

See issue #215.
2015-03-06 12:52:47 +01:00
Samir Aguiar
befb60376c dbbrowserdb: Correctly identify NULL values when returning row
Commit 9e4a6df changed the way fetchData() handles NULL values
so they could be seen by the user. However, the same change wasn't
added to DBBrowserDB::getRow().

Because both are called by the table model and we now add colors
to NULL fields, this caused a visible bug when adding a row with
not null column constraints.

See issue #214.
2015-03-05 22:45:50 +01:00
Samir Aguiar
f1ac26e216 csvparser: Unit tests for old Mac line endings and empty strings 2015-03-04 21:29:03 +01:00
Samir Aguiar
ca38995013 csvparser: Add support for old Mac OS line endings
In order to detect the CR characters, the file
must be opened in binary mode, otherwise QFile just
removes them all.

See issue #212.
2015-03-04 21:28:38 +01:00
Martin Kleusberg
808c771d4e Minor improvement for error messages in DBBrowserDB 2015-03-03 14:49:28 +01:00
Martin Kleusberg
9dd5f99ef6 Remove redundant checks in DBBrowserDB
Remove several redundant checks for testing whether a database file is
opened.
2015-03-03 14:46:00 +01:00
Martin Kleusberg
b2b068f33c Simplify code and improve error messages in DBBrowserDB
Make sure to include the problematic SQL statement in the error message
when an error occurs in DBBrowserDB::executeSQL().

Execute SQL statements via executeSQL() wherever possible instead of
manually invoking sqlite3_exec(). This simplifies the code a bit and
makes sure the improved error messages are used.
2015-03-03 14:41:39 +01:00
Martin Kleusberg
3c243978e7 importcsv: Improve error messages a bit
Slightly improve the error messages shown when there is a problem during
the CSV import.

See issue #213.
2015-03-03 14:23:34 +01:00
Martin Kleusberg
6b2381015c Add keyboard shortcut for language combobox in settings dialog 2015-03-03 00:57:47 +01:00
Martin Kleusberg
da6d8ba385 update: Add option to settings dialog to fully disable update checks
Add a new checkbox to the Preferences Dialog which allows the user to
fully disable automatic check for new versions instead of just ignoring
the last shown update message. This also prevents DB4S from performing
any HTTP requests.

See issues #173 and #208.
2015-03-03 00:54:21 +01:00
Martin Kleusberg
2f46dbf117 update: Avoid unnecessary redirect and thus an extra HTTP request 2015-03-03 00:41:16 +01:00
Martin Kleusberg
0bcdb97572 Insert new row when pressing tab on the last cell in Browse Data tab
When browsing a table in the Browse Data tab of the main window you can
move the focus to the next cell by pressing the tab key. This commit
improves this behaviour by checking if the tab key has been while the
last cell of the last row is focused. If this is the case a new, empty row
is inserted automatically into the table.

See issue #209.
2015-03-03 00:33:11 +01:00
Martin Kleusberg
2c25b7ecb5 update: Fix wrong variable usage in version check code 2015-03-03 00:32:40 +01:00
Chuong Vu
c129f1581e Remove checkboxes for NULL
Checkboxes(bold, italic, underline) are not needed for NULL

See issue #163
2015-02-15 01:16:59 +01:00
Chuong Vu
74fd0793e3 Remove default NULL text for NULL value fields
See issue #163
2015-02-15 01:16:59 +01:00
Chuong Vu
eda00dcd81 Add setting to allow user to change the background color of NULL value fields
See issue #163
2015-02-15 01:16:59 +01:00
Samir Aguiar
9fa174f8f9 unittests: Add PreferencesDialog files
The sqlitetablemodel will need to access the color
setting for null fields. This breaks the tests if
the PreferencesDialog files are not linked to the
test executable.
2015-02-15 01:14:35 +01:00
Chuong Vu
f3cc98317a Add NULL to the SQL Preferences tab 2015-02-15 01:13:36 +01:00
Samir Aguiar
4fee089d4d Fix QStrings that had placeholders for queries
When replacing placeholders, QString::arg() looks for
the sequence %n (where n is a number between 1 and 99).
As it turns out this sequence can also appear in SQL
queries and so they were being mistakenly replaced.

See issue #203.
2015-02-14 19:28:47 +01:00
Samir Aguiar
a5d6e6df7a preferencesdialog: Add country flag to language combo box
See issue #182.
2015-02-13 23:49:33 +01:00
Samir Aguiar
774e428b30 preferencesdialog: Suffix to identify system and default languages
Also, move the selected language to the top of the language
combo box.
2015-02-13 23:44:55 +01:00
Samir Aguiar
8a4838057d preferencesdialog: Remove unnecessary sort model
Turns out that the use of a QSortFilterProxyModel wasn't
necessary, as it's possible to sort the QCombobox using
its model directly.
2015-02-13 23:44:55 +01:00
Justin Clift
9764e81441 Updated currentrelease to 3.5.1
Oops, should have done this already. ;)
2015-02-13 19:37:49 +00:00
Martin Kleusberg
848b16f03e Set menu roles manually where possible
Qt tries to determine the role of a menu item based on its text. If the
text is "Preferences" it guesses that that menu item opens the
preferences dialog. On MacOS X this means the menu item is moved from
the View menu to the application menu. However, for translations this
doesn't seem to work, so this commit sets the menu roles manually. At
least that's the idea - no idea if it works.

See issue #200.
2015-02-11 18:53:21 +01:00
Justin Clift
027ba81d99 Added release date line for 3.5.1 2015-02-08 15:20:39 +00:00
Peinthor Rene
3b992e7337 executesql: use a different open sql file icon
The current one always looks to me as if the button is disabled.
2015-02-08 11:12:24 +01:00
Justin Clift
140c8d9805 Merge pull request #189 from samir-aguiar/master
qmake: Copy generated translations files into app bundle
2015-02-06 21:04:56 +00:00
Justin Clift
103a9a27c9 Merge pull request #198 from samir-aguiar/ui-fix
preferencesdialog: Restore ability to change default location
2015-02-06 20:34:31 +00:00
Samir Aguiar
0b6f0f45e0 preferencesdialog: Restore ability to change default location
Commit ae03113 broke the UI: the signal triggered when pressing
the button to change the default location and the tab order
had been lost.

See issue #197.
2015-02-06 19:56:16 +01:00
Martin Kleusberg
03b4ef9d1f Further improve 408fbcf8b4 2015-02-06 14:36:53 +01:00