break;
case KDialog::No:
// Close only the current tab
- closeTab();
+ closeTab();
default:
event->ignore();
return;
// openNewTab() needs to be called only tabCount - 1 times
if (i != tabCount - 1) {
- openNewTab();
+ openNewTab();
}
}
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()
QAccessible::State state = Normal;
if (isSelected()) {
- state |= Selected;
+ state |= Selected;
}
if (m_view->controller()->selectionManager()->currentItem() == m_index) {
{
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));
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)
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;
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()