From: Frank Reininghaus Date: Tue, 30 Oct 2012 07:25:21 +0000 (+0100) Subject: Fix some indentation issues X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/1353c92cce7ebc805b51d90f0bbb0c95dca0f2cb Fix some indentation issues --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index b4a25a7cf..11e03d0f1 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -617,7 +617,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) break; case KDialog::No: // Close only the current tab - closeTab(); + closeTab(); default: event->ignore(); return; @@ -683,7 +683,7 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group) // openNewTab() needs to be called only tabCount - 1 times if (i != tabCount - 1) { - openNewTab(); + openNewTab(); } } diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index f2ae37556..3c60b8e43 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1438,9 +1438,9 @@ void KItemListView::triggerAutoScrolling() const qreal newScrollOffset = qMin(scrollOffset() + m_autoScrollIncrement, maxVisibleOffset); setScrollOffset(newScrollOffset); - // Trigger the autoscroll timer which will periodically call - // triggerAutoScrolling() - m_autoScrollTimer->start(RepeatingAutoScrollDelay); + // Trigger the autoscroll timer which will periodically call + // triggerAutoScrolling() + m_autoScrollTimer->start(RepeatingAutoScrollDelay); } void KItemListView::slotGeometryOfGroupHeaderParentChanged() diff --git a/src/kitemviews/kitemlistviewaccessible.cpp b/src/kitemviews/kitemlistviewaccessible.cpp index a9ec69b43..d4b8bf6e6 100644 --- a/src/kitemviews/kitemlistviewaccessible.cpp +++ b/src/kitemviews/kitemlistviewaccessible.cpp @@ -362,7 +362,7 @@ QAccessible::State KItemListAccessibleCell::state(int child) const QAccessible::State state = Normal; if (isSelected()) { - state |= Selected; + state |= Selected; } if (m_view->controller()->selectionManager()->currentItem() == m_index) { diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index c49031a41..3dccfcc7d 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -601,8 +601,8 @@ void KStandardItemListWidget::editedRoleChanged(const QByteArray& current, const { Q_UNUSED(previous); - QGraphicsView* parent = scene()->views()[0]; - if (current.isEmpty() || !parent || current != "text") { + QGraphicsView* parent = scene()->views()[0]; + if (current.isEmpty() || !parent || current != "text") { if (m_roleEditor) { emit roleEditingCanceled(index(), current, data().value(current)); diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 31285aea2..a37c17fd8 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -578,14 +578,14 @@ void PlacesItemModel::slotDeviceRemoved(const QString& udi) delete item; return; } - } - - for (int i = 0; i < count(); ++i) { - if (placesItem(i)->udi() == udi) { - removeItem(i); - return; - } - } + } + + for (int i = 0; i < count(); ++i) { + if (placesItem(i)->udi() == udi) { + removeItem(i); + return; + } + } } void PlacesItemModel::slotStorageTeardownDone(Solid::ErrorType error, const QVariant& errorData) diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index 65c28ce75..9d53ea7e6 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -28,20 +28,20 @@ void myMessageOutput(QtMsgType type, const char* msg) { switch (type) { - case QtDebugMsg: - break; - case QtWarningMsg: - break; - case QtCriticalMsg: - fprintf(stderr, "Critical: %s\n", msg); - break; - case QtFatalMsg: - fprintf(stderr, "Fatal: %s\n", msg); - abort(); - default: + case QtDebugMsg: break; + case QtWarningMsg: + break; + case QtCriticalMsg: + fprintf(stderr, "Critical: %s\n", msg); + break; + case QtFatalMsg: + fprintf(stderr, "Fatal: %s\n", msg); + abort(); + default: + break; } - } +} namespace { const int DefaultTimeout = 5000; diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 67045032d..5b3d074c9 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -635,25 +635,25 @@ void DolphinView::clearSelection() void DolphinView::renameSelectedItems() { const KFileItemList items = selectedItems(); - if (items.isEmpty()) { - return; - } - - if (items.count() == 1 && GeneralSettings::renameInline()) { - const int index = m_model->index(items.first()); - m_view->editRole(index, "text"); - } else { - RenameDialog* dialog = new RenameDialog(this, items); - dialog->setAttribute(Qt::WA_DeleteOnClose); - dialog->show(); - dialog->raise(); - dialog->activateWindow(); - } - - // Assure that the current index remains visible when KFileItemModel - // will notify the view about changed items (which might result in - // a changed sorting). - m_assureVisibleCurrentIndex = true; + if (items.isEmpty()) { + return; + } + + if (items.count() == 1 && GeneralSettings::renameInline()) { + const int index = m_model->index(items.first()); + m_view->editRole(index, "text"); + } else { + RenameDialog* dialog = new RenameDialog(this, items); + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->show(); + dialog->raise(); + dialog->activateWindow(); + } + + // Assure that the current index remains visible when KFileItemModel + // will notify the view about changed items (which might result in + // a changed sorting). + m_assureVisibleCurrentIndex = true; } void DolphinView::trashSelectedItems()