forked from qt-creator/qt-creator
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:
@@ -197,12 +197,12 @@ Core::IEditor *GLSLEditorEditable::duplicate(QWidget *parent)
|
||||
|
||||
Core::Id GLSLEditorEditable::id() const
|
||||
{
|
||||
return Core::Id(GLSLEditor::Constants::C_GLSLEDITOR_ID);
|
||||
return GLSLEditor::Constants::C_GLSLEDITOR_ID;
|
||||
}
|
||||
|
||||
bool GLSLEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
||||
{
|
||||
editorWidget()->setMimeType(Core::ICore::mimeDatabase()->findByFile(QFileInfo(fileName)).type());
|
||||
editorWidget()->setMimeType(Core::MimeDatabase::findByFile(QFileInfo(fileName)).type());
|
||||
bool b = TextEditor::BaseTextEditor::open(errorString, fileName, realFileName);
|
||||
return b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user