Designer: Modernize

* Remove QLatin1{Char|String}
* Use member initialization
* Use range-for
* Use nullptr

Change-Id: I51c24c0a2066861f59731585f19d61b28c76c0a3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Andre Hartmann
2017-10-16 20:47:05 +02:00
committed by André Hartmann
parent 72c283afc8
commit 1d53110402
28 changed files with 161 additions and 184 deletions

View File

@@ -49,7 +49,7 @@ namespace Internal {
FormPageFactory::FormPageFactory()
{
setTypeIdsSuffix(QLatin1String("Form"));
setTypeIdsSuffix("Form");
}
Utils::WizardPage *FormPageFactory::create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
@@ -117,14 +117,14 @@ bool FormTemplateWizardPage::validatePage()
QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage);
return false;
}
wizard()->setProperty("FormContents", m_templateContents.split(QLatin1Char('\n')));
wizard()->setProperty("FormContents", m_templateContents.split('\n'));
return true;
}
QString FormTemplateWizardPage::stripNamespaces(const QString &className)
{
QString rc = className;
const int namespaceIndex = rc.lastIndexOf(QLatin1String("::"));
const int namespaceIndex = rc.lastIndexOf("::");
if (namespaceIndex != -1)
rc.remove(0, namespaceIndex + 2);
return rc;