forked from qt-creator/qt-creator
Avoid to create empty code style name
Change-Id: I6f81aebecdb137c79d8a0a3c7d429f46672c24a6 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Laurent Montel
parent
a4c0712cb2
commit
06d62e36f3
@@ -272,7 +272,7 @@ void CodeStyleSelectorWidget::slotCopyClicked()
|
|||||||
QLineEdit::Normal,
|
QLineEdit::Normal,
|
||||||
tr("%1 (Copy)").arg(currentPreferences->displayName()),
|
tr("%1 (Copy)").arg(currentPreferences->displayName()),
|
||||||
&ok);
|
&ok);
|
||||||
if (!ok)
|
if (!ok || newName.trimmed().isEmpty())
|
||||||
return;
|
return;
|
||||||
ICodeStylePreferences *copy = codeStylePool->cloneCodeStyle(currentPreferences);
|
ICodeStylePreferences *copy = codeStylePool->cloneCodeStyle(currentPreferences);
|
||||||
if (copy) {
|
if (copy) {
|
||||||
|
|||||||
Reference in New Issue
Block a user