Mercurial > hg > svcore
diff data/fileio/QuickTimeFileReader.cpp @ 327:1d656dcda8ef
* some tweaks to improve usability of these classes in a console application
author | Chris Cannam |
---|---|
date | Fri, 02 Nov 2007 16:50:31 +0000 |
parents | c324d410b096 |
children | 1afaf98dbf11 |
line wrap: on
line diff
--- a/data/fileio/QuickTimeFileReader.cpp Thu Nov 01 16:02:01 2007 +0000 +++ b/data/fileio/QuickTimeFileReader.cpp Fri Nov 02 16:50:31 2007 +0000 @@ -216,10 +216,12 @@ if (decodeMode == DecodeAtOnce) { - m_progress = new QProgressDialog - (QObject::tr("Decoding %1...").arg(QFileInfo(m_path).fileName()), - QObject::tr("Stop"), 0, 100); - m_progress->hide(); + if (dynamic_cast<QApplication *>(QCoreApplication::instance())) { + m_progress = new QProgressDialog + (QObject::tr("Decoding %1...").arg(QFileInfo(m_path).fileName()), + QObject::tr("Stop"), 0, 100); + m_progress->hide(); + } while (1) {