mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 22:55:41 +08:00
refs #912, static utility function lastStepSkipped for configuration wizard
This commit is contained in:
committed by
Mathew Sutcliffe
parent
d214739912
commit
3575eed37b
@@ -50,6 +50,12 @@ namespace BlackGui
|
|||||||
return m_skipped;
|
return m_skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CConfigurationWizard::lastWizardStepSkipped(const QWizard *standardWizard)
|
||||||
|
{
|
||||||
|
const CConfigurationWizard *wizard = qobject_cast<const CConfigurationWizard *>(standardWizard);
|
||||||
|
return wizard && wizard->lastStepSkipped();
|
||||||
|
}
|
||||||
|
|
||||||
void CConfigurationWizard::wizardCurrentIdChanged(int id)
|
void CConfigurationWizard::wizardCurrentIdChanged(int id)
|
||||||
{
|
{
|
||||||
const int previousId = m_previousId;
|
const int previousId = m_previousId;
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace BlackGui
|
|||||||
//! Was the last step skipped?
|
//! Was the last step skipped?
|
||||||
bool lastStepSkipped() const;
|
bool lastStepSkipped() const;
|
||||||
|
|
||||||
|
//! Static version of CConfigurationWizard::lastStepSkipped
|
||||||
|
static bool lastWizardStepSkipped(const QWizard *standardWizard);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! The current page has changed
|
//! The current page has changed
|
||||||
void wizardCurrentIdChanged(int id);
|
void wizardCurrentIdChanged(int id);
|
||||||
|
|||||||
@@ -252,11 +252,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
bool CCopyConfigurationWizardPage::validatePage()
|
bool CCopyConfigurationWizardPage::validatePage()
|
||||||
{
|
{
|
||||||
CConfigurationWizard *wizard = qobject_cast<CConfigurationWizard *>(this->wizard());
|
if (CConfigurationWizard::lastWizardStepSkipped(this->wizard())) { return true; }
|
||||||
Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");
|
|
||||||
Q_ASSERT_X(wizard, Q_FUNC_INFO, "No wizard");
|
|
||||||
|
|
||||||
if (wizard->lastStepSkipped()) { return true; }
|
|
||||||
m_config->copySelectedFiles();
|
m_config->copySelectedFiles();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user