summaryrefslogtreecommitdiff
path: root/muse2
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
parentb3102518d9f12ad2923e5e5409d6570030ae8ef5 (diff)
Restore support for Qt < 4.6
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/widgets/filedialog.cpp10
2 files changed, 10 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index daa83841..0bd63d4f 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -12,6 +12,7 @@
TODO: Qt4 does not support file preview in file dialogs yet. The relevant code (wallpaper
preview) is disabled. Now we either have to implement an image previewer, or forget about
this feature. (Orcan)
+ - Only try to use theme icons in file dialogs if Qt >= 4.6 (Orcan)
14.11.2010
- renamed deicsonze2 files and classes with '2' suffixes
- Applied patch by Orcan to convert populateAddSynth(). (Tim)
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)));