Diffstat (limited to 'noncore/apps/opie-sheet/sortdlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-sheet/sortdlg.cpp b/noncore/apps/opie-sheet/sortdlg.cpp index c60be0d..c2cdec8 100644 --- a/noncore/apps/opie-sheet/sortdlg.cpp +++ b/noncore/apps/opie-sheet/sortdlg.cpp | |||
@@ -14,13 +14,13 @@ | |||
14 | 14 | ||
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qradiobutton.h> | 16 | #include <qradiobutton.h> |
17 | #include <qmessagebox.h> | 17 | #include <qmessagebox.h> |
18 | #include "sortdlg.h" | 18 | #include "sortdlg.h" |
19 | 19 | ||
20 | SortDialog::SortDialog(QWidget *parent=0) | 20 | SortDialog::SortDialog(QWidget *parent) |
21 | :QDialog(parent, 0, TRUE) | 21 | :QDialog(parent, 0, TRUE) |
22 | { | 22 | { |
23 | // Main widget | 23 | // Main widget |
24 | tabs=new QTabWidget(this); | 24 | tabs=new QTabWidget(this); |
25 | widgetSort=new QWidget(tabs); | 25 | widgetSort=new QWidget(tabs); |
26 | widgetOptions=new QWidget(tabs); | 26 | widgetOptions=new QWidget(tabs); |
@@ -175,13 +175,14 @@ int SortDialog::exec(Sheet *s) | |||
175 | } | 175 | } |
176 | return QDialog::Accepted; | 176 | return QDialog::Accepted; |
177 | } | 177 | } |
178 | return QDialog::Rejected; | 178 | return QDialog::Rejected; |
179 | } | 179 | } |
180 | 180 | ||
181 | int SortDialog::compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE) | 181 | int SortDialog::compareItems(QTableItem *item1, QTableItem *item2, |
182 | int descending, bool caseSensitive) | ||
182 | { | 183 | { |
183 | int result=0; | 184 | int result=0; |
184 | if (item1) | 185 | if (item1) |
185 | { | 186 | { |
186 | if (item2) result=(caseSensitive ? item1->text().compare(item2->text()) : item1->text().upper().compare(item2->text().upper())); | 187 | if (item2) result=(caseSensitive ? item1->text().compare(item2->text()) : item1->text().upper().compare(item2->text().upper())); |
187 | else result=-1; | 188 | else result=-1; |