[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/apps/dolphin/src
From: Peter Penz <peter.penz () gmx ! at>
Date: 2008-08-03 10:01:55
Message-ID: 1217757715.347824.17222.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 841418 by ppenz:
Prevent that Konqueror crashs if pressing F2 (= Rename) although no items are \
selected. TODO: disable the rename action (and other selection dependent actions) \
when no items are selected.
BUG: 168183
M +6 -5 dolphinview.cpp
--- trunk/KDE/kdebase/apps/dolphin/src/dolphinview.cpp #841417:841418
@@ -522,7 +522,12 @@
void DolphinView::renameSelectedItems()
{
const KFileItemList items = selectedItems();
- if (items.count() > 1) {
+ const int itemCount = items.count();
+ if (itemCount < 1) {
+ return;
+ }
+
+ if (itemCount > 1) {
// More than one item has been selected for renaming. Open
// a rename dialog and rename all items afterwards.
RenameDialog dialog(this, items);
@@ -557,8 +562,6 @@
}
}
} else if (DolphinSettings::instance().generalSettings()->renameInline()) {
- Q_ASSERT(items.count() == 1);
-
if (isColumnViewActive()) {
m_columnView->editItem(items.first());
} else {
@@ -567,8 +570,6 @@
itemView()->edit(proxyIndex);
}
} else {
- Q_ASSERT(items.count() == 1);
-
RenameDialog dialog(this, items);
if (dialog.exec() == QDialog::Rejected) {
return;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic