Core: filepathify FileIconProvider

Change-Id: Id6fcc05317f3f5144c662fb4826438407f8d9d21
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-06-08 12:54:22 +02:00
parent 093f3479ce
commit 43b6ada0db
16 changed files with 41 additions and 41 deletions

View File

@@ -26,6 +26,7 @@
#include "submitfilemodel.h"
#include <coreplugin/fileiconprovider.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
@@ -88,8 +89,8 @@ static QList<QStandardItem *> createFileRow(const QString &repositoryRoot,
// For some reason, Windows (at least) requires a valid (existing) file path to the icon, so
// the repository root is needed here.
// Note: for "overlaid" icons in Core::FileIconProvider a valid file path is not required
const QFileInfo fi(repositoryRoot + QLatin1Char('/') + fileName);
fileItem->setIcon(Core::FileIconProvider::icon(fi));
fileItem->setIcon(Core::FileIconProvider::icon(
Utils::FilePath::fromString(repositoryRoot).pathAppended(fileName)));
const QList<QStandardItem *> row{statusItem, fileItem};
if (statusHint != SubmitFileModel::FileStatusUnknown) {
const QBrush textForeground = fileStatusTextForeground(statusHint);