Changeset View
Changeset View
Standalone View
Standalone View
krusader/DiskUsage/diskusage.cpp
Show First 20 Lines • Show All 599 Lines • ▼ Show 20 Line(s) | 562 | { | |||
---|---|---|---|---|---|
600 | if (file->isDir()) { | 600 | if (file->isDir()) { | ||
601 | auto *dir = dynamic_cast<Directory *>(file); | 601 | auto *dir = dynamic_cast<Directory *>(file); | ||
602 | 602 | | |||
603 | Iterator<File> it; | 603 | Iterator<File> it; | ||
604 | while ((it = dir->iterator()) != dir->end()) | 604 | while ((it = dir->iterator()) != dir->end()) | ||
605 | deleteNr += del(*it, false, depth + 1); | 605 | deleteNr += del(*it, false, depth + 1); | ||
606 | 606 | | |||
607 | QString path; | 607 | QString path; | ||
608 | for (const Directory *d = (Directory*)file; d != root && d && d->parent() != nullptr; d = d->parent()) { | 608 | for (const Directory *d = dynamic_cast<Directory*>(file); d != root && d && d->parent() != nullptr; d = d->parent()) { | ||
609 | if (!path.isEmpty()) | 609 | if (!path.isEmpty()) | ||
610 | path = '/' + path; | 610 | path = '/' + path; | ||
611 | 611 | | |||
612 | path = d->name() + path; | 612 | path = d->name() + path; | ||
613 | } | 613 | } | ||
614 | 614 | | |||
615 | contentMap.remove(path); | 615 | contentMap.remove(path); | ||
616 | } | 616 | } | ||
▲ Show 20 Lines • Show All 475 Lines • ▼ Show 20 Line(s) | 1085 | if (deleting) { // if we are deleting, disable the mouse and | |||
1092 | case QEvent::KeyRelease: | 1092 | case QEvent::KeyRelease: | ||
1093 | return true; | 1093 | return true; | ||
1094 | default: | 1094 | default: | ||
1095 | break; | 1095 | break; | ||
1096 | } | 1096 | } | ||
1097 | } | 1097 | } | ||
1098 | 1098 | | |||
1099 | if (e->type() == QEvent::ShortcutOverride) { | 1099 | if (e->type() == QEvent::ShortcutOverride) { | ||
1100 | auto* ke = (QKeyEvent*) e; | 1100 | auto* ke = dynamic_cast<QKeyEvent*>( e); | ||
1101 | 1101 | | |||
1102 | if (ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::KeypadModifier) { | 1102 | if (ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::KeypadModifier) { | ||
1103 | switch (ke->key()) { | 1103 | switch (ke->key()) { | ||
1104 | case Qt::Key_Delete: | 1104 | case Qt::Key_Delete: | ||
1105 | case Qt::Key_Plus: | 1105 | case Qt::Key_Plus: | ||
1106 | case Qt::Key_Minus: | 1106 | case Qt::Key_Minus: | ||
1107 | ke->accept(); | 1107 | ke->accept(); | ||
1108 | break; | 1108 | break; | ||
Show All 27 Lines |