diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-04-16 17:39:03 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-04-17 12:26:28 +0200 |
commit | c3ad09446bcf06c7715f27a3e290c25226063de9 (patch) | |
tree | bb8b29ea4801511127495c34377f698a8ed30789 | |
parent | cb4bfaf905a6db608bc3a4aeeef2c34979b60c81 (diff) | |
download | qt-creator-c3ad09446bcf06c7715f27a3e290c25226063de9.tar.gz |
Qt4PM: Move icons and mimetypes into QtSupport
Change-Id: I285b30d71951ad849e31c56daaa8d162a8efea9f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
17 files changed, 45 insertions, 23 deletions
diff --git a/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml b/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml index 1730d1ffc0..39b1d71cbb 100644 --- a/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml +++ b/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml @@ -15,9 +15,4 @@ <comment>Qt Project feature file</comment> <glob pattern="*.prf"/> </mime-type> - <mime-type type="application/x-linguist"> - <sub-class-of type="application/xml"/> - <comment>message catalog</comment> - <glob pattern="*.ts"/> - </mime-type> </mime-info> diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.cpp b/src/plugins/qt4projectmanager/profileeditorfactory.cpp index 20ddbfa621..bb2c8323d1 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.cpp +++ b/src/plugins/qt4projectmanager/profileeditorfactory.cpp @@ -33,6 +33,7 @@ #include "qt4projectmanagerconstants.h" #include "profileeditor.h" +#include <qtsupport/qtsupportconstants.h> #include <coreplugin/fileiconprovider.h> #include <texteditor/texteditorsettings.h> @@ -49,11 +50,11 @@ ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::Text m_actionHandler(handler) { Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance(); - iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(Constants::ICON_QT_PROJECT)), + iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(QtSupport::Constants::ICON_QT_PROJECT)), QLatin1String("pro")); - iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(Constants::ICON_QT_PROJECT)), + iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(QtSupport::Constants::ICON_QT_PROJECT)), QLatin1String("pri")); - iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(Constants::ICON_QT_PROJECT)), + iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(QtSupport::Constants::ICON_QT_PROJECT)), QLatin1String("prf")); } diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 2c7506dd1a..a5c2cb82a4 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -86,13 +86,13 @@ static const FileTypeDataStorage fileTypeDataStorage[] = { ":/qt4projectmanager/images/sources.png" }, { ProjectExplorer::FormType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Forms"), - ":/qt4projectmanager/images/forms.png" }, + ":/qtsupport/images/forms.png" }, { ProjectExplorer::ResourceType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Resources"), - ":/qt4projectmanager/images/qt_qrc.png" }, + ":/qtsupport/images/qt_qrc.png" }, { ProjectExplorer::QMLType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "QML"), - ":/qt4projectmanager/images/qml.png" }, + ":/qtsupport/images/qml.png" }, { ProjectExplorer::UnknownFileType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Other files"), ":/qt4projectmanager/images/unknown.png" } @@ -146,7 +146,7 @@ Qt4NodeStaticData::Qt4NodeStaticData() desc, folderIcon)); } // Project icon - const QIcon projectBaseIcon(QLatin1String(":/qt4projectmanager/images/qt_project.png")); + const QIcon projectBaseIcon(QLatin1String(":/qtsupport/images/qt_project.png")); const QPixmap projectPixmap = Core::FileIconProvider::overlayIcon(QStyle::SP_DirIcon, projectBaseIcon, desiredSize); diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.qbs b/src/plugins/qt4projectmanager/qt4projectmanager.qbs index 2e03a37947..a03e41e022 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.qbs +++ b/src/plugins/qt4projectmanager/qt4projectmanager.qbs @@ -111,10 +111,7 @@ QtcPlugin { "customwidgetwizard/plugingenerator.cpp", "customwidgetwizard/plugingenerator.h", "customwidgetwizard/pluginoptions.h", - "images/forms.png", "images/headers.png", - "images/qt_project.png", - "images/qt_qrc.png", "images/run_qmake.png", "images/run_qmake_small.png", "images/sources.png", diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.qrc b/src/plugins/qt4projectmanager/qt4projectmanager.qrc index 130651d467..da22ca50ec 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.qrc +++ b/src/plugins/qt4projectmanager/qt4projectmanager.qrc @@ -2,13 +2,9 @@ <qresource prefix="/qt4projectmanager"> <file>images/run_qmake.png</file> <file>images/run_qmake_small.png</file> - <file>images/qt_project.png</file> <file>Qt4ProjectManager.mimetypes.xml</file> - <file>images/forms.png</file> <file>images/headers.png</file> - <file>images/qt_qrc.png</file> <file>images/sources.png</file> <file>images/unknown.png</file> - <file>images/qml.png</file> </qresource> </RCC> diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index 6be8840378..a157370557 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -83,7 +83,6 @@ const char MAEMO_TOOLCHAIN_ID[] = "Qt4ProjectManager.ToolChain.Maemo"; const char RVCT_TOOLCHAIN_ID[] = "Qt4ProjectManager.ToolChain.RVCT"; // ICONS -const char ICON_QT_PROJECT[] = ":/qt4projectmanager/images/qt_project.png"; const char ICON_QTQUICK_APP[] = ":/wizards/images/qtquickapp.png"; const char ICON_HTML5_APP[] = ":/wizards/images/html5app.png"; diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp index bac306b563..6e07436214 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp @@ -31,10 +31,8 @@ #include "mobileapp.h" #include "targetsetuppage.h" -#include "qt4projectmanagerconstants.h" #include <projectexplorer/projectexplorerconstants.h> - #include <qtsupport/qtsupportconstants.h> #include <qtsupport/baseqtversion.h> @@ -98,7 +96,7 @@ Core::FeatureSet MobileAppWizard::requiredFeatures() const Core::BaseFileWizardParameters MobileAppWizard::parameters() { Core::BaseFileWizardParameters parameters(ProjectWizard); - parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QT_PROJECT))); + parameters.setIcon(QIcon(QLatin1String(QtSupport::Constants::ICON_QT_PROJECT))); parameters.setDisplayName(DisplayName); parameters.setId(QLatin1String("C.Qt4GuiMobile")); parameters.setDescription(Description); diff --git a/src/plugins/qtsupport/QtSupport.mimetypes.xml b/src/plugins/qtsupport/QtSupport.mimetypes.xml new file mode 100644 index 0000000000..8737bdfbab --- /dev/null +++ b/src/plugins/qtsupport/QtSupport.mimetypes.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="application/x-linguist"> + <sub-class-of type="application/xml"/> + <comment>message catalog</comment> + <glob pattern="*.ts"/> + </mime-type> +</mime-info> diff --git a/src/plugins/qt4projectmanager/images/forms.png b/src/plugins/qtsupport/images/forms.png Binary files differindex 72d1549b58..72d1549b58 100644 --- a/src/plugins/qt4projectmanager/images/forms.png +++ b/src/plugins/qtsupport/images/forms.png diff --git a/src/plugins/qt4projectmanager/images/qml.png b/src/plugins/qtsupport/images/qml.png Binary files differindex 30cf0e7828..30cf0e7828 100644 --- a/src/plugins/qt4projectmanager/images/qml.png +++ b/src/plugins/qtsupport/images/qml.png diff --git a/src/plugins/qt4projectmanager/images/qt_project.png b/src/plugins/qtsupport/images/qt_project.png Binary files differindex fc05f588ab..fc05f588ab 100644 --- a/src/plugins/qt4projectmanager/images/qt_project.png +++ b/src/plugins/qtsupport/images/qt_project.png diff --git a/src/plugins/qt4projectmanager/images/qt_qrc.png b/src/plugins/qtsupport/images/qt_qrc.png Binary files differindex 961e3e1a4e..961e3e1a4e 100644 --- a/src/plugins/qt4projectmanager/images/qt_qrc.png +++ b/src/plugins/qtsupport/images/qt_qrc.png diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro index 8e2f5a83aa..9ce54d9515 100644 --- a/src/plugins/qtsupport/qtsupport.pro +++ b/src/plugins/qtsupport/qtsupport.pro @@ -60,3 +60,9 @@ FORMS += \ qtversioninfo.ui \ debugginghelper.ui \ qtversionmanager.ui \ + +RESOURCES += \ + qtsupport.qrc + +OTHER_FILES += \ + QtSupport.mimetypes.xml diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs index d38f0c47f6..df1b1e5fd8 100644 --- a/src/plugins/qtsupport/qtsupport.qbs +++ b/src/plugins/qtsupport/qtsupport.qbs @@ -56,6 +56,7 @@ QtcPlugin { "baseqtversion.h", "qtconfigwidget.cpp", "qtconfigwidget.h", + "qtsupport.qrc", "customexecutableconfigurationwidget.cpp", "customexecutableconfigurationwidget.h", "customexecutablerunconfiguration.cpp", @@ -101,8 +102,14 @@ QtcPlugin { "screenshotcropper.cpp", "screenshotcropper.h", "showbuildlog.ui", + "images/forms.png", + "images/qml.png", + "images/qt_project.png", + "images/qt_qrc.png", + "QtSupport.mimetypes.xml", ] + ProductModule { Depends { name: "cpp" } cpp.includePaths: "../../shared" diff --git a/src/plugins/qtsupport/qtsupport.qrc b/src/plugins/qtsupport/qtsupport.qrc new file mode 100644 index 0000000000..351b129134 --- /dev/null +++ b/src/plugins/qtsupport/qtsupport.qrc @@ -0,0 +1,9 @@ +<RCC> + <qresource prefix="/qtsupport"> + <file>images/forms.png</file> + <file>images/qml.png</file> + <file>images/qt_project.png</file> + <file>images/qt_qrc.png</file> + <file>QtSupport.mimetypes.xml</file> + </qresource> +</RCC> diff --git a/src/plugins/qtsupport/qtsupportconstants.h b/src/plugins/qtsupport/qtsupportconstants.h index d4a62c3ea4..ff4479d395 100644 --- a/src/plugins/qtsupport/qtsupportconstants.h +++ b/src/plugins/qtsupport/qtsupportconstants.h @@ -77,6 +77,8 @@ const char ANDROID_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Android"); // so we define the icon here const char QML_WIZARD_ICON[] = ":/qmlproject/images/qml_wizard.png"; +const char ICON_QT_PROJECT[] = ":/qtsupport/images/qt_project.png"; + } // namepsace Constants } // namepsace QtSupport diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index d7ad25f646..964d969c19 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -39,6 +39,8 @@ #include "gettingstartedwelcomepage.h" +#include <coreplugin/icore.h> +#include <coreplugin/mimedatabase.h> #include <coreplugin/variablemanager.h> #include <projectexplorer/project.h> #include <projectexplorer/projectexplorer.h> @@ -60,6 +62,8 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes ProFileEvaluator::initialize(); new ProFileCacheManager(this); + if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":qtsupport/QtSupport.mimetypes.xml"), errorMessage)) + return false; QtVersionManager *mgr = new QtVersionManager; addAutoReleasedObject(mgr); |