Kaynağa Gözat

Merge branch 'fix-qt5-errors'

* fix-qt5-errors:
  Fixed deprecated warning with Qt5.
  QAtomicInt does not have a int conversion operator any more.
Sascha Zelzer 10 yıl önce
ebeveyn
işleme
6fb5bdda46

+ 4 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleConcurrentHelpers.cpp

@@ -56,7 +56,11 @@ ctkCmdLineModuleReferenceResult ctkCmdLineModuleConcurrentRegister::operator()(c
     }
     return ctkCmdLineModuleReferenceResult(moduleUrl, e.message());
   }
+#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
+  catch (const QException& e)
+#else
   catch (const QtConcurrent::Exception& e)
+#endif
   {
     if (this->Debug)
     {

+ 1 - 1
Libs/Core/ctkErrorLogQtMessageHandler.cpp

@@ -67,7 +67,7 @@ void ctkErrorLogModelQtMessageOutput(QtMsgType type, const QMessageLogContext& c
   ctkErrorLogQtMessageHandler_CurrentRecursionDepth.ref();
   // Allow a couple of recursion levels to get a hint about where and why recursion occurs,
   // so we stop processing the message if recursion depth is over 10.
-  if (ctkErrorLogQtMessageHandler_CurrentRecursionDepth > 10)
+  if (ctkErrorLogQtMessageHandler_CurrentRecursionDepth.load() > 10)
     {
     ctkErrorLogQtMessageHandler_CurrentRecursionDepth.deref();
     return;