diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.cpp b/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.cpp index df916bcfd5..cfcf09dc36 100644 --- a/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.cpp @@ -1,60 +1,62 @@ /*=================================================================== BlueBerry Platform Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "berryQtLogPlugin.h" #include "berryLogView.h" #include namespace berry { QtLogPlugin* QtLogPlugin::instance = 0; QtLogPlugin::QtLogPlugin() { instance = this; } void QtLogPlugin::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(berry::LogView, context) m_LogModel = new QtPlatformLogModel(); } void QtLogPlugin::stop(ctkPluginContext* /*context*/) { delete m_LogModel; } QtLogPlugin* QtLogPlugin::GetInstance() { return instance; } QtPlatformLogModel* QtLogPlugin::GetLogModel() { return m_LogModel; } } -Q_EXPORT_PLUGIN2(org_blueberry_ui_qt_log, berry::QtLogPlugin) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_blueberry_ui_qt_log, berry::QtLogPlugin) +#endif diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.h b/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.h index 67cefc554f..3e5013dd1a 100644 --- a/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.h +++ b/BlueBerry/Bundles/org.blueberry.ui.qt.log/src/internal/berryQtLogPlugin.h @@ -1,51 +1,54 @@ /*=================================================================== BlueBerry Platform Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef BERRYLOGPLUGIN_H_ #define BERRYLOGPLUGIN_H_ #include #include "berryQtPlatformLogModel.h" namespace berry { class QtLogPlugin : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_blueberry_ui_qt_log") +#endif Q_INTERFACES(ctkPluginActivator) public: QtLogPlugin(); void start(ctkPluginContext* context); void stop(ctkPluginContext* context); static QtLogPlugin* GetInstance(); QtPlatformLogModel* GetLogModel(); private: static QtLogPlugin* instance; QtPlatformLogModel* m_LogModel; }; } #endif /*BERRYLOGPLUGIN_H_*/