From c8a12c10bba1a74282e84f7613d76912c419cd35 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 14 Feb 2014 15:51:19 +0100 Subject: Fix size filter in Archive Browser The size filter filtered more than selectedSize in the statusBar suggested, because it used a differet size. Fix it by using a #define everywhere. --- archivebrowsermodel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archivebrowsermodel.cpp') diff --git a/archivebrowsermodel.cpp b/archivebrowsermodel.cpp index 08a0752..5da95f1 100644 --- a/archivebrowsermodel.cpp +++ b/archivebrowsermodel.cpp @@ -11,6 +11,7 @@ #include "archivebrowsermodel.h" #include "smtreeitem.h" +#include "smglobals.h" #include "helper.h" ArchiveBrowserModel::ArchiveBrowserModel(const QStringList &headers, QObject *parent) : SmTreeModel(headers, parent), mNumFields(8) { @@ -52,10 +53,10 @@ QVariant ArchiveBrowserModel::data(const QModelIndex &index, int role) const { if(col == TotalSize){ qint64 s = item->data(TotalSize).toDouble(); QColor retval = Qt::green; - if(s > Q_INT64_C(1024 * 1024 * 1024 * 2)){ + if(s > DVDSIZE){ retval = Qt::cyan; } - if(s > Q_INT64_C(1024 * 1024 * 1024 * 4)){ + if(s > DVDSIZE){ retval = Qt::red; } return retval; -- cgit v1.2.3-70-g09d2