mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Clean leftover code after theming that set QIcons directly
This commit is contained in:
@ -53,14 +53,9 @@ QList<qulonglong> YACReader::mimeDataToComicsIds(const QMimeData *data)
|
||||
return comicIds;
|
||||
}
|
||||
|
||||
QString YACReader::addExtensionToIconPathInToolbar(const QString &path)
|
||||
QAction *YACReader::wrappedToolbarAction(QAction *action)
|
||||
{
|
||||
return path + "_18x18.svg";
|
||||
}
|
||||
|
||||
QAction *YACReader::actionWithCustomIcon(const QIcon &icon, QAction *action)
|
||||
{
|
||||
auto a = new QAction(icon, action->text());
|
||||
auto a = new QAction(action->text());
|
||||
|
||||
a->setEnabled(action->isEnabled());
|
||||
a->setCheckable(action->isCheckable());
|
||||
@ -79,7 +74,7 @@ QAction *YACReader::actionWithCustomIcon(const QIcon &icon, QAction *action)
|
||||
QObject::connect(action, &QAction::toggled, a, &QAction::setChecked);
|
||||
|
||||
// asign a to action somehow so we can retrieve it later
|
||||
action->setProperty("customIconAction", QVariant::fromValue<QObject *>(a));
|
||||
action->setProperty("wrappedToolbarAction", QVariant::fromValue<QObject *>(a));
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user