Icons: Add FilePath based API

Don't completely remove the QString based API though, since many icons
are constructed from constants and that would add a lot of noise with
FilePath.

Change-Id: I6a1b53bb1f1a79bb2b5756f94d5a2e7ca4cf0dc4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2021-05-26 09:58:29 +02:00
parent 6e7779d31b
commit 6d394ff29e
4 changed files with 51 additions and 33 deletions

View File

@@ -71,12 +71,11 @@ bool CompilationDatabaseProjectManagerPlugin::initialize(const QStringList &argu
d = new CompilationDatabaseProjectManagerPluginPrivate;
FileIconProvider::registerIconOverlayForFilename(Utils::Icons::PROJECT.imageFilePath().toString(),
COMPILE_COMMANDS_JSON);
FileIconProvider::registerIconOverlayForFilename(
Utils::Icons::PROJECT.imageFileName(),
COMPILE_COMMANDS_JSON);
FileIconProvider::registerIconOverlayForFilename(
Utils::Icons::PROJECT.imageFileName(),
QString(COMPILE_COMMANDS_JSON) + Constants::COMPILATIONDATABASEPROJECT_FILES_SUFFIX);
Utils::Icons::PROJECT.imageFilePath().toString(),
QString(COMPILE_COMMANDS_JSON) + Constants::COMPILATIONDATABASEPROJECT_FILES_SUFFIX);
ProjectManager::registerProjectType<CompilationDatabaseProject>(
Constants::COMPILATIONDATABASEMIMETYPE);