changeset 34:fda70a362ed5

Remove whitespace.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Thu, 06 Sep 2012 21:33:24 +0200
parents 44a3c32dd0cb
children 769f43c4c5d0
files CMakeLists.txt DBCache.hpp DataController.cpp DataController.hpp EditDistance.cpp EditDistance.hpp FileDBLink.cpp HuffmanSet.cpp HuffmanString.cpp RBTree.hpp ThreadSafeLookup.hpp UniqueString.hpp
diffstat 12 files changed, 34 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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<T>::restrict(prefix + "_1") + " AND " +
-      SQLGenerator<T>::restrict(prefix + "_2");    
+      SQLGenerator<T>::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:
--- 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<QString, QSharedPointer<FileDBLink::DBInfo> > nameLUP;
   QMultiMap<quint64, QSharedPointer<FileDBLink::DBInfo> > sizeLUP;
   QMultiMap<QDateTime, QSharedPointer<FileDBLink::DBInfo> > mtimeLUP;
@@ -278,7 +278,7 @@
 	  item = createItem(*line);
 	item->addChild(topLevelItem);
       }
-      
+
       foreach(QSharedPointer<FileDBLink::DBInfo> 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)
--- 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);
--- 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<QList<int> > d;
   QList<int> temp;
@@ -78,7 +78,7 @@
 	    }
 	}
     }
-  
+
   // Return final value
   int retVal = d[a.size()][ b.size()];
   cache->insert(lup, retVal);
--- 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;
 };
 
--- 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 <boost/bind.hpp>
 
-#include <algorithm> 
+#include <algorithm>
 #include <cassert>
-#include <functional> 
+#include <functional>
 #include <iostream>
 
 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();
--- 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<QString, uint>& freqTable)
 {
-  QMultiMap<uint, BitDecoder* > freqs;    
+  QMultiMap<uint, BitDecoder* > freqs;
   for(QMap<QString, uint>::const_iterator it = freqTable.begin();
       it != freqTable.end(); ++it) {
     freqs.insert(it.value(), new BitDecoder(it.key()));
--- 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);
 }
 
--- 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;
--- 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<isLocking>::Locker_t lock(&masterLock);
     typename map_t::iterator c = map.find(key);
     bool exists = (c != map.end());
-    
+
     if (exists) {
       c.value() = value;
     }
--- 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<QString, QString> 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<QString, int> lup;
   static uint numInserts;
-  
+
 public:
   QStringList chunk(const QString& str)
   {