summaryrefslogtreecommitdiffstats
path: root/demos/embedded/desktopservices
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-04 09:20:05 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-04 09:20:05 (GMT)
commite3b1daaadf9daff424c71ddcf642986f1bc1be8c (patch)
treea9c61589570dc3379bc1f1696872705206003271 /demos/embedded/desktopservices
parent567f66047a8f3d73297048a6eb389732de6f4f87 (diff)
downloadQt-e3b1daaadf9daff424c71ddcf642986f1bc1be8c.zip
Qt-e3b1daaadf9daff424c71ddcf642986f1bc1be8c.tar.gz
Qt-e3b1daaadf9daff424c71ddcf642986f1bc1be8c.tar.bz2
Fixed some Qt coding style deviations for desktopservices demo
Diffstat (limited to 'demos/embedded/desktopservices')
-rw-r--r--demos/embedded/desktopservices/contenttab.cpp18
-rw-r--r--demos/embedded/desktopservices/linktab.cpp10
2 files changed, 14 insertions, 14 deletions
diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp
index 619f5c0..e2618b0 100644
--- a/demos/embedded/desktopservices/contenttab.cpp
+++ b/demos/embedded/desktopservices/contenttab.cpp
@@ -55,7 +55,7 @@
// CONSTRUCTORS & DESTRUCTORS
ContentTab::ContentTab(QWidget *parent) :
- QListWidget(parent)
+ QListWidget(parent)
{
setDragEnabled(false);
setIconSize(QSize(45, 45));
@@ -113,19 +113,19 @@ QUrl ContentTab::itemUrl(QListWidgetItem *item)
void ContentTab::keyPressEvent(QKeyEvent *event)
{
- switch(event->key()) {
+ switch (event->key()) {
case Qt::Key_Up:
- if(currentRow() == 0) {
- setCurrentRow(count()-1);
+ if (currentRow() == 0) {
+ setCurrentRow(count() - 1);
} else {
- setCurrentRow(currentRow()-1);
+ setCurrentRow(currentRow() - 1);
}
break;
case Qt::Key_Down:
- if(currentRow() == (count()-1)) {
+ if (currentRow() == (count() - 1)) {
setCurrentRow(0);
} else {
- setCurrentRow(currentRow()+1);
+ setCurrentRow(currentRow() + 1);
}
break;
case Qt::Key_Select:
@@ -139,14 +139,14 @@ void ContentTab::keyPressEvent(QKeyEvent *event)
void ContentTab::handleErrorInOpen(QListWidgetItem *item)
{
Q_UNUSED(item);
- QMessageBox::warning( this, tr("Operation Failed"), tr("Unkown error!"), QMessageBox::Close);
+ QMessageBox::warning(this, tr("Operation Failed"), tr("Unkown error!"), QMessageBox::Close);
}
// NEW SLOTS
void ContentTab::openItem(QListWidgetItem *item)
{
bool ret = QDesktopServices::openUrl(itemUrl(item));
- if(!ret)
+ if (!ret)
handleErrorInOpen(item);
}
diff --git a/demos/embedded/desktopservices/linktab.cpp b/demos/embedded/desktopservices/linktab.cpp
index 32411fe..67dbccf 100644
--- a/demos/embedded/desktopservices/linktab.cpp
+++ b/demos/embedded/desktopservices/linktab.cpp
@@ -50,7 +50,7 @@
#include "linktab.h"
LinkTab::LinkTab(QWidget *parent) :
- ContentTab(parent)
+ ContentTab(parent)
{
}
@@ -66,9 +66,9 @@ void LinkTab::populateListWidget()
QUrl LinkTab::itemUrl(QListWidgetItem *item)
{
- if(m_WebItem == item) {
+ if (m_WebItem == item) {
return QUrl(tr("http://www.qtsoftware.com"));
- } else if(m_MailToItem == item) {
+ } else if (m_MailToItem == item) {
return QUrl(tr("mailto:qts60-feedback@trolltech.com?subject=QtS60 feedback&body=Hello"));
} else {
// We should never endup here
@@ -78,8 +78,8 @@ QUrl LinkTab::itemUrl(QListWidgetItem *item)
}
void LinkTab::handleErrorInOpen(QListWidgetItem *item)
{
- if(m_MailToItem == item) {
- QMessageBox::warning( this, tr("Operation Failed"), tr("Please check that you have\ne-mail account defined."), QMessageBox::Close);
+ if (m_MailToItem == item) {
+ QMessageBox::warning(this, tr("Operation Failed"), tr("Please check that you have\ne-mail account defined."), QMessageBox::Close);
} else {
ContentTab::handleErrorInOpen(item);
}