summaryrefslogtreecommitdiffstats
path: root/demos/embedded/desktopservices/linktab.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-06-15 07:28:31 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-06-15 07:28:31 (GMT)
commita612366300aef70d2574b3f738afebdb106f1214 (patch)
treed86fce2c281ce98873fd1a41216ebc1ba95c5b09 /demos/embedded/desktopservices/linktab.cpp
parent9b34c6dffcb19664e336d4b51092e042e861f475 (diff)
downloadQt-a612366300aef70d2574b3f738afebdb106f1214.zip
Qt-a612366300aef70d2574b3f738afebdb106f1214.tar.gz
Qt-a612366300aef70d2574b3f738afebdb106f1214.tar.bz2
Added error handling to qdesktopservices example when openUrl fails.
Now qdesktopservices example will show message box if openUrl call fails i.e. returns false.
Diffstat (limited to 'demos/embedded/desktopservices/linktab.cpp')
-rw-r--r--demos/embedded/desktopservices/linktab.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/demos/embedded/desktopservices/linktab.cpp b/demos/embedded/desktopservices/linktab.cpp
index b4ab308..58d1cc6 100644
--- a/demos/embedded/desktopservices/linktab.cpp
+++ b/demos/embedded/desktopservices/linktab.cpp
@@ -41,6 +41,7 @@
// EXTERNAL INCLUDES
#include <QUrl>
+#include <QMessageBox>
#include <QListWidgetItem>
// INTERNAL INCLUDES
@@ -75,5 +76,13 @@ QUrl LinkTab::itemUrl(QListWidgetItem *item)
return QUrl();
}
}
+void LinkTab::handleErrorInOpen(QListWidgetItem *item)
+{
+ if(m_MailToItem == item) {
+ QMessageBox::warning( this, tr("Operation Failed"), tr("Please check that you have\ne-mail accunt defined"), QMessageBox::Close);
+ } else {
+ ContentTab::handleErrorInOpen(item);
+ }
+}
// End of file