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:
@@ -363,7 +363,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
|
||||
// Default to "txt".
|
||||
QByteArray byteContent = content.toUtf8();
|
||||
QString suffix;
|
||||
if (const Core::MimeType mimeType = Core::ICore::mimeDatabase()->findByData(byteContent))
|
||||
if (const Core::MimeType mimeType = Core::MimeDatabase::findByData(byteContent))
|
||||
suffix = mimeType.preferredSuffix();
|
||||
if (suffix.isEmpty())
|
||||
suffix = QLatin1String("txt");
|
||||
|
||||
Reference in New Issue
Block a user