Commit b60612c0 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fixes: Naming glitch PagePage->Page

parent 9a1dce57
......@@ -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;
}
......
......@@ -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;
};
......
......@@ -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";
}
......
......@@ -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)) {
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment