Remove QIcon::fromTheme usage
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#endif
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
#include <QStyle>
|
||||
#ifdef QT_QTDBUS_FOUND
|
||||
#include <QDBusConnection>
|
||||
#endif
|
||||
@@ -87,8 +88,8 @@ ActionDialog::ActionDialog(QWidget *parent)
|
||||
QWidget *mainWidet = new QWidget(this);
|
||||
setupUi(mainWidet);
|
||||
setMainWidget(mainWidet);
|
||||
errorIcon->setPixmap(QIcon::fromTheme("dialog-error").pixmap(64, 64));
|
||||
skipIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(64, 64));
|
||||
errorIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxCritical).pixmap(64, 64));
|
||||
skipIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(64, 64));
|
||||
configureSourceButton->setIcon(Icons::self()->configureIcon);
|
||||
configureDestButton->setIcon(Icons::self()->configureIcon);
|
||||
connect(configureSourceButton, SIGNAL(clicked()), SLOT(configureSource()));
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <QIcon>
|
||||
#include <QMessageBox>
|
||||
#include <QToolButton>
|
||||
#include <QStyle>
|
||||
|
||||
// This defines the unicode symbols for special keys (kCommandUnicode and friends)
|
||||
#ifdef Q_OS_MAC
|
||||
@@ -172,17 +173,13 @@ KeySequenceWidget::KeySequenceWidget(QWidget *parent)
|
||||
|
||||
_keyButton = new KeySequenceButton(this, this);
|
||||
_keyButton->setFocusPolicy(Qt::StrongFocus);
|
||||
_keyButton->setIcon(QIcon::fromTheme("configure"));
|
||||
_keyButton->setToolTip(tr("Click on the button, then enter the shortcut like you would in the program.\nExample for Ctrl+a: hold the Ctrl key and press a."));
|
||||
layout->addWidget(_keyButton);
|
||||
|
||||
_clearButton = new QToolButton(this);
|
||||
layout->addWidget(_clearButton);
|
||||
|
||||
if (qApp->isLeftToRight())
|
||||
_clearButton->setIcon(QIcon::fromTheme("edit-clear-locationbar-rtl", QIcon::fromTheme("edit-clear")));
|
||||
else
|
||||
_clearButton->setIcon(QIcon::fromTheme("edit-clear-locationbar-ltr", QIcon::fromTheme("edit-clear")));
|
||||
_clearButton->setIcon(style()->standardIcon(QStyle::SP_LineEditClearButton));
|
||||
|
||||
setLayout(layout);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ PathRequester::PathRequester(QWidget *parent)
|
||||
layout->addWidget(edit);
|
||||
layout->addWidget(btn);
|
||||
btn->setAutoRaise(true);
|
||||
btn->setIcon(icon.isNull() ? QIcon::fromTheme("document-open") : icon);
|
||||
btn->setIcon(icon);
|
||||
connect(btn, SIGNAL(clicked(bool)), SLOT(choose()));
|
||||
connect(edit, SIGNAL(textChanged(const QString &)), SIGNAL(textChanged(const QString &)));
|
||||
}
|
||||
|
||||
@@ -100,10 +100,8 @@ QPixmap ProxyStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opt, c
|
||||
{
|
||||
QPixmap pixmap=baseStyle()->standardPixmap(sp, opt, widget);
|
||||
switch (sp) {
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
case SP_LineEditClearButton:
|
||||
return editClearIcon.pixmap(pixmap.size());
|
||||
#endif
|
||||
case SP_MessageBoxCritical:
|
||||
return errorIcon.pixmap(pixmap.size());
|
||||
case SP_MessageBoxWarning:
|
||||
@@ -120,10 +118,8 @@ QPixmap ProxyStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opt, c
|
||||
QIcon ProxyStyle::standardIcon(StandardPixmap sp, const QStyleOption *opt, const QWidget *widget) const
|
||||
{
|
||||
switch (sp) {
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
case SP_LineEditClearButton:
|
||||
return editClearIcon;
|
||||
#endif
|
||||
case SP_MessageBoxCritical:
|
||||
return errorIcon;
|
||||
case SP_MessageBoxWarning:
|
||||
|
||||
Reference in New Issue
Block a user