summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-11-17 07:32:29 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-11-17 07:32:29 +0000
commite7b8a42ef4001083c1028369daf5ab1cc2e6c9c7 (patch)
tree71a35c473a93877761a15d3b73f760fa18ae6d22 /muse2/muse
parentb3102518d9f12ad2923e5e5409d6570030ae8ef5 (diff)
Restore support for Qt < 4.6
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/widgets/filedialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp
index 61737a71..e28c491f 100644
--- a/muse2/muse/widgets/filedialog.cpp
+++ b/muse2/muse/widgets/filedialog.cpp
@@ -169,10 +169,18 @@ MFileDialog::MFileDialog(const QString& dir,
showButtons = true;
spl->insertWidget(0,&buttons);
+
+ // Qt >= 4.6 allows us to select icons from the theme
+#if QT_VERSION >= 0x040600
buttons.globalButton->setIcon(QIcon::fromTheme("folder", QIcon(":/icons/global.xpm")));
buttons.userButton->setIcon(QIcon::fromTheme("user-home", QIcon(":/icons/user.xpm")));
buttons.projectButton->setIcon(QIcon::fromTheme("folder-sound", QIcon(":/icons/project.xpm")));
-
+#else
+ buttons.globalButton->setIcon(QIcon(":/icons/global.xpm"));
+ buttons.userButton->setIcon(QIcon(":/icons/user.xpm"));
+ buttons.projectButton->setIcon(QIcon(":/icons/project.xpm"));
+#endif
+
connect(buttons.globalButton, SIGNAL(toggled(bool)), this, SLOT(globalToggled(bool)));
connect(buttons.userButton, SIGNAL(toggled(bool)), this, SLOT(userToggled(bool)));
connect(buttons.projectButton, SIGNAL(toggled(bool)), this, SLOT(projectToggled(bool)));