Commit Graph

2325 Commits

Author SHA1 Message Date
Karim ElDeeb
c8eddc43e0 Add support to create MSI installer for Windows build (#1400) 2018-06-02 18:32:17 +01:00
mgrojo
e50022c11e Export to CSV the currently browsed data as displayed
A new option is added to the Browse Data tab toolbar for exporting the data
of the browsed table as currently displayed (after filters, display formats
and order column) to a CSV file. This is done in coherence to the same
popup options in the SQL tab for execution results.

See issue #1402
2018-06-02 01:04:55 +02:00
Martin Kleusberg
39302f5b60 Also fix rowid column being shown when changing the sort order
Apply the same fix as in 189b750a00 for
the filters for the sort order.
2018-05-25 23:47:47 +02:00
Martin Kleusberg
3995ad2442 Add option to disable automatic type detection in CSV import
Because there are some circumstances under which the automatic type
detection can cause problems with the imported data and because it is
not accurate when the data changes a lot after the first couple of rows,
we need an option to disable it.

See issue #1382.
2018-05-25 22:11:43 +02:00
Martin Kleusberg
e851c161d6 Implement better default behaviour for CSV import
This changes the default behaviour for the CSV import to follow a set of
rules which hopefully makes most people happy.

It also add an "Advanced" section to the settings bits of the dialog to
modify this new default behaviour.

See issue #1395.
2018-05-25 21:06:16 +02:00
Martin Kleusberg
b647026051 Show warning when opening a project file with the old file format
Thanks to Iulian for idea!
2018-05-25 18:49:27 +02:00
Remi Rampin
17f1eabb65 Import CSV: Add option to insert missing values as NULL (#1349)
* Add a combo box for missing values in import ui

* Add ui pieces to .cpp file

* Insert NULL values if requested

* Allow inserting NULLs in new table also
2018-05-22 20:56:11 +02:00
Martin Kleusberg
189b750a00 Fix e6a4326e9b
Fix the fix for a Qt issue which messes up the table view when using the
filters. Without any fix, the rowid column is always shown when changing
the filters, but because the filter bar isn't regenerated the filters
are all displaced. With the first commit this is fixed, however changing
the filters always regenerated the filter bar which in turn deleted the
current filter value. With this commit this is fixed. The filters are
now working as expected.
2018-05-20 20:22:55 +02:00
Martin Kleusberg
a117c11064 Simplify qmake files 2018-05-20 15:58:24 +02:00
GortiZ
e7752d7398 KUbuntu 14.04 support restored (#1298)
* - [NEW] Add new interface and functionality to manage database file extension. (Implements feature request #659)

* - [FIX] Fixed CMake file to src.pro

* - Applied changes requested by mgrojo to uniform code with sqlitebrowser standards
- Add "history" when closing editor window, but reopen before closing preferences
- Revert some changes done by QtCreator

* Refuse from previous commit

* Additional changes requested by MKleusberg:
- [CHG] Always add "All files (*)" to filters
- [FIX] Removed unused include

* merged from master

* Merge sqlitebrowser master

* [FIX] Fixed compatibility to compile on KUbuntu 14.04 with Qt 5.2.1

* [FIX] Fix Qt version for QOpenGLWidget support on previous commit

* [CHG] Uniformed QT_VERSION_CHECK style
[CHG] Reverted macOS check on Mainwindow for OpenGL context creation
2018-05-20 15:56:01 +02:00
Karim ElDeeb
b69e7cd034 Add build version to the nightly builds (#1390)
Make the Windows nightly build versioning information meaningful. ;)
2018-05-20 13:54:24 +01:00
Martin Kleusberg
4ab2bee2ac When selecting an entire row and deleting it, remove the record
When selecting an entire row or multiple entire rows in the table view
and hitting the delete key, delete the records and not just the cell
contents.

See issue #1391.
2018-05-20 13:22:13 +02:00
Martin Kleusberg
abf70ea7bd Use nullptr instead of NULL 2018-05-16 19:20:36 +02:00
Karim ElDeeb
817de2d3f5 Update Report bug link to include the system information (#1388)
When reporting an issue from the application, via the menu 'Help | Bug report', the new link will add the label 'bug' and include the system information automatically.

See issue #1386
2018-05-16 19:01:13 +02:00
Martin Kleusberg
13d9f98aab Fix the text of the toolbar actions for deleting and modifying objects
When selecting an object other than a table the toolbar actions would
say "Modify/Delete Table" nonetheless. I don't remember it being this
way, so I suspect this was changed by updating to Qt 5. Either way, this
commit makes absolutely sure the texts are updated properly.
2018-05-16 18:39:51 +02:00
Martin Kleusberg
a5d36694db Simplify code 2018-05-16 18:26:48 +02:00
Martin Kleusberg
b6c05609dc Change order of statements in exported SQL file
When exporting a database to an SQL file we used to export it like this:
- Table 1 schema
- Table 1 data
- Table 2 schema
- Table 2 data
With this commit that is changed like this:
- Table 1 schema
- Table 2 schema
- Table 1 data
- Table 2 data

This makes the resulting SQL file more robust for import because it
avoids any foreign key errors as long as foreign keys are deferred.
2018-05-16 18:18:56 +02:00
Martin Kleusberg
b384027378 Only allow selection of tables in Export SQL dialog
Only allow the user to select which tables to export in the Export SQL
dialog instead of tables and views. The selection of views wasn't
respected anyway, so the list including views is just confusing.
2018-05-16 18:01:19 +02:00
Martin Kleusberg
28baba8ec8 Fix icons in Export SQL dialog
Fix the type icons in the Export SQL dialog which weren't show before.
2018-05-16 17:49:12 +02:00
Martin Kleusberg
431c67138b Improve error messages when importing SQL files
When executing multiple SQL statements at once, e.g. when importing an
SQL file (but not in the Execute SQL tab!), and hitting an error save
the error message before reverting the transaction. This preserves the
error message which is otherwise replaced by "not an error" because the
rollback doesn't fail.
2018-05-16 17:20:15 +02:00
Martin Kleusberg
aebfc5151e No need to commit when setting defer_foreign_keys pragma
Don't commit the current transaction when setting the defer_foreign_keys
pragma in the Execute SQL tab. Not only isn't it required by SQLite but
it's quite contrary to the point of a pragma the purpose of which is
to change the current transaction.
2018-05-16 16:18:03 +02:00
Martin Kleusberg
c25ce1399a Minor wording tweak 2018-05-16 15:32:12 +02:00
Martin Kleusberg
e6a4326e9b Fix filters
Fix a bug that causes the rowid column to be always shown when changing
the filters. I *believe* this was happening since updating to Qt 5.10.
2018-05-16 15:01:22 +02:00
Justin Clift
1865272aa8 Merge pull request #1387 from karim/master
Add VERSIONINFO for Windows executable
2018-05-12 14:09:50 +01:00
Karim ElDeeb
f79f2550fb Add VERSIONINFO for Windows executable 2018-05-12 14:06:18 +02:00
Karim ElDeeb
1e7e972f7b Merge pull request #1377 from karim/master
Cosmetic changes to issue templates
2018-05-08 03:54:05 +02:00
Karim ElDeeb
82307e0d46 Cosmetic changes to issue templates 2018-05-08 03:50:25 +02:00
Karim ElDeeb
c02cbdf28b Update issue templates to add Question template 2018-05-08 03:32:00 +02:00
Karim ElDeeb
676a457db4 Update issue templates to add Feature Request template 2018-05-08 00:13:47 +02:00
Justin Clift
26795cb909 Merge pull request #1376 from sqlitebrowser/karim-patch-1
Update issue templates
2018-05-07 22:14:09 +01:00
Karim ElDeeb
4c86acd101 Update issue templates
Upgrade our legacy issue template to the new and upgraded multiple issue template builder to be able to create multiple issue templates.
2018-05-07 22:04:24 +02:00
Justin Clift
6999a9be6c Merge pull request #1375 from karim/master
Update project links to HTTPS
2018-05-07 16:59:41 +01:00
Karim ElDeeb
86960a5952 Update project links to HTTPS 2018-05-07 17:42:29 +02:00
mgrojo
85dbe7b016 Setting for line wrap in Scintilla editors
A new setting is added to the 'SQL' tab of the Preferences dialog. It
enables the line wrapping in the editors with none/character/word/
whitespace boundaries.

See comments in issue #1173.
2018-03-28 22:26:07 +02:00
Justin Clift
a242a581c5 Merge pull request #1344 from Lin-Buo-Ren/patch-1
doc: BUILDING: Debian: Don't install the entire Git distribution just for cloning the repo
2018-03-13 10:37:54 +00:00
林博仁(Buo-Ren Lin)
30fe096b85 doc: BUILDING: Debian: Don't install the entire Git distribution just for cloning the repo
The download and disk usage difference is apparent and should be avoided when possible

```
$ apt show git-core git 2>/dev/null | grep '^Installed-Size'
Installed-Size: 8,192 B
Installed-Size: 24.1 MB
```

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2018-03-13 16:45:56 +08:00
Justin Clift
3b21f55524 Merge pull request #1342 from cknoll/cknoll-1340
Adding Debian subsection in README.md (see #1340)
2018-03-12 19:30:44 +00:00
C. Knoll
9c409c85ad Adding Debian subsection in README.md (see #1340) 2018-03-12 20:02:36 +01:00
mgrojo
2c9cf75419 Tooltip and "What's This" text for 'Execute SQL' improved. README updated.
Document the behaviour of the 'Execute SQL' button so users can discover
the feature for executing the statements in the selection.

See related issue #1336

"SQL sentences" to "SQL statements", as that is the standard term.

Add plot feature to list of features in README file and DB4S abbreviation
2018-03-09 22:16:56 +01:00
mgrojo
b51cf69cbf Avoid removing multiple line breaks inside strings for simple cases
In order to avoid removing multiple line breaks inside strings, the
replacement is only done when removeCommentsFromQuery has performed some
substitution. Otherwise the query is left as is.

This will improve the problem described in issue #1334 for simple cases.
There will be still problems when the query has comments and multiple line
breaks inside strings.
2018-03-05 21:13:08 +01:00
mgrojo
211f7341ff New XML format for browse data table settings in project files
Browse data table settings are now saved in the project files using a pure
tagged XML format. This would make easier the generation of our project
files by external tools or direct human edition of the project files.

Compatibility with the older format is preserved in the loading. Previous
software versions have been tested with the new format, and they are also
able to load the new project files ignoring these new tags.

See related issue #1306
2018-03-03 20:06:49 +01:00
mgrojo
3277174cb1 Problems with WITHOUT ROWID tables
Quoted values in DELETE FROM and UPDATE SET take into account that value
could have a single quote and they are now doubled.

Detect tables without rowid in order to make invisible the "Show rowid
column"

See issue #1332
2018-02-28 23:18:49 +01:00
mgrojo
b1ba58fcc0 'Export -> Table(s) to JSON' takes into account the column type
Use SQLite3 and Qt APIs to export the table data using appropriate JSON
data types.

See issue #1323: JSON table export converts integer and null values to
string.
2018-02-26 21:52:16 +01:00
mgrojo
379bbb81a2 Support for dark themes in default settings and restore defaults button
All the colour configurations have been reviewed under an operating-system theme
dark theme.

Some hard-coded colours in QScintilla editors and Data Browser have been
replaced by queries of the system palette or reuse of our settings.

New settings for foreground and background colours for QScintilla editors
defaulting to system colours. This is mainly needed because if the user
saves colour settings for a dark theme and then he changes the system theme
back to a light theme, then the foreground colours are preserved while the
background would fall back to the system theme leading to an incompatible
combination. This also gives more freedom to the user in defining his own
colour combinations.

Since only the default colour settings adapt to the system theme, and once
settings are saved this can no longer happen, a 'Restore Defaults' button
is added so the default adapted colour settings can be restored. This is
also useful for restoring default behaviour when wanted.

Other fixes and improvements: waiting cursor while saving; check boxes in
SQL tab for bold, italic and underline when applicable; avoid translation
of hidden colour setting names used in code.

See related issue #1324.
2018-02-25 19:13:28 +01:00
mgrojo
65c670acc0 Do not escape single cell data in clipboard copy
For single cell without-headers copy it is better to not escape the text
since there isn't any gain in trying to escape quotes, end-of-lines or
tabs. Escaping should only be done for table like data for compatibility
to spreadsheets applications.

See issue #1244.
2018-02-14 23:19:53 +01:00
mgrojo
b8e96379a7 Set disabled palette for the cell text editor when read-only
In this way the user gets a hint about the text being read-only while still
being able to select text with keyboard and mouse.

See issue #1123
2018-02-03 16:14:30 +01:00
mgrojo
52ae85dd28 Added some "What's This" information
Added some texts to the "What's This" information of some buttons or other
widgets that lacked them. This will help the user to discover the provided
features.

Specifically, help is added for the filter fields and the remote dock.
See discussions in issues #1311 and #1312.
2018-02-02 21:27:58 +01:00
Justin Clift
e43ed17162 Include the Qt XML dll in our installation package 2018-01-30 20:34:57 +00:00
mgrojo
290461778d Fix qmake compilation for XML mode PR #1275
Also, some spaces have been replaced by tabs for uniformity.

See issue #1309
2018-01-30 21:01:44 +01:00
mgrojo
5dbb7ff645 Ensure the Escape key doesn't make Plot and Remote docks go away
Override reject() as done in other dock dialogs.

Fixes #1310
2018-01-30 20:33:15 +01:00