aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-10-03 12:09:26 +0000
committerWeblate <noreply@weblate.org>2016-10-03 12:09:26 +0000
commitf836ad04f629640db6c8076bf335d849eed64294 (patch)
treeeecfd74a4d7ba31489c8d76c70f900dacd1541d5 /src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
parentTranslated using Weblate (l_FILEINFO@ja (generated)) (diff)
parentFix up some instability within lumina-fileinfo. (diff)
downloadlumina-f836ad04f629640db6c8076bf335d849eed64294.tar.gz
lumina-f836ad04f629640db6c8076bf335d849eed64294.tar.bz2
lumina-f836ad04f629640db6c8076bf335d849eed64294.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
index afbb98cc..fecd6180 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
@@ -181,49 +181,4 @@ protected:
};
-/*
- * Virtual class for managing the sort of folders/files items. The problem with base class is that it only manages texts fields and
- * we have dates and sizes.
- *
- * On this class, we overwrite the function operator<.
- */
-
-class CQTreeWidgetItem : public QTreeWidgetItem {
-public:
- CQTreeWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
- CQTreeWidgetItem(const QStringList & strings, int type = Type) : QTreeWidgetItem(strings, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, int type = Type) : QTreeWidgetItem(parent, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, int type = Type) : QTreeWidgetItem(parent, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {}
- virtual ~CQTreeWidgetItem() {}
- inline virtual bool operator<(const QTreeWidgetItem &tmp) const {
- int column = this->treeWidget()->sortColumn();
- // We are in date text
- if(column == DirWidget::DATEMOD || column == DirWidget::DATECREATE)
- return this->whatsThis(column) < tmp.whatsThis(column);
- // We are in size text
- else if(column == DirWidget::SIZE) {
- QString text = this->text(column);
- QString text_tmp = tmp.text(column);
- double filesize, filesize_tmp;
- // On folders, text is empty so we check for that
- // In case we are in folders, we put -1 for differentiate of regular files with 0 bytes.
- // Doing so, all folders we'll be together instead of mixing with files with 0 bytes.
- if(text.isEmpty())
- filesize = -1;
- else
- filesize = LUtils::DisplaySizeToBytes(text);
- if(text_tmp.isEmpty())
- filesize_tmp = -1;
- else
- filesize_tmp = LUtils::DisplaySizeToBytes(text_tmp);
- return filesize < filesize_tmp;
- }
- // In other cases, we trust base class implementation
- return QTreeWidgetItem::operator<(tmp);
- }
-};
#endif
bgstack15