Browse Source

COMP: Fix enumeration value not handled warning

Fix the following warning:

    CTK/Libs/Core/ctkAbstractFactory.tpp:299:12: warning: enumeration value 'QtInfoMsg' not handled in switch [-Wswitch]
Max Smolens 7 years ago
parent
commit
72411605e2
2 changed files with 11 additions and 0 deletions
  1. 5 0
      Libs/Core/ctkAbstractFactory.tpp
  2. 6 0
      Libs/Core/ctkErrorLogQtMessageHandler.cpp

+ 5 - 0
Libs/Core/ctkAbstractFactory.tpp

@@ -307,6 +307,11 @@ void ctkAbstractFactory<BaseClassType>::displayStatusMessage(
       case QtWarningMsg:
         qWarning("%s", qPrintable(msg));
         break;
+#if QT_VERSION >= QT_VERSION_CHECK(5,5,0)
+      case QtInfoMsg:
+        qInfo("%s", qPrintable(msg));
+        break;
+#endif
       case QtDebugMsg:
         qDebug("%s", qPrintable(msg));
         break;

+ 6 - 0
Libs/Core/ctkErrorLogQtMessageHandler.cpp

@@ -86,6 +86,12 @@ void ctkErrorLogModelQtMessageOutput(QtMsgType type, const QMessageLogContext& c
     {
     level = ctkErrorLogLevel::Debug;
     }
+#if QT_VERSION >= QT_VERSION_CHECK(5,5,0)
+  else if (type == QtInfoMsg)
+    {
+    level = ctkErrorLogLevel::Info;
+    }
+#endif
   else if (type == QtWarningMsg)
     {
     level = ctkErrorLogLevel::Warning;