summaryrefslogtreecommitdiffstats
path: root/demos/spectrum
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-27 11:22:31 +0100
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-29 13:46:32 +0100
commitdd5ec222ce0285bd9419c9a47a8329bda41b5dd8 (patch)
tree46c10ff6e4f6237a659acb67817298016fdaf975 /demos/spectrum
parente78a4b092c86e56099dbed3c3f423028506129d5 (diff)
Set SpectrumAnalyserThread parent to 0 before calling moveToThread()
QObjects with a parent cannot be moved to a different thread.
Diffstat (limited to 'demos/spectrum')
-rw-r--r--demos/spectrum/app/spectrumanalyser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/spectrum/app/spectrumanalyser.cpp b/demos/spectrum/app/spectrumanalyser.cpp
index 1cc47a6661..2fa17b1433 100644
--- a/demos/spectrum/app/spectrumanalyser.cpp
+++ b/demos/spectrum/app/spectrumanalyser.cpp
@@ -64,6 +64,8 @@ SpectrumAnalyserThread::SpectrumAnalyserThread(QObject *parent)
#endif
{
#ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD
+ // moveToThread() cannot be called on a QObject with a parent
+ setParent(0);
moveToThread(m_thread);
m_thread->start();
#endif