summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagergui.h
diff options
context:
space:
mode:
authorjkobus <jaroslaw.kobus@theqtcompany.com>2015-01-14 12:31:11 +0100
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-01-16 09:21:44 +0100
commitc0d51f59bc1db86fa477c0e753f4221cd1184bc7 (patch)
tree1fc9e78dbe730321eda4ee0ead57c0391f5716a0 /src/libs/installer/packagemanagergui.h
parent38f4c5bf9a3beaab8d6ddb75c4847418c4254d46 (diff)
Fix focus handling on the FinishedPage
Simplify entering() / leaving() implementation for wizard pages, above methods are now called a bit later, when the new page is already visible. Calling setFocus() inside entering() should work properly right now. Change-Id: Ic5d194f074cc4b1fc419c7be70563e105e644957 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagergui.h')
-rw-r--r--src/libs/installer/packagemanagergui.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libs/installer/packagemanagergui.h b/src/libs/installer/packagemanagergui.h
index 4aabc6514..11848b806 100644
--- a/src/libs/installer/packagemanagergui.h
+++ b/src/libs/installer/packagemanagergui.h
@@ -113,7 +113,6 @@ protected Q_SLOTS:
void wizardWidgetInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page);
void wizardWidgetRemovalRequested(QWidget *widget);
void wizardPageVisibilityChangeRequested(bool visible, int page);
- void executeControlScript(int pageId);
void setValidatorForCustomPageRequested(QInstaller::Component *component, const QString &name,
const QString &callbackName);
@@ -123,11 +122,13 @@ private Q_SLOTS:
void onLanguageChanged();
void customButtonClicked(int which);
void dependsOnLocalInstallerBinary();
+ void currentPageChanged(int newId);
protected:
bool event(QEvent *event);
void showEvent(QShowEvent *event);
PackageManagerCore *packageManagerCore() const { return m_core; }
+ void executeControlScript(int pageId);
private:
class Private;
@@ -179,22 +180,23 @@ protected:
virtual void insertWidget(QWidget *widget, const QString &siblingName, int offset = 1);
virtual QWidget *findWidget(const QString &objectName) const;
- virtual void setVisible(bool visible); // reimp
virtual int nextId() const; // reimp
+ // Used to support some kind of initializePage() in the case the wizard has been set
+ // to QWizard::IndependentPages. If that option has been set, initializePage() would be only
+ // called once. So we provide entering() and leaving() based on currentPageChanged() signal.
virtual void entering() {} // called on entering
virtual void leaving() {} // called on leaving
- bool isConstructing() const { return m_fresh; }
-
private:
- bool m_fresh;
bool m_complete;
QString m_titleColor;
bool m_needsSettingsButton;
PackageManagerCore *m_core;
QInstaller::Component *validatorComponent;
+
+ friend class PackageManagerGui;
};