summaryrefslogtreecommitdiff
path: root/demos/embedded/desktopservices/contenttab.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-04 12:20:05 +0300
committerJanne Anttila <janne.anttila@digia.com>2009-08-04 12:20:05 +0300
commite3b1daaadf9daff424c71ddcf642986f1bc1be8c (patch)
treea9c61589570dc3379bc1f1696872705206003271 /demos/embedded/desktopservices/contenttab.cpp
parent567f66047a8f3d73297048a6eb389732de6f4f87 (diff)
downloadqt4-tools-e3b1daaadf9daff424c71ddcf642986f1bc1be8c.tar.gz
Fixed some Qt coding style deviations for desktopservices demo
Diffstat (limited to 'demos/embedded/desktopservices/contenttab.cpp')
-rw-r--r--demos/embedded/desktopservices/contenttab.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp
index 619f5c0be8..e2618b031d 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);
}