summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/sqlitestudio/main.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:04 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:04 -0400
commita5b034d4a9c44f9bc1e83b01de82530f8fc63013 (patch)
tree7a358206c4aff9c33df1752c92eafec97cee2244 /SQLiteStudio3/sqlitestudio/main.cpp
parent306d6d3ca9c9ad774d19135681a7f9805f77035f (diff)
Imported Upstream version 3.0.4upstream/3.0.4
Diffstat (limited to 'SQLiteStudio3/sqlitestudio/main.cpp')
-rw-r--r--SQLiteStudio3/sqlitestudio/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/SQLiteStudio3/sqlitestudio/main.cpp b/SQLiteStudio3/sqlitestudio/main.cpp
index f2284a6..4ec98cc 100644
--- a/SQLiteStudio3/sqlitestudio/main.cpp
+++ b/SQLiteStudio3/sqlitestudio/main.cpp
@@ -24,6 +24,7 @@
#include "qio.h"
#include "translations.h"
#include "dialogs/languagedialog.h"
+#include "dialogs/triggerdialog.h"
#include "services/pluginmanager.h"
#include <QCommandLineParser>
#include <QCommandLineOption>
@@ -45,12 +46,14 @@ QString uiHandleCmdLineArgs()
QCommandLineOption debugOption({"d", "debug"}, QObject::tr("Enables debug messages in console (accessible with F12)."));
QCommandLineOption debugStdOutOption("debug-stdout", QObject::tr("Redirects debug messages into standard output (forces debug mode)."));
+ QCommandLineOption debugFileOption("debug-file", QObject::tr("Redirects debug messages into given file (forces debug mode)."), QObject::tr("log file"));
QCommandLineOption lemonDebugOption("debug-lemon", QObject::tr("Enables Lemon parser debug messages for SQL code assistant."));
QCommandLineOption sqlDebugOption("debug-sql", QObject::tr("Enables debugging of every single SQL query being sent to any database."));
QCommandLineOption sqlDebugDbNameOption("debug-sql-db", QObject::tr("Limits SQL query messages to only the given <database>."), QObject::tr("database"));
QCommandLineOption listPluginsOption("list-plugins", QObject::tr("Lists plugins installed in the SQLiteStudio and quits."));
parser.addOption(debugOption);
parser.addOption(debugStdOutOption);
+ parser.addOption(debugFileOption);
parser.addOption(lemonDebugOption);
parser.addOption(sqlDebugOption);
parser.addOption(sqlDebugDbNameOption);
@@ -60,7 +63,8 @@ QString uiHandleCmdLineArgs()
parser.process(qApp->arguments());
- setUiDebug(parser.isSet(debugOption) || parser.isSet(debugStdOutOption) || parser.isSet(sqlDebugOption), !parser.isSet(debugStdOutOption));
+ bool enableDebug = parser.isSet(debugOption) || parser.isSet(debugStdOutOption) || parser.isSet(sqlDebugOption) || parser.isSet(debugFileOption);
+ setUiDebug(enableDebug, !parser.isSet(debugStdOutOption), parser.value(debugFileOption));
CompletionHelper::enableLemonDebug = parser.isSet(lemonDebugOption);
setSqlLoggingEnabled(parser.isSet(sqlDebugOption));
if (parser.isSet(sqlDebugDbNameOption))
@@ -118,6 +122,7 @@ int main(int argc, char *argv[])
MultiEditorTime::staticInit();
MultiEditorDate::staticInit();
MultiEditorBool::staticInit();
+ TriggerDialog::staticInit();
MainWindow::getInstance();