# HG changeset patch # User Tom Fredrik Blenning Klaussen # Date 1346960004 -7200 # Node ID fda70a362ed51135935e092b77d7c69d50ac1cd1 # Parent 44a3c32dd0cb322a76407bde990a7f14e4fa95c4 Remove whitespace. diff -r 44a3c32dd0cb -r fda70a362ed5 CMakeLists.txt --- a/CMakeLists.txt Thu Sep 06 21:32:33 2012 +0200 +++ b/CMakeLists.txt Thu Sep 06 21:33:24 2012 +0200 @@ -6,7 +6,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake_Modules/") SET(Boost_USE_STATIC_LIBS OFF) -SET(Boost_USE_MULTITHREADED ON) +SET(Boost_USE_MULTITHREADED ON) SET(Boost_USE_STATIC_RUNTIME OFF) FIND_PACKAGE(Boost COMPONENTS filesystem system) IF (Boost_FOUND) diff -r 44a3c32dd0cb -r fda70a362ed5 DBCache.hpp --- a/DBCache.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/DBCache.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -198,7 +198,7 @@ static QString restriction(const QString& prefix = QString()) { return SQLGenerator::restrict(prefix + "_1") + " AND " + - SQLGenerator::restrict(prefix + "_2"); + SQLGenerator::restrict(prefix + "_2"); } static QString valueString(const QString &prefix = QString()) @@ -297,7 +297,7 @@ } public: - DBCache(const QString& dbName, const QString& dictName) + DBCache(const QString& dbName, const QString& dictName) { db = QSqlDatabase::addDatabase("QSQLITE", "dictName"); db.setDatabaseName(dbName); @@ -306,7 +306,7 @@ setup(db, dictName); } - DBCache(const QSqlDatabase& db, const QString& dictName) + DBCache(const QSqlDatabase& db, const QString& dictName) { setup(db, dictName); } @@ -349,7 +349,7 @@ } insertQuery.finish(); } - + } private: diff -r 44a3c32dd0cb -r fda70a362ed5 DataController.cpp --- a/DataController.cpp Thu Sep 06 21:32:33 2012 +0200 +++ b/DataController.cpp Thu Sep 06 21:33:24 2012 +0200 @@ -110,7 +110,7 @@ } emit populateProgress(++n); - + QDateTime now = QDateTime::currentDateTime(); if (last.msecsTo(now) > 500) { QCoreApplication::processEvents(); @@ -127,7 +127,7 @@ item->setData(0, Qt::DisplayRole, info.name()); item->setData(0, 32, info.path()); item->setData(0, 33, info.name()); - + item->setData(1, Qt::DisplayRole, info.size()); item->setData(2, Qt::DisplayRole, info.mtime()); item->setData(3, Qt::DisplayRole, info.checksum().toHex()); @@ -168,7 +168,7 @@ tw->setUpdatesEnabled(false); - + QMultiMap > nameLUP; QMultiMap > sizeLUP; QMultiMap > mtimeLUP; @@ -278,7 +278,7 @@ item = createItem(*line); item->addChild(topLevelItem); } - + foreach(QSharedPointer dup, oList.values()) { topLevelItem->addChild(createItem(*dup)); } @@ -303,7 +303,7 @@ if (!contextMenu) { contextMenu = new QMenu(tw); QAction* deleteAction = contextMenu->addAction("Delete"); - connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteFile())); + connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteFile())); } contextMenu->popup(tw->mapToGlobal(point)); } @@ -383,7 +383,7 @@ mw->setCentralWidget(tw); tw->setEditTriggers(QAbstractItemView::NoEditTriggers); - tw->setHeaderLabels(QString("Path;Size;Date;Checksum").split(";")); + tw->setHeaderLabels(QString("Path;Size;Date;Checksum").split(";")); tw->setSortingEnabled(true); tw->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); @@ -444,7 +444,7 @@ void DataController::itemDoubleClicked (QTreeWidgetItem * item, int column) { QUrl url = QUrl::fromLocalFile(item->data(0, 32).toString()); - QDesktopServices::openUrl(url); + QDesktopServices::openUrl(url); } void DataController::setup(const QString& dbpath_in, const QString& searchPath_in, bool showGUI) diff -r 44a3c32dd0cb -r fda70a362ed5 DataController.hpp --- a/DataController.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/DataController.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -28,7 +28,7 @@ static void findFiles(const QDir& dir, QStringList& list); static QStringList findFiles(const QDir& dir); - void setDir(const QDir& dir); + void setDir(const QDir& dir); public: void buildDB(const QDir& dir); diff -r 44a3c32dd0cb -r fda70a362ed5 EditDistance.cpp --- a/EditDistance.cpp Thu Sep 06 21:32:33 2012 +0200 +++ b/EditDistance.cpp Thu Sep 06 21:33:24 2012 +0200 @@ -40,7 +40,7 @@ if (res) return *res; - + // Allocate distance matrix QList > d; QList temp; @@ -78,7 +78,7 @@ } } } - + // Return final value int retVal = d[a.size()][ b.size()]; cache->insert(lup, retVal); diff -r 44a3c32dd0cb -r fda70a362ed5 EditDistance.hpp --- a/EditDistance.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/EditDistance.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -21,7 +21,7 @@ static int Compute(QString a, QString b, bool removeDiacritics = false); static QString removeDiacritics(QString in); - //static cacheType cache; + //static cacheType cache; static cacheType* cache; }; diff -r 44a3c32dd0cb -r fda70a362ed5 FileDBLink.cpp --- a/FileDBLink.cpp Thu Sep 06 21:32:33 2012 +0200 +++ b/FileDBLink.cpp Thu Sep 06 21:33:24 2012 +0200 @@ -7,9 +7,9 @@ #include -#include +#include #include -#include +#include #include void FileDBLink::updateIfModified(const QString& path) @@ -54,7 +54,7 @@ default: throw IOException(errorMsg); } - } + } return hash.result(); } @@ -121,7 +121,7 @@ oList.insert(ptr->editDistance(), info); } return oList.values(); - + } } abort(); diff -r 44a3c32dd0cb -r fda70a362ed5 HuffmanSet.cpp --- a/HuffmanSet.cpp Thu Sep 06 21:32:33 2012 +0200 +++ b/HuffmanSet.cpp Thu Sep 06 21:33:24 2012 +0200 @@ -20,7 +20,7 @@ BitDecoder* HuffmanSet::createLut(const QMap& freqTable) { - QMultiMap freqs; + QMultiMap freqs; for(QMap::const_iterator it = freqTable.begin(); it != freqTable.end(); ++it) { freqs.insert(it.value(), new BitDecoder(it.key())); diff -r 44a3c32dd0cb -r fda70a362ed5 HuffmanString.cpp --- a/HuffmanString.cpp Thu Sep 06 21:32:33 2012 +0200 +++ b/HuffmanString.cpp Thu Sep 06 21:33:24 2012 +0200 @@ -8,7 +8,7 @@ if (!set) set = new HuffmanSet(); this->set = set; - + key = set->insert(str); } diff -r 44a3c32dd0cb -r fda70a362ed5 RBTree.hpp --- a/RBTree.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/RBTree.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -59,7 +59,7 @@ else return NULL; } - + RBTreeNode* uncle() { RBTreeNode* g = grandparent(); @@ -128,7 +128,7 @@ RBTreeNode* g = grandparent(); CONSISTENCY_CHECK(this); CONSISTENCY_CHECK(g); - + this->parent->setColor(BLACK); g->setColor(RED); if (this == this->parent->left) @@ -138,7 +138,7 @@ g->rotate_left(); } } - + void insert_case4() { RBTreeNode* g = grandparent(); @@ -167,7 +167,7 @@ RBTreeNode *u = uncle(); CONSISTENCY_CHECK(this); CONSISTENCY_CHECK(u); - + if ((u != NULL) && (u->color() == RED)) { this->parent->setColor(BLACK); u->setColor(BLACK); @@ -217,7 +217,7 @@ right->insert_case1(); } else - right->insert(data); + right->insert(data); } else { throw ValueExistsException(); @@ -260,7 +260,7 @@ return n + (left ? left->total_depth(n + 1) : 0) + (right ? right->total_depth(n + 1) : 0); } - bool consistent() const + bool consistent() const { bool retVal = true; if (left) @@ -283,8 +283,8 @@ { delete node; } - - bool consistent() const + + bool consistent() const { if (node == 0) return true; diff -r 44a3c32dd0cb -r fda70a362ed5 ThreadSafeLookup.hpp --- a/ThreadSafeLookup.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/ThreadSafeLookup.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -50,7 +50,7 @@ typename Locking::Locker_t lock(&masterLock); typename map_t::iterator c = map.find(key); bool exists = (c != map.end()); - + if (exists) { c.value() = value; } diff -r 44a3c32dd0cb -r fda70a362ed5 UniqueString.hpp --- a/UniqueString.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/UniqueString.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -9,14 +9,14 @@ { private: static QMap map; - + public: UniqueString(const QString& str) { if (!map.contains(str)) { map.insert(str, str); } - QString::operator=(map.value(str)); + QString::operator=(map.value(str)); } }; #elseif 0 @@ -32,7 +32,7 @@ QString myString; static QMap lup; static uint numInserts; - + public: QStringList chunk(const QString& str) {