diff --git a/src/gui/folderstatusdelegate.cpp b/src/gui/folderstatusdelegate.cpp index 943a80e23b0..892161852ae 100644 --- a/src/gui/folderstatusdelegate.cpp +++ b/src/gui/folderstatusdelegate.cpp @@ -25,7 +25,6 @@ #include "resources/resources.h" -#include #include #include diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 062bb51646b..624916df2f2 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -209,7 +209,10 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const case Qt::CheckStateRole: return x._checked; case Qt::DecorationRole: - return QFileIconProvider().icon(x._isExternal ? QFileIconProvider::Network : QFileIconProvider::Folder); + if (x._isExternal) { + return QFileIconProvider().icon(QFileIconProvider::Network); + } + return Resources::getCoreIcon(QStringLiteral("folder-sync")); case Qt::ForegroundRole: if (x._isUndecided) { return QColor(Qt::red); diff --git a/src/gui/folderwizard/CMakeLists.txt b/src/gui/folderwizard/CMakeLists.txt index a3d3673c2a4..9bbfbb6d692 100644 --- a/src/gui/folderwizard/CMakeLists.txt +++ b/src/gui/folderwizard/CMakeLists.txt @@ -12,6 +12,6 @@ add_library(folderwizard STATIC spacespage.ui ) -target_link_libraries(folderwizard PUBLIC Qt::Widgets libsync) +target_link_libraries(folderwizard PUBLIC Qt::Widgets libsync owncloudResources) set_target_properties(folderwizard PROPERTIES AUTOUIC ON AUTORCC ON) apply_common_target_settings(folderwizard) diff --git a/src/gui/folderwizard/folderwizardremotepath.cpp b/src/gui/folderwizard/folderwizardremotepath.cpp index b75f447fa59..68ae220f9f9 100644 --- a/src/gui/folderwizard/folderwizardremotepath.cpp +++ b/src/gui/folderwizard/folderwizardremotepath.cpp @@ -26,8 +26,9 @@ #include "libsync/theme.h" +#include "resources/resources.h" + #include -#include #include using namespace OCC; @@ -161,9 +162,7 @@ void FolderWizardRemotePath::recursiveInsert(QTreeWidgetItem *parent, QStringLis QTreeWidgetItem *item = findFirstChild(parent, folderName); if (!item) { item = new QTreeWidgetItem(parent); - QFileIconProvider prov; - QIcon folderIcon = prov.icon(QFileIconProvider::Folder); - item->setIcon(0, folderIcon); + item->setIcon(0, Resources::getCoreIcon(QStringLiteral("folder-sync"))); item->setText(0, folderName); item->setData(0, Qt::UserRole, folderPath); item->setToolTip(0, folderPath); diff --git a/src/gui/selectivesyncwidget.cpp b/src/gui/selectivesyncwidget.cpp index 1be670b2b9e..294c1e06020 100644 --- a/src/gui/selectivesyncwidget.cpp +++ b/src/gui/selectivesyncwidget.cpp @@ -18,8 +18,9 @@ #include "libsync/networkjobs.h" #include "libsync/theme.h" +#include "resources/resources.h" + #include -#include #include #include #include @@ -132,8 +133,6 @@ static QTreeWidgetItem *findFirstChild(QTreeWidgetItem *parent, const QString &t void SelectiveSyncWidget::recursiveInsert(QTreeWidgetItem *parent, QStringList pathTrail, QString path, qint64 size) { - QFileIconProvider prov; - QIcon folderIcon = prov.icon(QFileIconProvider::Folder); if (pathTrail.size() == 0) { if (path.endsWith(QLatin1Char('/'))) { path.chop(1); @@ -157,7 +156,7 @@ void SelectiveSyncWidget::recursiveInsert(QTreeWidgetItem *parent, QStringList p } else if (parent->checkState(0) == Qt::Unchecked) { item->setCheckState(0, Qt::Unchecked); } - item->setIcon(0, folderIcon); + item->setIcon(0, Resources::getCoreIcon(QStringLiteral("folder-sync"))); item->setText(0, pathTrail.first()); if (size >= 0) { item->setText(1, Utility::octetsToString(size)); diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index dc8608acdbd..86c4bf716b9 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -28,11 +28,11 @@ #include "configfile.h" #include "theme.h" -#include #include +#include +#include #include #include -#include #include using namespace std::chrono_literals; @@ -76,9 +76,7 @@ ShareDialog::ShareDialog(AccountStatePtr accountState, closeButton->setAutoDefault(false); // Set icon - QFileInfo f_info(_localPath); - QFileIconProvider icon_provider; - const QIcon icon = icon_provider.icon(f_info); + const QIcon icon = QFileIconProvider().icon(QFileInfo(_localPath)); if (!icon.isNull()) { auto pixmap = icon.pixmap(thumbnailSize, thumbnailSize); _ui->label_icon->setPixmap(pixmap); diff --git a/src/gui/shareusergroupwidget.cpp b/src/gui/shareusergroupwidget.cpp index 98478f8c323..6e919436407 100644 --- a/src/gui/shareusergroupwidget.cpp +++ b/src/gui/shareusergroupwidget.cpp @@ -13,40 +13,34 @@ */ #include "shareusergroupwidget.h" -#include "ui_shareusergroupwidget.h" -#include "ui_shareuserline.h" #include "account.h" -#include "folderman.h" -#include "folder.h" #include "accountmanager.h" -#include "theme.h" -#include "configfile.h" #include "capabilities.h" +#include "configfile.h" #include "guiutility.h" -#include "thumbnailjob.h" #include "sharee.h" #include "sharemanager.h" -#include "guiutility.h" +#include "thumbnailjob.h" +#include "ui_shareusergroupwidget.h" +#include "ui_shareuserline.h" #include "resources/resources.h" #include "QProgressIndicator.h" + +#include +#include #include -#include #include -#include -#include +#include #include -#include -#include -#include -#include -#include +#include #include +#include +#include #include -#include -#include #include +#include namespace OCC {