diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-25 13:15:08 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-25 13:15:08 (GMT) |
commit | 237c2afc0846224e00e5889c2c3ee8bde583689d (patch) | |
tree | 03235e40dbd29a8543ff8e4f6f4d7d154bc64b40 | |
parent | 8a993264ca8bd6273f1d5bb4288d64592d07760f (diff) | |
download | Qt-237c2afc0846224e00e5889c2c3ee8bde583689d.zip Qt-237c2afc0846224e00e5889c2c3ee8bde583689d.tar.gz Qt-237c2afc0846224e00e5889c2c3ee8bde583689d.tar.bz2 |
Desktopservices demo no longer attempts to play music files in emulator
Since Symbian emulator support for playing music files is spotty at
best, resulting in failure to launch at best and freezing
of the emulator at worst, disabled even trying to launch music files.
Task-number: QT-2047
Reviewed-by: Janne Koskinen
-rw-r--r-- | demos/embedded/desktopservices/contenttab.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp index 69b7cf8..d218702 100644 --- a/demos/embedded/desktopservices/contenttab.cpp +++ b/demos/embedded/desktopservices/contenttab.cpp @@ -145,9 +145,20 @@ void ContentTab::handleErrorInOpen(QListWidgetItem *item) // NEW SLOTS void ContentTab::openItem(QListWidgetItem *item) { - bool ret = QDesktopServices::openUrl(itemUrl(item)); - if (!ret) - handleErrorInOpen(item); +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // Opening music files doesn't work in Symbian emulator and in some SDKs freezes the + // emulator entirely, so prevent it. + QStringList nameFilters = m_ContentDir.nameFilters(); + if (nameFilters.contains("*.mp3")) { + QMessageBox::warning(this, tr("Operation Failed"), tr("Action not supported in emulator."), + QMessageBox::Close); + } else +#endif + { + bool ret = QDesktopServices::openUrl(itemUrl(item)); + if (!ret) + handleErrorInOpen(item); + } } |