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>
This commit is contained in:
hjk
2013-08-30 16:38:57 +02:00
committed by Tobias Hunger
parent 1226400af3
commit a37589d431
57 changed files with 362 additions and 466 deletions

View File

@@ -1863,15 +1863,14 @@ Core::IEditor *CPPEditor::duplicate(QWidget *parent)
Core::Id CPPEditor::id() const
{
return Core::Id(CppEditor::Constants::CPPEDITOR_ID);
return CppEditor::Constants::CPPEDITOR_ID;
}
bool CPPEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
if (!TextEditor::BaseTextEditor::open(errorString, fileName, realFileName))
return false;
editorWidget()->setMimeType(
Core::ICore::mimeDatabase()->findByFile(QFileInfo(fileName)).type());
editorWidget()->setMimeType(Core::MimeDatabase::findByFile(QFileInfo(fileName)).type());
return true;
}