[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [patch] KListView::setRenameable
From: Richard Smith <kde () metafoo ! co ! uk>
Date: 2004-08-08 10:59:24
Message-ID: 200408081159.30313.kde () metafoo ! co ! uk
[Download RAW message or body]
Hi,
The attached patch cleans up (and speeds up) KListView::setRenameable
somewhat. Is this OK to commit (to HEAD only, of course), or should I sit on
it until the need for backports is diminished? BC, of course.
Thanks,
Richard
["klistview-setRenameable.diff" (text/x-diff)]
Index: klistview.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/klistview.cpp,v
retrieving revision 1.225
diff -u -3 -p -r1.225 klistview.cpp
--- klistview.cpp 2 Aug 2004 17:32:28 -0000 1.225
+++ klistview.cpp 8 Aug 2004 10:52:40 -0000
@@ -1349,15 +1349,13 @@ bool KListView::isRenameable (int col) c
return d->renameable.contains(col);
}
-void KListView::setRenameable (int col, bool yesno)
+void KListView::setRenameable (int col, bool renameable)
{
if (col>=header()->count()) return;
d->renameable.remove(col);
- if (yesno && d->renameable.find(col)==d->renameable.end())
+ if (renameable)
d->renameable+=col;
- else if (!yesno && d->renameable.find(col)!=d->renameable.end())
- d->renameable.remove(col);
}
void KListView::doneEditing(QListViewItem *item, int row)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic