CppEditor: Use ProjectExplorer's file icon overlays

Replace the own three overlays with those from ProjectExplorer.

Change-Id: I9eceef4b7b321a47d2b7bd3e86bd758395043a37
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2021-12-02 22:56:27 +01:00
parent 44b462be4b
commit 6db5faa2e8
5 changed files with 6 additions and 6 deletions

View File

@@ -1,8 +1,5 @@
<RCC>
<qresource prefix="/cppeditor">
<file>images/qt_cpp.png</file>
<file>images/qt_h.png</file>
<file>images/qt_c.png</file>
<file>images/dark_qt_cpp.png</file>
<file>images/dark_qt_h.png</file>
<file>images/dark_qt_c.png</file>

View File

@@ -451,13 +451,16 @@ void CppEditorPlugin::extensionsInitialized()
d->m_cppEditorFactory.addHoverHandler(new ResourcePreviewHoverHandler);
FileIconProvider::registerIconOverlayForMimeType(
creatorTheme()->imageFile(Theme::IconOverlayCppSource, ":/cppeditor/images/qt_cpp.png"),
creatorTheme()->imageFile(Theme::IconOverlayCppSource,
ProjectExplorer::Constants::FILEOVERLAY_CPP),
Constants::CPP_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
creatorTheme()->imageFile(Theme::IconOverlayCSource, ":/cppeditor/images/qt_c.png"),
creatorTheme()->imageFile(Theme::IconOverlayCSource,
ProjectExplorer::Constants::FILEOVERLAY_C),
Constants::C_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
creatorTheme()->imageFile(Theme::IconOverlayCppHeader, ":/cppeditor/images/qt_h.png"),
creatorTheme()->imageFile(Theme::IconOverlayCppHeader,
ProjectExplorer::Constants::FILEOVERLAY_H),
Constants::CPP_HEADER_MIMETYPE);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B