changeset 187:be6f263fa0ab

Change include order to build on Linux
author lbarthelemy
date Mon, 26 Nov 2007 17:08:38 +0000
parents e841a24915ff
children 56c167f3648a
files base/Pitch.cpp base/Profiler.cpp base/RangeMapper.cpp base/StorageAdviser.cpp base/TempDirectory.cpp
diffstat 5 files changed, 37 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/base/Pitch.cpp	Mon Nov 26 14:39:16 2007 +0000
+++ b/base/Pitch.cpp	Mon Nov 26 17:08:38 2007 +0000
@@ -13,11 +13,13 @@
     COPYING included with this distribution for more information.
 */
 
+#include <cmath>
+
 #include "system/System.h"
 #include "Pitch.h"
 #include "Preferences.h"
 
-#include <cmath>
+
 
 float
 Pitch::getFrequencyForPitch(int midiPitch,
--- a/base/Profiler.cpp	Mon Nov 26 14:39:16 2007 +0000
+++ b/base/Profiler.cpp	Mon Nov 26 17:08:38 2007 +0000
@@ -20,13 +20,15 @@
 */
 
 #include <iostream>
-#include "Profiler.h"
 
 #include <vector>
 #include <algorithm>
 #include <set>
 #include <map>
 
+#include "Profiler.h"
+
+
 using std::cerr;
 using std::endl;
 
--- a/base/RangeMapper.cpp	Mon Nov 26 14:39:16 2007 +0000
+++ b/base/RangeMapper.cpp	Mon Nov 26 17:08:38 2007 +0000
@@ -13,14 +13,15 @@
     COPYING included with this distribution for more information.
 */
 
-#include "system/System.h"
-#include "RangeMapper.h"
 
 #include <cassert>
 #include <cmath>
 
 #include <iostream>
 
+#include "system/System.h"
+#include "RangeMapper.h"
+
 LinearRangeMapper::LinearRangeMapper(int minpos, int maxpos,
 				     float minval, float maxval,
                                      QString unit) :
--- a/base/StorageAdviser.cpp	Mon Nov 26 14:39:16 2007 +0000
+++ b/base/StorageAdviser.cpp	Mon Nov 26 17:08:38 2007 +0000
@@ -13,6 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
+#include <iostream>
+
 #include "StorageAdviser.h"
 
 #include "Exceptions.h"
@@ -20,7 +22,7 @@
 
 #include "system/System.h"
 
-#include <iostream>
+
 
 long StorageAdviser::m_discPlanned = 0;
 long StorageAdviser::m_memoryPlanned = 0;
--- a/base/TempDirectory.cpp	Mon Nov 26 14:39:16 2007 +0000
+++ b/base/TempDirectory.cpp	Mon Nov 26 17:08:38 2007 +0000
@@ -13,9 +13,7 @@
     COPYING included with this distribution for more information.
 */
 
-#include "TempDirectory.h"
-#include "system/System.h"
-#include "Exceptions.h"
+
 
 #include <QDir>
 #include <QFile>
@@ -25,6 +23,10 @@
 #include <iostream>
 #include <cassert>
 
+#include "TempDirectory.h"
+#include "system/System.h"
+#include "Exceptions.h"
+
 TempDirectory *
 TempDirectory::m_instance = new TempDirectory;
 
@@ -52,26 +54,26 @@
     cleanupDirectory("");
 }
 
-QString
-TempDirectory::getDir()
-{
-    QMutexLocker locker(&m_mutex);
-    
-    QString svDirBase = ".easaier";
-    QString svDir = QDir::home().filePath(svDirBase);
-    if (!QFileInfo(svDir).exists()) {
-        if (!QDir::home().mkdir(svDirBase)) {
-            throw DirectoryCreationFailed(QString("%1 directory in $HOME")
-                                          .arg(svDirBase));
-        }
-    } else if (!QFileInfo(svDir).isDir()) {
-        throw DirectoryCreationFailed(QString("$HOME/%1 is not a directory")
-                                      .arg(svDirBase));
-    }
-
-	cleanupAbandonedDirectories(svDir);
-
-    return svDir;
+QString
+TempDirectory::getDir()
+{
+    QMutexLocker locker(&m_mutex);
+    
+    QString svDirBase = ".easaier";
+    QString svDir = QDir::home().filePath(svDirBase);
+    if (!QFileInfo(svDir).exists()) {
+        if (!QDir::home().mkdir(svDirBase)) {
+            throw DirectoryCreationFailed(QString("%1 directory in $HOME")
+                                          .arg(svDirBase));
+        }
+    } else if (!QFileInfo(svDir).isDir()) {
+        throw DirectoryCreationFailed(QString("$HOME/%1 is not a directory")
+                                      .arg(svDirBase));
+    }
+
+	cleanupAbandonedDirectories(svDir);
+
+    return svDir;
 }
 
 QString