summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagergui.cpp
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2013-11-06 12:45:23 +0100
committerTim Jenssen <tim.jenssen@digia.com>2013-11-06 16:51:35 +0100
commit016cdad413c878be9c669398cd707ff5d1d98255 (patch)
tree384a45a3ecd01fe5b071aca445dfca9cff59a731 /src/libs/installer/packagemanagergui.cpp
parent0e63df370ec23e793c0bfb27c469f2606fbf104a (diff)
Restart on the wizard needs to cleanup component left-overs
- use two different script engine instances - one which lives from the beginning -> the controlScriptEngine - the other one which will be reset if there are some new repositories loaded - now the core has a pointer to the gui object, but it should only be used by the script engine so a QObject type should be enough - engines are deleted as QObject children from the PackageManagerCore - registered downloaded archives are removed Change-Id: I60a4a32fb2e409059839ec11b10c57357454f57a Reviewed-by: Michal Klocek <michal.klocek@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r--src/libs/installer/packagemanagergui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index fc81ad9ff..98abefe75 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -285,7 +285,7 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
for (int i = QWizard::BackButton; i < QWizard::CustomButton1; ++i)
d->m_defaultButtonText.insert(i, buttonText(QWizard::WizardButton(i)));
- m_core->scriptEngine()->setGuiQObject(this);
+ m_core->setGuiObject(this);
}
PackageManagerGui::~PackageManagerGui()
@@ -354,7 +354,7 @@ void PackageManagerGui::setValidatorForCustomPageRequested(Component *component,
*/
void PackageManagerGui::loadControlScript(const QString &scriptPath)
{
- d->m_controlScriptContext = m_core->scriptEngine()->loadInConext(
+ d->m_controlScriptContext = m_core->controlScriptEngine()->loadInConext(
QLatin1String("Controller"), scriptPath);
qDebug() << "Loaded control script" << scriptPath;
}
@@ -364,7 +364,7 @@ void PackageManagerGui::callControlScriptMethod(const QString &methodName)
if (!d->m_controlScriptContext.isValid())
return;
try {
- QScriptValue returnValue = m_core->scriptEngine()->callScriptMethod(
+ QScriptValue returnValue = m_core->controlScriptEngine()->callScriptMethod(
d->m_controlScriptContext, methodName);
if (!returnValue.isValid()) {