From 06ad80583cb567a98dcd863e718a3f8d1ab22f81 Mon Sep 17 00:00:00 2001 From: "S. Razi Alavizadeh" Date: Fri, 22 Feb 2013 01:25:28 +0330 Subject: [PATCH] IconProvider: fixed, return a fallback icon on non-linux OSes --- src/lib/data/icons.qrc | 1 + src/lib/data/icons/faenza/go-up.png | Bin 0 -> 494 bytes src/lib/tools/iconprovider.cpp | 13 ++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 src/lib/data/icons/faenza/go-up.png diff --git a/src/lib/data/icons.qrc b/src/lib/data/icons.qrc index 2617cc71d..14510c25e 100644 --- a/src/lib/data/icons.qrc +++ b/src/lib/data/icons.qrc @@ -6,6 +6,7 @@ icons/preferences/applications-system.png icons/preferences/applications-webbrowsers.png icons/preferences/preferences-desktop.png + icons/faenza/go-up.png icons/faenza/back.png icons/faenza/close.png icons/faenza/forward.png diff --git a/src/lib/data/icons/faenza/go-up.png b/src/lib/data/icons/faenza/go-up.png new file mode 100644 index 0000000000000000000000000000000000000000..b82d7a992d61f84dd2b2a099b76e3b4bb4b2c7d0 GIT binary patch literal 494 zcmVzaf)kBl_gc8hW;0R51DE+b_YC*U9VH_C2aO-j6tE2l zke1^TydMO*K@gk-L2wFmSF%LJ6>CY743ttsrPMG?_c{>fpM$V zx&|1HMhC!tRiM#m+-j{K%H_9-^;RwbM5N%;yl>2AvqEcK)cEedptTl0jr$c&fquVl kMdZ1*J#}&Gjr3=H0E{cixm!I+_5c6?07*qoM6N<$g0bhzSO5S3 literal 0 HcmV?d00001 diff --git a/src/lib/tools/iconprovider.cpp b/src/lib/tools/iconprovider.cpp index ef1e59069..5553d3e90 100644 --- a/src/lib/tools/iconprovider.cpp +++ b/src/lib/tools/iconprovider.cpp @@ -158,10 +158,7 @@ QIcon IconProvider::standardIcon(QStyle::StandardPixmap icon) case QStyle::SP_MessageBoxWarning: return QIcon::fromTheme("dialog-warning", mApp->style()->standardIcon(QStyle::SP_MessageBoxWarning)); -#ifdef QZ_WS_X11 - default: - return mApp->style()->standardIcon(icon); -#else +#ifndef QZ_WS_X11 case QStyle::SP_DialogCloseButton: return QIcon(":/icons/faenza/close.png"); @@ -171,6 +168,9 @@ QIcon IconProvider::standardIcon(QStyle::StandardPixmap icon) case QStyle::SP_BrowserReload: return QIcon(":/icons/faenza/reload.png"); + case QStyle::SP_FileDialogToParent: + return QIcon(":/icons/faenza/go-up.png"); + case QStyle::SP_ArrowForward: //RTL Support if (QApplication::layoutDirection() == Qt::RightToLeft) { @@ -188,10 +188,9 @@ QIcon IconProvider::standardIcon(QStyle::StandardPixmap icon) else { return QIcon(":/icons/faenza/back.png"); } - - default: - return QIcon(); #endif + default: + return mApp->style()->standardIcon(icon); } }