aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/stock_icon.cpp
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-10-25 18:59:41 +0200
committerMichal Labedzki <michal.labedzki@tieto.com>2014-11-01 11:23:47 +0000
commit6f3d91f27d6e927e1648c10ae5c9d8bd9d3df6a5 (patch)
tree18120350501642c118fc42cb97ca79670959d216 /ui/qt/stock_icon.cpp
parentea7c867ba2165703702a8a7706be8736f098ceef (diff)
Qt: Fix build with Qt < 4.8
Change-Id: I13d4addb16c5c2790703feb63666367d39f36682 Reviewed-on: https://code.wireshark.org/review/5039 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'ui/qt/stock_icon.cpp')
-rw-r--r--ui/qt/stock_icon.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/stock_icon.cpp b/ui/qt/stock_icon.cpp
index a3195fe83e..03c50e0325 100644
--- a/ui/qt/stock_icon.cpp
+++ b/ui/qt/stock_icon.cpp
@@ -62,13 +62,17 @@ StockIcon::StockIcon(const char *icon_name) :
{
if (strcmp(icon_name, "document-open") == 0) {
QIcon dir_icon = fromTheme(icon_name, wsApp->style()->standardIcon(QStyle::SP_DirIcon));
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
swap(dir_icon);
+#endif
return;
}
if (hasThemeIcon(icon_name)) {
QIcon theme_icon = fromTheme(icon_name);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
swap(theme_icon);
+#endif
return;
} else {
QStringList types = QStringList() << "16x16" << "24x24";