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:
hjk
2017-03-02 12:07:11 +01:00
parent 2cd8378148
commit 3f5caf4cdc
51 changed files with 238 additions and 245 deletions

View File

@@ -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()))