From d3403976ad044f1a4a788a91ef5a2c6361d629c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Fri, 19 Jul 2013 10:58:31 +0000 Subject: [PATCH] - adding qt5 pluginsystem - adding qt5 headers refs #1359 git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17080 383ad7c9-94d9-4d36-a494-682f7c89f535 --- ColorOptions.hh | 8 +++++++- ColorPlugin.cc | 11 +++++++++-- ColorPlugin.hh | 4 ++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ColorOptions.hh b/ColorOptions.hh index 7b6ba42..148b1af 100644 --- a/ColorOptions.hh +++ b/ColorOptions.hh @@ -41,7 +41,13 @@ \*===========================================================================*/ #include "ui_colorOptions.hh" -#include + +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif + class ColorOptions : public QWidget, public Ui::colorOptions { diff --git a/ColorPlugin.cc b/ColorPlugin.cc index 06a7803..a9d4752 100644 --- a/ColorPlugin.cc +++ b/ColorPlugin.cc @@ -40,7 +40,12 @@ * * \*===========================================================================*/ -#include + +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif #include "ColorPlugin.hh" @@ -633,6 +638,8 @@ std::cerr << "save to ini file\n"; _ini.add_entry("ColorPlugin","lineWidthPresentation", lineWidthPresentation_ ); } - +#if QT_VERSION < 0x050000 Q_EXPORT_PLUGIN2( colorplugin , ColorPlugin ); +#endif + diff --git a/ColorPlugin.hh b/ColorPlugin.hh index 10a6c54..972ad1d 100644 --- a/ColorPlugin.hh +++ b/ColorPlugin.hh @@ -73,6 +73,10 @@ class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterfac Q_INTERFACES(OptionsInterface) Q_INTERFACES(INIInterface) +#if QT_VERSION >= 0x050000 + Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-Color") +#endif + signals: // BaseInterface void updateView(); -- 2.22.2