forked from qt-creator/qt-creator
qml: fix refactoring to separate component
* avoid extra spaces * warn about existing files Fixes: QTCREATORBUG-21091 Change-Id: Ic9ed4444bd028455e1b2d1755e6c43f352dfd5e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -168,5 +168,8 @@ QString ComponentNameDialog::isValid() const
|
||||
if (!ui->pathEdit->isValid())
|
||||
return tr("Invalid path");
|
||||
|
||||
if (QDir(ui->pathEdit->path()).exists(compName + u".qml"))
|
||||
return tr("Component exists already");
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user