From 856d83fb194ca26099e38aaf5e5f4a022d3d23fa Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 5 Dec 2010 08:41:50 +0100 Subject: Code cleanup Remove debug statements from FileSystemWidget. Also remove useless helper func StringListContains. That was a goodie. I guess I was quite drunk when I wrote that... --- filesystemwidget.cpp | 11 +---------- helper.cpp | 4 ---- helper.h | 4 ---- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/filesystemwidget.cpp b/filesystemwidget.cpp index ff73863..8b302dc 100644 --- a/filesystemwidget.cpp +++ b/filesystemwidget.cpp @@ -25,12 +25,6 @@ #include #include -//debug -#include -#include - -#include - #include "filesystemwidget.h" #include "filesystemdirproxy.h" #include "fileview.h" @@ -632,10 +626,7 @@ void FileSystemModel::markAsSeen(const QString &path, bool seen){ return; } mMarkAsSeenQuery->bindValue(":path", path); - bool ok = mMarkAsSeenQuery->exec(); - if(!ok){ - qDebug() << mMarkAsSeenQuery->lastError().text(); - } + mMarkAsSeenQuery->exec(); mSeen.insert(path, QDateTime::currentDateTime()); }else{ mDeleteFromSeenQuery->bindValue(":path", path); diff --git a/helper.cpp b/helper.cpp index dff3584..fdab083 100644 --- a/helper.cpp +++ b/helper.cpp @@ -164,10 +164,6 @@ namespace Helper { return retval; } - bool StringListContains::operator()(const QString s, const QString &part) const { - return s.contains(part); - } - bool SortFileInfoList::operator ()(const QFileInfo &lhs, const QFileInfo &rhs) const { return lhs.fileName().toLower() < rhs.fileName().toLower(); } diff --git a/helper.h b/helper.h index 96816b2..3d01131 100644 --- a/helper.h +++ b/helper.h @@ -24,10 +24,6 @@ namespace Helper { const QString createArchivePath(const QString &path, const QString &md5, bool withMd5 = false); QPair programData(const QString &prefix, const QString &preferred = QString()); QString durationFromSecs(qint64 secs); - class StringListContains : public std::binary_function { - public: - bool operator()(const QString s, const QString &part) const; - }; class SortFileInfoList : public std::binary_function { public: bool operator()(const QFileInfo &lhs, const QFileInfo &rhs) const; -- cgit v1.2.3-70-g09d2