Commit Graph

31 Commits

Author SHA1 Message Date
Martin Kleusberg
b803e3c49f Use more STL containers instead of Qt containers 2019-05-02 17:02:59 +02:00
mgrojo
3e92ec2b3b New argument for saving settings
Added new argument to command line for saving a value for a setting and
not only running it temporarily: -O/--save-option

Fix string lists settings so they are saved as an actual QStringList and
not a string. This assumes these settings are always named "*list".
Currently they, and only they, are.

Together with --quit, this argument allows saving the extensions/list and
other settings after an installation depending on options selected by user
in the installer. For example, running (Linux syntax):

./sqlitebrowser --save-option extensions/list=/path/to/libsqlitefunctions.so,/path/to/libsqlite-formats.so --quit

will save the two extensions to the preferences and they will be
automatically loaded every time DB4S is loaded.

See issue #1224 and PR #1716.
2019-03-10 13:42:41 +01:00
Martin Kleusberg
aaa88367ba Fix build 2018-10-22 23:03:19 +02:00
mgrojo
8c5ba61b45 Command line option for running with some setting set to a given value
There are cases where the default configuration makes impossible to
use the application, due to some misbehaviour, like in issue #1560. This
new command line option allows users to set any setting to any value.
The setting is not saved unless user enters Preferences and saves the
current values. This allows overriding the preferences for the session
duration from the command line and also overriding the defaults for the
first session to work around problems with those defaults.

See issue #1588
2018-10-22 21:23:09 +02:00
Martin Kleusberg
7d2931baa2 Add a --read-only command line option
Add a new command line option -R / --read-only for opening a database in
read-only mode.

See issue #1265.
2018-01-05 16:27:23 +01:00
Martin Kleusberg
73946400c3 Work around a bug in Qt which causes high pings for Wifi connections
See issue #1209.
2017-11-18 11:47:56 +01:00
Martin Kleusberg
0bc430bfad Show the build date of the nightlies in the About dialog 2017-10-31 18:21:58 +01:00
Martin Kleusberg
3fe181bba7 Explicitly specify the plugins directory on Windows systems
Not sure if this is necessary because the documentation says that it is
automatically added but it's worth a try.

See issue #1188.
2017-10-31 17:58:25 +01:00
Martin Kleusberg
3bd2dc3bc1 Replace 'foreach' by range-based for loop from C++11 2017-10-30 13:10:08 +01:00
Martin Kleusberg
f20f996767 Fix uninitialised member problems (Coverity)
None of them seem to be critical though.
2017-09-15 10:39:38 +02:00
Martin Kleusberg
441a08a44d Add build date to --version command line output
See #1065.
2017-07-28 11:21:27 +02:00
FriedrichFroebel
912ae91161 Add commandline argument for version output (#1065) 2017-07-27 14:16:19 +01:00
Martin Kleusberg
f1194d845e Rename all the settings accessor functions
Rename the settings accessor functions from Settings::getSettingsValue()
(and similar) to Settings::getValue() (and similar). The 'Settings' bit
seems a bit redundant and costs a lot of screen space.
2017-03-20 23:16:52 +01:00
Martin Kleusberg
b9e4433318 Drop Qt4 support
This commit removes all code and configuration that was required for
building with Qt4. Hopefully noone really needs it anymore.

See issue #603.
2016-10-18 18:07:38 +02:00
Martin Kleusberg
da7f472864 Make shortcut for 'reload' dependent on currently active tab
Make the reload shortcut (at the moment F5 and Ctrl+R) dependent on the
currently active tab. This way it always performs some meaningful task,
depending on the current context.

See issue #759.
2016-10-13 12:22:54 +02:00
Vladislav Tronko
3a06395f88 Divide PreferencesDialog in two classes
This forces PreferencesDialog to serve only for UI needs.
Plus, this opens the door for adding another class for shortcut
management without pain.
2016-09-03 22:30:55 +03:00
Vlad
3ef9491d64 Use references for safety (#747) 2016-08-25 23:02:40 +02:00
Justin Clift
fbfde6e5bc Formatting tweak to assist code clarity 2016-05-17 20:35:46 +01:00
Martin Kleusberg
272671d7f0 Add command line option for setting table to browse after opening
Add a new command line option -t/--table for directly jumping to a table
after opening the database.

See issue #509.
2016-02-04 19:37:17 +01:00
schdub
f251d11ccb fix: translations are not being installed via make install 2015-05-12 22:15:10 +03:00
Samir Aguiar
ce8f49d530 localization: Use path relative to the application executable
This allows the languages to be loaded when the user is
running the app from another directory (e.g. when the app
is run from an exported path).
2015-01-21 23:06:03 +01:00
Samir Aguiar
6d6544043d preferencesdialog: New combobox to change application language
The behavior remains basically as before: when first launched
the application will try to load a translation for the user's
locale, and if one cannot be found it defaults to English.
The difference is that now this is remembered so that upon
further launches the program will go straight to the matching
locale.

See issue #182.
2015-01-21 23:06:02 +01:00
Peinthor Rene
31915c4061 compat: change to compile under qt4.7 2014-11-28 19:49:15 +01:00
Justin Clift
05207b0b9f Renamed project to "DB Browser for SQLite" 2014-09-21 11:14:39 +01:00
Justin Clift
d39ba2947b Renamed application to Database Browser for SQLite
Hopefully this will reduce the misdirected support calls to Hwaci :)
2014-08-27 23:14:16 +01:00
Sergey Muratov
87bda982c1 I18N was improved. Translation GUI to Russian was made. 2014-07-15 22:33:17 +04:00
Peinthor Rene
040be65489 fix memory leak 2014-05-30 18:59:59 +02:00
Martin Kleusberg
dac1ed1fdb Fix last commit.
Still had some debug code in there. Sorry!!
2014-05-24 20:03:13 +02:00
Martin Kleusberg
51be349c74 Fix loading of translation files
The QTranslator objects need to be stored as class attributes as
otherwise they are destroyed after the Application constructor is done
and translations won't work.
2014-05-24 20:01:22 +02:00
Martin Kleusberg
dc54c548b7 Implement file associations on MacOS by reacting on QFileOpenEvent
Remove the deactivated MacOS dependent code for reacting on Cocoa events
for file associations from main.cpp

Try to implement the same functionality by reacting on QFileOpenEvent in
the Application class.
2014-05-15 17:52:00 +02:00
Martin Kleusberg
08e8597ec8 Subclass QApplication and move most code from main() there
Create a new subclass of the QApplication class and move most of the
code in the main function to the constructor of the new class. This
makes the code a bit more consistent in terms of object orientedness,
makes it a little simpler and allows extending the new Application class
in the future.
2014-05-15 17:52:00 +02:00