forked from qt-creator/qt-creator
Utils: Wrap MimeDatabase into static functions
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra all over the place. Change-Id: I4bfef62e73275a991455141671d6071162788e9d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -255,8 +255,7 @@ void DisassemblerAgentPrivate::configureMimeType()
|
||||
|
||||
document->setMimeType(mimeType);
|
||||
|
||||
Utils::MimeDatabase mdb;
|
||||
Utils::MimeType mtype = mdb.mimeTypeForName(mimeType);
|
||||
Utils::MimeType mtype = Utils::mimeTypeForName(mimeType);
|
||||
if (mtype.isValid()) {
|
||||
foreach (IEditor *editor, DocumentModel::editorsForDocument(document))
|
||||
if (TextEditorWidget *widget = qobject_cast<TextEditorWidget *>(editor->widget()))
|
||||
|
||||
Reference in New Issue
Block a user