QmlDesigner: Allow .ui.qml file in component creation

Change-Id: I3ae5822820c365d0cbc7d679c6365a25f34b1637
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2016-09-29 15:38:29 +02:00
parent 920386220b
commit 5a3aa3fc3e
4 changed files with 23 additions and 4 deletions

View File

@@ -111,6 +111,8 @@ public:
QStringList result;
QStringList sourcePreview;
QString suffix;
if (!m_idName.isEmpty())
sourcePreview.append(QLatin1String(" id: ") + m_idName);
else
@@ -127,7 +129,7 @@ public:
foreach (const QString &property, sortedPropertiesWithoutId)
sourcePreview.append(QLatin1String(" ") + property + QLatin1String(": ") + propertyReader.readAstValue(property));
bool confirm = ComponentNameDialog::go(&componentName, &path,
const bool confirm = ComponentNameDialog::go(&componentName, &path, &suffix,
sortedPropertiesWithoutId,
sourcePreview,
QFileInfo(currentFileName).fileName(),
@@ -140,7 +142,7 @@ public:
return;
const QString newFileName = path + QLatin1Char('/') + componentName
+ QLatin1String(".qml");
+ QLatin1String(".") + suffix;
QString imports;
UiProgram *prog = currentFile->qmljsDocument()->qmlProgram();