[rkward] /: Fix RKward icons for load libs dialog
Thomas Friedrichsmeier
null at kde.org
Wed May 16 08:57:42 UTC 2018
Git commit b6c08b1e6ea4ffbeaece08fb62684d7b5271843b by Thomas Friedrichsmeier.
Committed on 16/05/2018 at 08:57.
Pushed by tfry into branch 'master'.
Fix RKward icons for load libs dialog
M +1 -0 ChangeLog
M +2 -2 rkward/dialogs/rkloadlibsdialog.cpp
M +3 -1 rkward/misc/rkstandardicons.cpp
M +3 -1 rkward/misc/rkstandardicons.h
https://commits.kde.org/rkward/b6c08b1e6ea4ffbeaece08fb62684d7b5271843b
diff --git a/ChangeLog b/ChangeLog
index ab58a8c2..6886d14e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- Fixed: RKWard icon was missing for the "enhances RKWard" column in package installation dialog
- Fixed a layout issue in plugins using <stretch>-elements that would sometimes also render top-left aligned UI-elements unsuable.
- Remove a bit of unused empty space around the main area of plugin dialogs
- Expand root level objects (esp. data.frames) by default in plugin object lists. Add button to toggle back to collapsed.
diff --git a/rkward/dialogs/rkloadlibsdialog.cpp b/rkward/dialogs/rkloadlibsdialog.cpp
index d73f0a16..ca807b2a 100644
--- a/rkward/dialogs/rkloadlibsdialog.cpp
+++ b/rkward/dialogs/rkloadlibsdialog.cpp
@@ -1011,7 +1011,7 @@ void RKRPackageInstallationStatus::clearStatus () {
QVariant RKRPackageInstallationStatus::headerData (int section, Qt::Orientation orientation, int role) const {
if (orientation != Qt::Horizontal) return QVariant ();
- if ((role == Qt::DecorationRole) && (section == EnhancesRKWard)) return QApplication::windowIcon ();
+ if ((role == Qt::DecorationRole) && (section == EnhancesRKWard)) return RKStandardIcons::getIcon (RKStandardIcons::RKWardIcon);
if (role == Qt::DisplayRole) {
if (section == InstallationStatus) return QVariant (i18n ("Status"));
@@ -1096,7 +1096,7 @@ QVariant RKRPackageInstallationStatus::data (const QModelIndex &index, int role)
if (prow == InstalledPackages) enhance_rk = enhance_rk_in_installed.value (irow);
else enhance_rk = enhance_rk_in_available.value (arow);
if (role == Qt::UserRole) return QVariant (enhance_rk);
- if (enhance_rk) return QApplication::windowIcon ();
+ if (enhance_rk) return RKStandardIcons::getIcon (RKStandardIcons::RKWardIcon);
}
} else if (col == PackageName) {
if (role == Qt::DisplayRole) {
diff --git a/rkward/misc/rkstandardicons.cpp b/rkward/misc/rkstandardicons.cpp
index 7c07f22d..2ebaea12 100644
--- a/rkward/misc/rkstandardicons.cpp
+++ b/rkward/misc/rkstandardicons.cpp
@@ -2,7 +2,7 @@
rkstandardicons - description
-------------------
begin : Wed Oct 24 2007
- copyright : (C) 2007-2016 by Thomas Friedrichsmeier
+ copyright : (C) 2007-2018 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier at kdemail.net
***************************************************************************/
@@ -130,6 +130,8 @@ void RKStandardIcons::doInitIcons () {
icons[DocumentPDF] = QIcon::fromTheme("application-pdf");
+ icons[RKWardIcon] = QIcon::fromTheme("rkward"); // this used to be accessible as QApplication::windowIcon(), but apparently no longer in Qt5
+
RK_DO ({
for (int i = ActionRunAll; i < Last; ++i) {
if (icons[i].isNull ()) qDebug ("Icon %d could not be loaded", i);
diff --git a/rkward/misc/rkstandardicons.h b/rkward/misc/rkstandardicons.h
index ed4790a5..9f43c656 100644
--- a/rkward/misc/rkstandardicons.h
+++ b/rkward/misc/rkstandardicons.h
@@ -2,7 +2,7 @@
rkstandardicons - description
-------------------
begin : Wed Oct 24 2007
- copyright : (C) 2007-2016 by Thomas Friedrichsmeier
+ copyright : (C) 2007-2018 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier at kdemail.net
***************************************************************************/
@@ -117,6 +117,8 @@ public:
DocumentPDF,
+ RKWardIcon,
+
Last /**< not really an item, only the count of items available. Do not use. */
};
More information about the rkward-tracker
mailing list