summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component_p.cpp
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer.qnx@kdab.com>2012-04-24 16:22:39 +0200
committerKarsten Heimrich <karsten.heimrich@nokia.com>2012-04-25 12:15:31 +0200
commit9358fb8540feacf9b57d23e8341d6eb354267e99 (patch)
tree3161bb66c8c596b0a205e3ad3abb713c31adc968 /src/libs/installer/component_p.cpp
parent15b38ee5938208a5875e5f4c18d5ab73542a555f (diff)
Add QFileDialog::getExistingDirectory to Scripting
Make it possible to access QFileDialog::getExistingDirectory from installer script. Change-Id: I2cfa8cd9bba77580b4ed1ade46b56796839f7126 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'src/libs/installer/component_p.cpp')
-rw-r--r--src/libs/installer/component_p.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/installer/component_p.cpp b/src/libs/installer/component_p.cpp
index 4294ac8a8..df09ff50b 100644
--- a/src/libs/installer/component_p.cpp
+++ b/src/libs/installer/component_p.cpp
@@ -143,6 +143,10 @@ QScriptEngine *ComponentPrivate::scriptEngine()
m_scriptEngine->globalObject().setProperty(QLatin1String("QDesktopServices"), desktopServices);
m_scriptEngine->globalObject().setProperty(QLatin1String("component"), m_scriptEngine->newQObject(q));
+ QScriptValue fileDialog = m_scriptEngine->newArray();
+ fileDialog.setProperty(QLatin1String("getExistingDirectory"), m_scriptEngine->newFunction(qFileDialogGetExistingDirectory));
+ m_scriptEngine->globalObject().setProperty(QLatin1String("QFileDialog"), fileDialog);
+
return m_scriptEngine;
}