diff options
| author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-03-08 14:55:39 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-11 15:07:13 +0100 |
| commit | 2eec5737c407cffe0bed8fac5c337b7b337da99e (patch) | |
| tree | eb3853f04baab84068516ce11e8f84db00559c51 /src | |
| parent | 4a1d18af6209db5795f53f736216b623ef5489ed (diff) | |
Fix crash in qmlplugindump.
Change-Id: Ib7c7ded7d8907076c97bd6efec408a8e508fdd72
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/private/qstyleitem.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/private/qstyleitem.cpp b/src/private/qstyleitem.cpp index 7de585aa3..913316f8f 100644 --- a/src/private/qstyleitem.cpp +++ b/src/private/qstyleitem.cpp @@ -132,7 +132,12 @@ QStyleItem::QStyleItem(QQuickItem *parent) m_contentHeight(0) { - if (!qApp->style()) { + // Check on QApplication, allowing for "qmlplugindump" to query our interfaces. + QCoreApplication *coreApp = QCoreApplication::instance(); + Q_ASSERT(coreApp); + if (!qobject_cast<QApplication *>(coreApp)) { + if (QCoreApplication::applicationFilePath().contains(QLatin1String("qmlplugindump"), Qt::CaseInsensitive)) + return; qWarning("\nError: No widget style available. \n\nQt Quick Controls" "currently depend on the widget module to function. \n" "Use QApplication when creating standalone executables.\n\n"); |
