Qt4PM: Move icons and mimetypes into QtSupport
Change-Id: I285b30d71951ad849e31c56daaa8d162a8efea9f Reviewed-by: Daniel Teske <daniel.teske@digia.com>
@@ -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>
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
8
src/plugins/qtsupport/QtSupport.mimetypes.xml
Normal file
@@ -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>
|
||||
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 623 B |
|
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
@@ -60,3 +60,9 @@ FORMS += \
|
||||
qtversioninfo.ui \
|
||||
debugginghelper.ui \
|
||||
qtversionmanager.ui \
|
||||
|
||||
RESOURCES += \
|
||||
qtsupport.qrc
|
||||
|
||||
OTHER_FILES += \
|
||||
QtSupport.mimetypes.xml
|
||||
|
||||
@@ -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"
|
||||
|
||||
9
src/plugins/qtsupport/qtsupport.qrc
Normal file
@@ -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>
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||