Commit e73bf99e authored by Nicolas Fella's avatar Nicolas Fella Committed by Albert Astals Cid
Browse files

Remove GuiUtils::iconLoader

It's unused
parent b0542ca0
Pipeline #60839 passed with stage
in 9 minutes and 48 seconds
......@@ -10,7 +10,6 @@
#include "guiutils.h"
// qt/kde includes
#include <KIconLoader>
#include <KLocalizedString>
#include <KMessageBox>
#include <QApplication>
......@@ -34,7 +33,6 @@ struct GuiUtilsHelper {
QSvgRenderer *svgStamps();
QList<KIconLoader *> il;
std::unique_ptr<QSvgRenderer> svgStampFile;
};
......@@ -191,21 +189,6 @@ QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio)
return QIcon::fromTheme(name).pixmap(size);
}
void addIconLoader(KIconLoader *loader)
{
s_data->il.append(loader);
}
void removeIconLoader(KIconLoader *loader)
{
s_data->il.removeAll(loader);
}
KIconLoader *iconLoader()
{
return s_data->il.isEmpty() ? KIconLoader::global() : s_data->il.back();
}
void saveEmbeddedFile(Okular::EmbeddedFile *ef, QWidget *parent)
{
const QString caption = i18n("Where do you want to save %1?", ef->name());
......
......@@ -19,7 +19,6 @@ class QPixmap;
class QSize;
class QWidget;
class QFile;
class KIconLoader;
namespace Okular
{
......@@ -50,10 +49,6 @@ QString prettyToolTip(const Okular::Annotation *annotation);
*/
QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio = true);
void addIconLoader(KIconLoader *loader);
void removeIconLoader(KIconLoader *loader);
KIconLoader *iconLoader();
void saveEmbeddedFile(Okular::EmbeddedFile *ef, QWidget *parent);
void writeEmbeddedFile(Okular::EmbeddedFile *ef, QWidget *parent, QFile &targetFile);
......
......@@ -339,8 +339,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args)
// create live connect extension (for integrating with browser scripting)
new OkularLiveConnectExtension(this);
GuiUtils::addIconLoader(iconLoader());
const QStringList iconDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("okular/pics"), QStandardPaths::LocateDirectory);
QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << iconDirs);
......@@ -961,7 +959,6 @@ Part::~Part()
{
QDBusConnection::sessionBus().unregisterObject(m_registerDbusName);
GuiUtils::removeIconLoader(iconLoader());
m_document->removeObserver(this);
if (m_document->isOpened())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment