X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2FGUI%2Fmain.cpp;h=313d21073e7996df216b055bbc57ea5a6072babc;hb=0c61450fcffcb36a6e23ca5b083c26543d956084;hp=45c5043f87e7a53aa3aa802fe9a7c1ad24dbd05c;hpb=4d81227da330c21c7aa0badc88bd5ad4467067fb;p=evaf
diff --git a/src/main/GUI/main.cpp b/src/main/GUI/main.cpp
index 45c5043..313d210 100644
--- a/src/main/GUI/main.cpp
+++ b/src/main/GUI/main.cpp
@@ -29,9 +29,10 @@
#include
#include
-#include
#include
+#include
+
#include
#ifdef Q_OS_LINUX
@@ -81,7 +82,7 @@ static eVaf::Common::iLogger::Severity ConsoleSeverityLevel = eVaf::Common::iLog
*
* This function outputs messages to the console and to the log file.
*/
-static void messageOutput(QtMsgType type, char const * const msg)
+static void messageOutput(QtMsgType type, QMessageLogContext const &, QString const & msg)
{
static bool inHandler = false;
@@ -233,7 +234,7 @@ bool Application::processCommandLine(int argc, char ** argv)
case Common::iLogger::Info:
Internal::ConsoleSeverityLevel = Common::iLogger::Debug;
break;
- case Common::iLogger::Debug:
+ default:
break;
}
}
@@ -261,7 +262,6 @@ void Application::printHelp()
" -lang[uage]=xx[_CC] Specifies the language, where xx is the ISO 639\n"
" language code followed by an optional ISO 3166 country\n"
" code.\n"
- // Handled by the iEnv interface implementation
" -root[dir]=DIR Specifies the application's root directory.\n"
" -dataroot[dir]=DIR Specifies the data root directory.\n"
" -etc[dir]=DIR Specifies the configuration files directory.\n"
@@ -357,7 +357,7 @@ int main(int argc, char ** argv)
// Install our own message handlers
Common::iLogger::instance()->installFatalMsgHandler(Internal::fatalMsgHandler);
- qInstallMsgHandler(Internal::messageOutput);
+ qInstallMessageHandler(Internal::messageOutput);
// Process command-line arguments
if (!Application::processCommandLine(argc, argv))
@@ -390,7 +390,7 @@ int main(int argc, char ** argv)
return 1;
// Plugin manager
- // Plugins::PluginManager pluginManager;
+ Plugins::PluginManager pluginManager;
// The main run loop
bool quit = false;
@@ -404,18 +404,19 @@ int main(int argc, char ** argv)
return 1;
// Initialize the plugin manager and load plugins
- //if (!pluginManager.init())
- // return 1;
+ if (!pluginManager.init())
+ return 1;
// Run the application
- rval = app.exec();
+ EVAF_INFO("Running %s", VER_MODULE_NAME_STR);
+ rval = Common::iApp::instance()->exec();
quit = rval != Common::iApp::RC_Restart;
EVAF_INFO("%s is %s", VER_MODULE_NAME_STR, quit ? "exiting" : "restarting");
// Unload plugins and finalize the plugin manager
- // pluginManager.done();
+ pluginManager.done();
}
EVAF_INFO("%s exit with code %d", VER_MODULE_NAME_STR, rval);