forked from qt-creator/qt-creator
Display proper overlay icons on Windows/Qt 5.
Task-number: QTBUG-27450 Change-Id: I521823dc586c304a5242a79f04489e5bc0fdb702 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
1504ca67fb
commit
0869a13938
@@ -138,7 +138,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Get icon from OS.
|
// Get icon from OS.
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
return QFileIconProvider::icon(fileInfo);
|
return QFileIconProvider::icon(fileInfo);
|
||||||
#else
|
#else
|
||||||
// File icons are unknown on linux systems.
|
// File icons are unknown on linux systems.
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
|
|||||||
<< QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE)
|
<< QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE)
|
||||||
<< QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE);
|
<< QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE);
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN)
|
#if !defined(Q_OS_MAC) && !defined(Q_OS_WIN)
|
||||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||||
Core::MimeDatabase *mimeDatabase = Core::ICore::mimeDatabase();
|
Core::MimeDatabase *mimeDatabase = Core::ICore::mimeDatabase();
|
||||||
iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/cppeditor/images/qt_cpp.png")),
|
iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/cppeditor/images/qt_cpp.png")),
|
||||||
|
|||||||
Reference in New Issue
Block a user