summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r--src/libs/installer/component.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 2f75e4675..e13fa6602 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -454,8 +454,13 @@ void Component::loadTranslations(const QDir &directory, const QStringList &qms)
*/
void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis)
{
+#if QT_VERSION < 0x050000
if (QApplication::type() == QApplication::Tty)
return;
+#else
+ if (qobject_cast<QApplication*> (qApp) == 0)
+ return;
+#endif
QDirIterator it(directory.path(), uis, QDir::Files);
while (it.hasNext()) {