From a5b034d4a9c44f9bc1e83b01de82530f8fc63013 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 4 Apr 2015 14:41:04 -0400 Subject: Imported Upstream version 3.0.4 --- SQLiteStudio3/sqlitestudio/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'SQLiteStudio3/sqlitestudio/main.cpp') 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 #include @@ -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 ."), 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(); -- cgit v1.2.3