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

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)
......@@ -425,5 +425,3 @@ void CppEditorPlugin::openIncludeHierarchy()
emit includeHierarchyRequested();
}
}
Q_EXPORT_PLUGIN(CppEditorPlugin)
......@@ -449,5 +449,3 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader)
}
} // namespace CppTools
Q_EXPORT_PLUGIN(CppTools::Internal::CppToolsPlugin)
......@@ -1355,5 +1355,3 @@ void CvsPlugin::testLogResolving()
} // namespace Internal
} // namespace Cvs
Q_EXPORT_PLUGIN(Cvs::Internal::CvsPlugin)
......@@ -3697,5 +3697,3 @@ void DebuggerPluginPrivate::testBenchmark1()
} // namespace Debugger
#include "debuggerplugin.moc"
Q_EXPORT_PLUGIN(Debugger::DebuggerPlugin)
......@@ -200,5 +200,3 @@ void FormEditorPlugin::switchSourceForm()
if (!fileToOpen.isEmpty())
Core::EditorManager::openEditor(fileToOpen);
}
Q_EXPORT_PLUGIN(FormEditorPlugin)
......@@ -863,7 +863,4 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch()
#endif // WITH_TESTS
Q_EXPORT_PLUGIN(DiffEditor::Internal::DiffEditorPlugin)
#include "diffeditorplugin.moc"
......@@ -386,5 +386,3 @@ void EmacsKeysPlugin::genericVScroll(int direction)
m_currentEditorWidget->setTextCursor(cursor);
m_currentState->endOwnAction(KeysActionOther);
}
Q_EXPORT_PLUGIN2(EmacsKeys, EmacsKeysPlugin)
......@@ -2319,5 +2319,3 @@ void FakeVimPlugin::setupTest(QString *title, FakeVimHandler **handler, QWidget
} // namespace FakeVim
#include "fakevimplugin.moc"
Q_EXPORT_PLUGIN(FakeVim::Internal::FakeVimPlugin)
......@@ -101,5 +101,3 @@ void GenericProjectPlugin::editFiles()
} // namespace Internal
} // namespace GenericProjectManager
Q_EXPORT_PLUGIN(GenericProjectManager::Internal::GenericProjectPlugin)
......@@ -1582,5 +1582,3 @@ void GitPlugin::testCloneWizard_directoryFromRepository_data()
} // namespace Internal
} // namespace Git
Q_EXPORT_PLUGIN(GitPlugin)
......@@ -288,5 +288,3 @@ const GlslEditorPlugin::InitFile *GlslEditorPlugin::shaderInit(int variant)
} // namespace Internal
} // namespace GlslEditor
Q_EXPORT_PLUGIN(GlslEditor::Internal::GlslEditorPlugin)
......@@ -153,5 +153,3 @@ void HelloWorldPlugin::sayHelloWorld()
} // namespace Internal
} // namespace HelloWorld
Q_EXPORT_PLUGIN(HelloWorld::Internal::HelloWorldPlugin)
......@@ -1054,5 +1054,3 @@ void HelpPlugin::setupNavigationMenus(QAction *back, QAction *next, QWidget *par
back->setMenu(m_backMenu);
next->setMenu(m_nextMenu);
}
Q_EXPORT_PLUGIN(HelpPlugin)
......@@ -63,5 +63,3 @@ void ImageViewerPlugin::extensionsInitialized()
} // namespace Internal
} // namespace ImageViewer
Q_EXPORT_PLUGIN(ImageViewer::Internal::ImageViewerPlugin)
......@@ -100,5 +100,3 @@ void IosPlugin::kitsRestored()
}
} // namespace Ios
Q_EXPORT_PLUGIN(Ios::IosPlugin)
......@@ -112,5 +112,3 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
void MacrosPlugin::extensionsInitialized()
{
}
Q_EXPORT_PLUGIN(MacrosPlugin)
......@@ -756,5 +756,3 @@ void MercurialPlugin::testLogResolving()
} // namespace Internal
} // namespace Mercurial
Q_EXPORT_PLUGIN(MercurialPlugin)
......@@ -1567,6 +1567,4 @@ void PerforcePlugin::testLogResolving()
} // namespace Internal
} // namespace Perforce
Q_EXPORT_PLUGIN(Perforce::Internal::PerforcePlugin)
#include "perforceplugin.moc"
......@@ -3236,5 +3236,3 @@ QList<QPair<QString, QString> > ProjectExplorerPlugin::recentProjects()
{
return d->m_recentProjects;
}
Q_EXPORT_PLUGIN(ProjectExplorerPlugin)
......@@ -253,5 +253,3 @@ QSet<QString> PythonEditorPlugin::builtins()
} // namespace Internal
} // namespace PythonEditor
Q_EXPORT_PLUGIN(PythonEditor::Internal::PythonEditorPlugin)
......@@ -515,5 +515,3 @@ void QbsProjectManagerPlugin::reparseProject(QbsProject *project)
} // namespace Internal
} // namespace QbsProjectManager
Q_EXPORT_PLUGIN(QbsProjectManager::Internal::QbsProjectManagerPlugin)
......@@ -66,5 +66,3 @@ bool QmakeAndroidSupportPlugin::initialize(const QStringList &arguments, QString
void QmakeAndroidSupportPlugin::extensionsInitialized()
{ }
Q_EXPORT_PLUGIN(QmakeAndroidSupportPlugin)
......@@ -421,5 +421,3 @@ void QmakeProjectManagerPlugin::updateBuildFileAction()
m_buildFileAction->setVisible(visible);
m_buildFileAction->setEnabled(enabled);
}
Q_EXPORT_PLUGIN(QmakeProjectManagerPlugin)
......@@ -58,7 +58,3 @@ QString ComponentsPlugin::metaInfo() const
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN(QmlDesigner::ComponentsPlugin)
#endif
......@@ -512,5 +512,3 @@ void QmlDesignerPlugin::setSettings(const DesignerSettings &s)
}
}
Q_EXPORT_PLUGIN(QmlDesigner::QmlDesignerPlugin)
......@@ -50,7 +50,3 @@ QString QtQuickPlugin::metaInfo() const
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN(QmlDesigner::QtQuickPlugin)
#endif
......@@ -341,5 +341,3 @@ void QmlJSEditorPlugin::checkCurrentEditorSemanticInfoUpToDate()
}
} // namespace QmlJSEditor
Q_EXPORT_PLUGIN(QmlJSEditor::Internal::QmlJSEditorPlugin)
......@@ -140,5 +140,3 @@ void QmlJSToolsPlugin::onAllTasksFinished(Core::Id type)
if (type == QmlJS::Constants::TASK_INDEX)
m_resetCodeModelAction->setEnabled(true);
}
Q_EXPORT_PLUGIN(QmlJSToolsPlugin)
......@@ -109,5 +109,3 @@ QList<AbstractTimelineModel *> QmlProfilerPlugin::getModels() const
} // namespace Internal
} // namespace QmlProfiler
Q_EXPORT_PLUGIN(QmlProfiler::Internal::QmlProfilerPlugin)
......@@ -77,5 +77,3 @@ void QmlProjectPlugin::extensionsInitialized()
}
} // namespace QmlProjectManager
Q_EXPORT_PLUGIN(QmlProjectManager::QmlProjectPlugin)
......@@ -533,5 +533,3 @@ void QnxPlugin::testConfigurationManager()
}
#endif
Q_EXPORT_PLUGIN2(QNX, QnxPlugin)
......@@ -127,5 +127,3 @@ bool QtSupportPlugin::delayedInitialize()
{
return QtVersionManager::delayedInitialize();
}
Q_EXPORT_PLUGIN(QtSupportPlugin)
......@@ -75,5 +75,3 @@ void RemoteLinuxPlugin::extensionsInitialized()
} // namespace Internal
} // namespace RemoteLinux
Q_EXPORT_PLUGIN(RemoteLinux::Internal::RemoteLinuxPlugin)
......@@ -377,6 +377,4 @@ ResourceEditorW * ResourceEditorPlugin::currentEditor() const
return focusEditor;
}
Q_EXPORT_PLUGIN(ResourceEditorPlugin)
#include "resourceeditorplugin.moc"
......@@ -1315,5 +1315,3 @@ void SubversionPlugin::testLogResolving()
} // Internal
} // Subversion
Q_EXPORT_PLUGIN(Subversion::Internal::SubversionPlugin)
......@@ -261,5 +261,3 @@ void TaskListPlugin::loadDataFromSession()
} // namespace Internal
} // namespace TaskList
Q_EXPORT_PLUGIN(TaskList::Internal::TaskListPlugin)
......@@ -322,6 +322,4 @@ void TextEditorPlugin::updateCurrentSelection(const QString &text)
}
}
Q_EXPORT_PLUGIN(TextEditorPlugin)
#include "texteditorplugin.moc"
......@@ -124,7 +124,5 @@ void TodoPlugin::createOptionsPage()
connect(m_optionsPage, SIGNAL(settingsChanged(Settings)), SLOT(settingsChanged(Settings)));
}
Q_EXPORT_PLUGIN2(Todo, TodoPlugin)
} // namespace Internal
} // namespace Todo
......@@ -278,5 +278,3 @@ void UpdateInfoPlugin::settingsHelper(T *settings)
} //namespace Internal
} //namespace UpdateInfo
Q_EXPORT_PLUGIN(UpdateInfo::Internal::UpdateInfoPlugin)
......@@ -199,5 +199,3 @@ void ValgrindPlugin::extensionsInitialized()
} // namespace Internal
} // namespace Valgrind
Q_EXPORT_PLUGIN(Valgrind::Internal::ValgrindPlugin)
......@@ -163,5 +163,3 @@ void VcsPlugin::slotSettingsChanged()
} // namespace Internal
} // namespace VcsBase
Q_EXPORT_PLUGIN(VcsBase::Internal::VcsPlugin)
......@@ -342,7 +342,4 @@ void WelcomePlugin::extensionsInitialized()
} // namespace Internal
} // namespace Welcome
Q_EXPORT_PLUGIN(Welcome::Internal::WelcomePlugin)
#include "welcomeplugin.moc"
......@@ -72,5 +72,3 @@ void WinRtPlugin::extensionsInitialized()
} // namespace Internal
} // namespace WinRt
Q_EXPORT_PLUGIN(WinRt::Internal::WinRtPlugin)
......@@ -49,5 +49,3 @@ void MyPlugin1::extensionsInitialized()
{
}
Q_EXPORT_PLUGIN(MyPlugin1)
......@@ -46,5 +46,3 @@ void MyPlugin2::extensionsInitialized()
{
}
Q_EXPORT_PLUGIN(MyPlugin2)
......@@ -45,5 +45,3 @@ void MyPlugin3::extensionsInitialized()
{
}
Q_EXPORT_PLUGIN(MyPlugin3)
......@@ -79,5 +79,3 @@ void MyPlugin1::extensionsInitialized()
addAutoReleasedObject(obj);
}
Q_EXPORT_PLUGIN(MyPlugin1)
......@@ -61,5 +61,3 @@ void MyPlugin2::extensionsInitialized()
addAutoReleasedObject(obj);
}
Q_EXPORT_PLUGIN(MyPlugin2)
......@@ -69,5 +69,3 @@ void MyPlugin3::extensionsInitialized()
obj->setObjectName(QLatin1String("MyPlugin3_running"));
addAutoReleasedObject(obj);
}
Q_EXPORT_PLUGIN(MyPlugin3)
......@@ -49,5 +49,3 @@ void MyPluginImpl::extensionsInitialized()
m_isExtensionsInitialized = true;
}
Q_EXPORT_PLUGIN(MyPluginImpl)
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