Commit aa6495a2 authored by Eike Ziller's avatar Eike Ziller Committed by hjk
Browse files

ExtensionSystem: Remove Qt4 support



Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.

Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 38d69ae4
......@@ -80,7 +80,3 @@ void ExamplePlugin::triggerAction()
tr("This is an action from Example."));
}
//! [slot implementation]
//! [export plugin]
Q_EXPORT_PLUGIN2(Example, ExamplePlugin)
//! [export plugin]
......@@ -321,11 +321,4 @@
This part defines the code that is called when the menu item is triggered.
It uses the Qt API to open a message box that displays informative text and
an \gui OK button.
\snippet exampleplugin/exampleplugin.cpp export plugin
At the end of the file, the Qt macro \c{Q_EXPORT_PLUGIN2} is used to register
the plugin with Qt's plugin loader system. This is necessary for Qt to
be able to load your plugin.
*/
......@@ -75,5 +75,3 @@ void %PluginName%Plugin::triggerAction()
tr("Action triggered"),
tr("This is an action from %PluginName%."));
}
Q_EXPORT_PLUGIN2(%PluginName%, %PluginName%Plugin)
......@@ -55,9 +55,9 @@
Plugins must provide one implementation of the IPlugin class, located
in a library that matches the \c name attribute given in their
XML description. The IPlugin implementation must be exported and
made known to Qt's plugin system, see the Qt Documentation on the
\l{http://qt-project.org/doc/qt-4.8/qtplugin.html#Q_EXPORT_PLUGIN2}
{Q_EXPORT_PLUGIN2 macro}.
made known to Qt's plugin system, using the \c Q_PLUGIN_METADATA macro with
an IID set to \c "org.qt-project.Qt.QtCreatorPlugin".
After the plugins' XML files have been read, and dependencies have been
found, the plugin loading is done in three phases:
......
......@@ -33,9 +33,7 @@
#include "extensionsystem_global.h"
#include <QObject>
#if QT_VERSION >= 0x050000
# include <QtPlugin>
#endif
#include <QtPlugin>
namespace ExtensionSystem {
......@@ -83,16 +81,4 @@ private:
} // namespace ExtensionSystem
// The macros Q_EXPORT_PLUGIN, Q_EXPORT_PLUGIN2 become obsolete in Qt 5.
#if QT_VERSION >= 0x050000
# if defined(Q_EXPORT_PLUGIN)
# undef Q_EXPORT_PLUGIN
# undef Q_EXPORT_PLUGIN2
# endif
# define Q_EXPORT_PLUGIN(plugin)
# define Q_EXPORT_PLUGIN2(function, plugin)
#else
# define Q_PLUGIN_METADATA(x)
#endif
#endif // IPLUGIN_H
......@@ -90,7 +90,8 @@ enum { debugLeaks = 0 };
\section1 Plugins
Plugins consist of an XML descriptor file, and of a library that contains a Qt plugin
(declared via Q_EXPORT_PLUGIN) that must derive from the IPlugin class.
that must derive from the IPlugin class and has an IID of
\c "org.qt-project.Qt.QtCreatorPlugin".
The plugin manager is used to set a list of file system directories to search for
plugins, retrieve information about the state of these plugins, and to load them.
......
......@@ -81,5 +81,3 @@ AnalyzerPlugin *AnalyzerPlugin::instance()
{
return m_instance;
}
Q_EXPORT_PLUGIN(AnalyzerPlugin)
......@@ -124,5 +124,3 @@ void AndroidPlugin::updateDevice()
}
} // namespace Android
Q_EXPORT_PLUGIN(Android::AndroidPlugin)
......@@ -70,5 +70,3 @@ bool AutotoolsProjectPlugin::initialize(const QStringList &arguments,
return true;
}
Q_EXPORT_PLUGIN(AutotoolsProjectPlugin)
......@@ -73,5 +73,3 @@ bool BareMetalPlugin::initialize(const QStringList &arguments, QString *errorStr
} // namespace Internal
} // namespace BareMetal
Q_EXPORT_PLUGIN(BareMetal::Internal::BareMetalPlugin)
......@@ -784,5 +784,3 @@ void BazaarPlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as)
} // namespace Internal
} // namespace Bazaar
Q_EXPORT_PLUGIN(Bazaar::Internal::BazaarPlugin)
......@@ -422,5 +422,3 @@ QString BeautifierPlugin::msgCommandPromptDialogTitle(const QString &command)
} // namespace Internal
} // namespace Beautifier
Q_EXPORT_PLUGIN(Beautifier::Internal::BeautifierPlugin)
......@@ -559,6 +559,4 @@ void BinEditorPlugin::selectAllAction()
} // namespace Internal
} // namespace BinEditor
Q_EXPORT_PLUGIN(BinEditor::Internal::BinEditorPlugin)
#include "bineditorplugin.moc"
......@@ -202,5 +202,3 @@ void BookmarksPlugin::editBookmarkActionTriggered()
{
m_bookmarkManager->edit(m_bookmarkMarginActionFileName, m_bookmarkMarginActionLineNumber);
}
Q_EXPORT_PLUGIN(BookmarksPlugin)
......@@ -90,5 +90,3 @@ void ClangCodeModelPlugin::extensionsInitialized()
} // namespace Internal
} // namespace Clang
Q_EXPORT_PLUGIN(ClangCodeModel::Internal::ClangCodeModelPlugin)
......@@ -62,5 +62,3 @@ bool Plugin::initialize(const QStringList &arguments, QString *errorMessage)
} // namespace Internal
} // namespace ClassView
Q_EXPORT_PLUGIN(ClassView::Internal::Plugin)
......@@ -2480,5 +2480,3 @@ void ClearCasePlugin::testVcsStatusDynamicNotManaged()
} // namespace Internal
} // namespace ClearCase
Q_EXPORT_PLUGIN(ClearCase::Internal::ClearCasePlugin)
......@@ -76,5 +76,3 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
void CMakeProjectPlugin::extensionsInitialized()
{
}
Q_EXPORT_PLUGIN(CMakeProjectPlugin)
......@@ -151,5 +151,3 @@ ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown()
m_mainWindow->aboutToShutdown();
return SynchronousShutdown;
}
Q_EXPORT_PLUGIN(CorePlugin)
......@@ -390,5 +390,3 @@ CodepasterPlugin *CodepasterPlugin::instance()
}
} // namespace CodePaster
Q_EXPORT_PLUGIN(CodePaster::CodepasterPlugin)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment