[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: quanta_be: quanta/quanta/treeviews
From: Andras Mantia <amantia () freemail ! hu>
Date: 2003-12-05 16:56:22
[Download RAW message or body]
CVS commit by amantia:
Treeview sort fix (visible only on some systems) by Jens.
M +17 -5 filestreeview.cpp 1.54.2.8
M +1 -0 filestreeview.h 1.25.2.4
--- quanta/quanta/treeviews/filestreeview.cpp #1.54.2.7:1.54.2.8
@@ -58,11 +58,23 @@ FilesTreeViewItem::FilesTreeViewItem( KF
QString FilesTreeViewItem::key(int column, bool ascending) const
{
- Q_UNUSED(ascending);
+ if (ascending)
if (isDir())
return text(column).prepend(" ");
else
return text(column);
+ else
+ if (isDir())
+ return text(column);
+ else
+ return text(column).prepend(" ");
}
+int FilesTreeViewItem::compare( QListViewItem *i, int col,
+ bool ascending ) const
+{
+ return key( col, ascending ).compare( i->key( col, ascending) );
+}
+
+
//FilesTreeBranch implementation
FilesTreeBranch::FilesTreeBranch(KFileTreeView *parent, const KURL& url,
--- quanta/quanta/treeviews/filestreeview.h #1.25.2.3:1.25.2.4
@@ -47,4 +47,5 @@ public:
/* sorts dirs seperat from files */
QString key (int column, bool ascending) const;
+ int compare( QListViewItem *i, int col, bool ascending ) const;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic