diff options
author | hjk <hjk121@nokiamail.com> | 2013-08-30 16:38:57 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-09-03 11:41:45 +0200 |
commit | a37589d431844a64031d3044787c15f8dddace45 (patch) | |
tree | 4e4d2e07f31278b5606e779707697e65185cbc64 /src/plugins/glsleditor/glsleditorplugin.cpp | |
parent | 1226400af3da68f355f298935bc13807f257d224 (diff) |
Apply 'static' pattern to MimeDatabase
Also adjust and streamline using and surrounding code.
Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/glsleditor/glsleditorplugin.cpp')
-rw-r--r-- | src/plugins/glsleditor/glsleditorplugin.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp index 88ee6d36c4c..e8a4e814e23 100644 --- a/src/plugins/glsleditor/glsleditorplugin.cpp +++ b/src/plugins/glsleditor/glsleditorplugin.cpp @@ -107,7 +107,7 @@ GLSLEditorPlugin::~GLSLEditorPlugin() bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) { - if (!ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/glsleditor/GLSLEditor.mimetypes.xml"), errorMessage)) + if (!MimeDatabase::addMimeTypes(QLatin1String(":/glsleditor/GLSLEditor.mimetypes.xml"), errorMessage)) return false; // m_modelManager = new ModelManager(this); @@ -148,17 +148,16 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er errorMessage->clear(); FileIconProvider *iconProvider = FileIconProvider::instance(); - MimeDatabase *mimeDatabase = ICore::mimeDatabase(); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/glsleditor/images/glslfile.png")), - mimeDatabase->findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE))); + MimeDatabase::findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE))); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/glsleditor/images/glslfile.png")), - mimeDatabase->findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT))); + MimeDatabase::findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT))); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/glsleditor/images/glslfile.png")), - mimeDatabase->findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG))); + MimeDatabase::findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG))); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/glsleditor/images/glslfile.png")), - mimeDatabase->findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES))); + MimeDatabase::findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES))); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/glsleditor/images/glslfile.png")), - mimeDatabase->findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES))); + MimeDatabase::findByType(QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES))); QObject *core = ICore::instance(); BaseFileWizardParameters fragWizardParameters(IWizard::FileWizard); |