]> vaikene.ee Git - evaf/blobdiff - src/main/GUI/main.cpp
Ported to Qt5
[evaf] / src / main / GUI / main.cpp
index 68062462daeb74aecfa8d5866b9eb9249133079a..313d21073e7996df216b055bbc57ea5a6072babc 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <Common/Globals>
 #include <Common/iLogger>
-#include <Common/iEnv>
 #include <Common/iApp>
 
 #include <Plugins/PluginManager>
@@ -83,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;
 
@@ -235,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;
                 }
             }
@@ -263,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"
@@ -359,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))
@@ -411,7 +409,7 @@ int main(int argc, char ** argv)
 
         // Run the application
         EVAF_INFO("Running %s", VER_MODULE_NAME_STR);
-        rval = app.exec();
+        rval = Common::iApp::instance()->exec();
 
         quit = rval != Common::iApp::RC_Restart;