diff base/TempDirectory.cpp @ 86:e076e676439b

* Add file open/save operations to main toolbar * Allow opening any sort of file from toolbar file open function * First cut at on-disc cacheing for decoded mp3/ogg files * Permit un-snapped selection by holding Shift
author Chris Cannam
date Thu, 27 Apr 2006 17:29:19 +0000
parents b2067aff8cd6
children 604bd4ee3ed4
line wrap: on
line diff
--- a/base/TempDirectory.cpp	Thu Apr 27 11:49:34 2006 +0000
+++ b/base/TempDirectory.cpp	Thu Apr 27 17:29:19 2006 +0000
@@ -70,7 +70,8 @@
     
     if (m_tmpdir != "") return m_tmpdir;
 
-    QDir systemTempDir = QDir::temp();
+//!!!    QDir tempDirBase = QDir::temp();
+    QDir tempDirBase = QDir::home();
 
     // Generate a temporary directory.  Qt4.1 doesn't seem to be able
     // to do this for us, and mkdtemp is not standard.  This method is
@@ -98,8 +99,8 @@
 
         QString candidate = QString("sv_%1").arg(suffix);
 
-        if (QDir::temp().mkpath(candidate)) {
-            m_tmpdir = systemTempDir.filePath(candidate);
+        if (tempDirBase.mkpath(candidate)) {
+            m_tmpdir = tempDirBase.filePath(candidate);
             break;
         }
 
@@ -108,7 +109,7 @@
 
     if (m_tmpdir == "") {
         throw DirectoryCreationFailed(QString("temporary subdirectory in %1")
-                                      .arg(systemTempDir.canonicalPath()));
+                                      .arg(tempDirBase.canonicalPath()));
     }
 
     return m_tmpdir;