From b60612c014bddf7c0315501253006612e02d5ccc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Thu, 22 Jan 2009 14:12:21 +0100 Subject: [PATCH] Fixes: Naming glitch PagePage->Page --- .../designer/cpp/formclasswizarddialog.cpp | 8 ++++---- .../designer/cpp/formclasswizarddialog.h | 4 ++-- .../designer/cpp/formclasswizardparameters.cpp | 4 ++-- .../designer/formtemplatewizardpage.cpp | 18 +++++++++--------- src/plugins/designer/formtemplatewizardpage.h | 6 +++--- src/plugins/designer/formwizarddialog.cpp | 6 +++--- src/plugins/designer/formwizarddialog.h | 4 ++-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/plugins/designer/cpp/formclasswizarddialog.cpp b/src/plugins/designer/cpp/formclasswizarddialog.cpp index 748e1b1d021..3dc30d9c83f 100644 --- a/src/plugins/designer/cpp/formclasswizarddialog.cpp +++ b/src/plugins/designer/cpp/formclasswizarddialog.cpp @@ -50,7 +50,7 @@ namespace Internal { FormClassWizardDialog::FormClassWizardDialog(const WizardPageList &extensionPages, QWidget *parent) : QWizard(parent), - m_formPage(new FormTemplateWizardPagePage), + m_formPage(new FormTemplateWizardPage), m_classPage(new FormClassWizardPage) { setWindowTitle(tr("Qt Designer Form Class")); @@ -97,8 +97,8 @@ void FormClassWizardDialog::slotCurrentIdChanged(int id) m_rawFormTemplate = m_formPage->templateContents(); // Strip namespaces from the ui class and suggest it as a new class // name - if (FormTemplateWizardPagePage::getUIXmlData(m_rawFormTemplate, &formBaseClass, &uiClassName)) - m_classPage->setClassName(FormTemplateWizardPagePage::stripNamespaces(uiClassName)); + if (FormTemplateWizardPage::getUIXmlData(m_rawFormTemplate, &formBaseClass, &uiClassName)) + m_classPage->setClassName(FormTemplateWizardPage::stripNamespaces(uiClassName)); } } @@ -107,7 +107,7 @@ FormClassWizardParameters FormClassWizardDialog::parameters() const FormClassWizardParameters rc; m_classPage->getParameters(&rc); // Name the ui class in the Ui namespace after the class specified - rc.uiTemplate = FormTemplateWizardPagePage::changeUiClassName(m_rawFormTemplate, rc.className); + rc.uiTemplate = FormTemplateWizardPage::changeUiClassName(m_rawFormTemplate, rc.className); return rc; } diff --git a/src/plugins/designer/cpp/formclasswizarddialog.h b/src/plugins/designer/cpp/formclasswizarddialog.h index 4c61e5f09c7..13a804fb2f1 100644 --- a/src/plugins/designer/cpp/formclasswizarddialog.h +++ b/src/plugins/designer/cpp/formclasswizarddialog.h @@ -45,7 +45,7 @@ namespace Internal { struct FormClassWizardParameters; class FormClassWizardPage; -class FormTemplateWizardPagePage; +class FormTemplateWizardPage; class FormClassWizardDialog : public QWizard { @@ -73,7 +73,7 @@ private slots: void slotCurrentIdChanged(int id); private: - FormTemplateWizardPagePage *m_formPage; + FormTemplateWizardPage *m_formPage; FormClassWizardPage *m_classPage; QString m_rawFormTemplate; }; diff --git a/src/plugins/designer/cpp/formclasswizardparameters.cpp b/src/plugins/designer/cpp/formclasswizardparameters.cpp index 81c67331de3..a5b2facf1d9 100644 --- a/src/plugins/designer/cpp/formclasswizardparameters.cpp +++ b/src/plugins/designer/cpp/formclasswizardparameters.cpp @@ -57,7 +57,7 @@ bool FormClassWizardParameters::generateCpp(QString *header, QString *source, in const QString indent = QString(indentation, QLatin1Char(' ')); QString formBaseClass; QString uiClassName; - if (!FormTemplateWizardPagePage::getUIXmlData(uiTemplate, &formBaseClass, &uiClassName)) { + if (!FormTemplateWizardPage::getUIXmlData(uiTemplate, &formBaseClass, &uiClassName)) { qWarning("Unable to determine the form base class from %s.", uiTemplate.toUtf8().constData()); return false; } @@ -107,7 +107,7 @@ bool FormClassWizardParameters::generateCpp(QString *header, QString *source, in if (embedding == PointerAggregatedUiClass) { headerStr << '\n' << namespaceIndent << "namespace " << uiNamespaceC << " {\n" - << namespaceIndent << indent << "class " << FormTemplateWizardPagePage::stripNamespaces(uiClassName) << ";\n" + << namespaceIndent << indent << "class " << FormTemplateWizardPage::stripNamespaces(uiClassName) << ";\n" << namespaceIndent << "}\n"; } diff --git a/src/plugins/designer/formtemplatewizardpage.cpp b/src/plugins/designer/formtemplatewizardpage.cpp index 4a8c9907009..aacda476a16 100644 --- a/src/plugins/designer/formtemplatewizardpage.cpp +++ b/src/plugins/designer/formtemplatewizardpage.cpp @@ -55,9 +55,9 @@ namespace Designer { namespace Internal { -// ----------------- FormTemplateWizardPagePage +// ----------------- FormTemplateWizardPage -FormTemplateWizardPagePage::FormTemplateWizardPagePage(QWidget * parent) : +FormTemplateWizardPage::FormTemplateWizardPage(QWidget * parent) : QWizardPage(parent), m_newFormWidget(QDesignerNewFormWidgetInterface::createNewFormWidget(FormEditorW::instance()->designerEditor())), m_templateSelected(m_newFormWidget->hasCurrentTemplate()) @@ -74,12 +74,12 @@ FormTemplateWizardPagePage::FormTemplateWizardPagePage(QWidget * parent) : setLayout(layout); } -bool FormTemplateWizardPagePage::isComplete() const +bool FormTemplateWizardPage::isComplete() const { return m_templateSelected; } -void FormTemplateWizardPagePage::slotCurrentTemplateChanged(bool templateSelected) +void FormTemplateWizardPage::slotCurrentTemplateChanged(bool templateSelected) { if (m_templateSelected == templateSelected) return; @@ -87,7 +87,7 @@ void FormTemplateWizardPagePage::slotCurrentTemplateChanged(bool templateSelecte emit completeChanged(); } -bool FormTemplateWizardPagePage::validatePage() +bool FormTemplateWizardPage::validatePage() { QString errorMessage; m_templateContents = m_newFormWidget->currentTemplate(&errorMessage); @@ -98,7 +98,7 @@ bool FormTemplateWizardPagePage::validatePage() return true; } -QString FormTemplateWizardPagePage::stripNamespaces(const QString &className) +QString FormTemplateWizardPage::stripNamespaces(const QString &className) { QString rc = className; const int namespaceIndex = rc.lastIndexOf(QLatin1String("::")); @@ -107,7 +107,7 @@ QString FormTemplateWizardPagePage::stripNamespaces(const QString &className) return rc; } -bool FormTemplateWizardPagePage::getUIXmlData(const QString &uiXml, +bool FormTemplateWizardPage::getUIXmlData(const QString &uiXml, QString *formBaseClass, QString *uiClassName) { @@ -179,7 +179,7 @@ static const char *classNameChangingSheetFormatC = "</xsl:template>\n" "</xsl:stylesheet>\n"; -QString FormTemplateWizardPagePage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) +QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) { // Prepare I/O: Sheet const QString xsltSheet = QString::fromLatin1(classNameChangingSheetFormatC).arg(newUiClassName); @@ -280,7 +280,7 @@ namespace { // of the <class> element, as name of the first <widget> element, and possibly // in the signal/slot connections -QString FormTemplateWizardPagePage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) +QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) { QDomDocument domUi; if (!domUi.setContent(uiXml)) { diff --git a/src/plugins/designer/formtemplatewizardpage.h b/src/plugins/designer/formtemplatewizardpage.h index 6b375386b58..3c62b4f15f8 100644 --- a/src/plugins/designer/formtemplatewizardpage.h +++ b/src/plugins/designer/formtemplatewizardpage.h @@ -46,12 +46,12 @@ namespace Internal { // A wizard page embedding Qt Designer's QDesignerNewFormWidgetInterface // widget. -class FormTemplateWizardPagePage : public QWizardPage +class FormTemplateWizardPage : public QWizardPage { - Q_DISABLE_COPY(FormTemplateWizardPagePage) + Q_DISABLE_COPY(FormTemplateWizardPage) Q_OBJECT public: - explicit FormTemplateWizardPagePage(QWidget * parent = 0); + explicit FormTemplateWizardPage(QWidget * parent = 0); virtual bool isComplete () const; virtual bool validatePage(); diff --git a/src/plugins/designer/formwizarddialog.cpp b/src/plugins/designer/formwizarddialog.cpp index d7905a56545..4fef805c2cc 100644 --- a/src/plugins/designer/formwizarddialog.cpp +++ b/src/plugins/designer/formwizarddialog.cpp @@ -53,7 +53,7 @@ namespace Internal { FormWizardDialog::FormWizardDialog(const WizardPageList &extensionPages, QWidget *parent) : QWizard(parent), - m_formPage(new FormTemplateWizardPagePage) + m_formPage(new FormTemplateWizardPage) { init(extensionPages); } @@ -114,8 +114,8 @@ void FormFileWizardDialog::slotCurrentIdChanged(int id) // the ui class QString formBaseClass; QString uiClassName; - if (FormTemplateWizardPagePage::getUIXmlData(templateContents(), &formBaseClass, &uiClassName)) { - QString fileName = FormTemplateWizardPagePage::stripNamespaces(uiClassName).toLower(); + if (FormTemplateWizardPage::getUIXmlData(templateContents(), &formBaseClass, &uiClassName)) { + QString fileName = FormTemplateWizardPage::stripNamespaces(uiClassName).toLower(); fileName += QLatin1String(".ui"); m_filePage->setName(fileName); } diff --git a/src/plugins/designer/formwizarddialog.h b/src/plugins/designer/formwizarddialog.h index 0ecd7274b1d..36069b34452 100644 --- a/src/plugins/designer/formwizarddialog.h +++ b/src/plugins/designer/formwizarddialog.h @@ -45,7 +45,7 @@ namespace Utils { namespace Designer { namespace Internal { -class FormTemplateWizardPagePage; +class FormTemplateWizardPage; // Single-Page Wizard for new forms offering all types known to Qt Designer. // To be used for Mode "CreateNewEditor" [not currently used] @@ -65,7 +65,7 @@ public: private: void init(const WizardPageList &extensionPages); - FormTemplateWizardPagePage *m_formPage; + FormTemplateWizardPage *m_formPage; mutable QString m_templateContents; }; -- GitLab