Преглед на файлове

Fix build of ctkTestApplication.cpp with Qt4. Fixes #482

This commit fixes windows build error originally introduced by
commit 77a4db54 adding support for Qt5.

Example of errors:

31>6>4>..\..\..\..\CTK\Libs\Widgets\ctkTestApplication.cpp(129) : error C2228: left of '.toLocal8Bit' must have class/struct/union
31>6>4>        type is 'const char *'
Jean-Christophe Fillion-Robin преди 11 години
родител
ревизия
37373075eb
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      Libs/Widgets/ctkTestApplication.cpp

+ 4 - 2
Libs/Widgets/ctkTestApplication.cpp

@@ -119,10 +119,12 @@ int ctkTestApplication::exec(bool reportErrorsOnExit)
 //-----------------------------------------------------------------------------
 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
 void ctkTestApplication::messageHandler(QtMsgType type, const QMessageLogContext& /*context*/, const QString& msg)
+{
 #else
-void ctkTestApplication::messageHandler(QtMsgType type, const char *msg)
-#endif
+void ctkTestApplication::messageHandler(QtMsgType type, const char *msgAsStr)
 {
+  QString msg(msgAsStr);
+#endif
   switch(type)
   {
   case QtDebugMsg: