diff data/fft/FFTDataServer.cpp @ 387:7aa1de571880

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents 7cc6b7b0d819
children 115f60df1e4d
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp	Sat Mar 01 16:17:44 2008 +0000
+++ b/data/fft/FFTDataServer.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -27,9 +27,6 @@
 #include "base/Profiler.h"
 #include "base/Thread.h" // for debug mutex locker
 
-#include <QMessageBox>
-#include <QApplication>
-
 //#define DEBUG_FFT_SERVER 1
 //#define DEBUG_FFT_SERVER_FILL 1
 
@@ -851,19 +848,14 @@
             }
         }
 
-        if (cache) {
+        if (!cache) {
             std::cerr << "ERROR: Memory allocation failed when resizing"
                       << " FFT file cache no. " << c << " to " << width
                       << "x" << m_height << " (of total width " << m_width
                       << "): abandoning this cache" << std::endl;
+
+            throw AllocationFailed("Failed to create or resize an FFT model slice");
         }
-
-        //!!! Shouldn't be using QtGui here.  Need a better way to report this.
-        QMessageBox::critical
-            (0, QApplication::tr("FFT cache resize failed"),
-             QApplication::tr
-             ("Failed to create or resize an FFT model slice.\n"
-              "There may be insufficient memory or disc space to continue."));
     }
 
     m_caches[c] = cache;