Commit 06d62e36 authored by Montel Laurent's avatar Montel Laurent Committed by Laurent Montel

Avoid to create empty code style name

Change-Id: I6f81aebecdb137c79d8a0a3c7d429f46672c24a6
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent a4c0712c
......@@ -272,7 +272,7 @@ void CodeStyleSelectorWidget::slotCopyClicked()
QLineEdit::Normal,
tr("%1 (Copy)").arg(currentPreferences->displayName()),
&ok);
if (!ok)
if (!ok || newName.trimmed().isEmpty())
return;
ICodeStylePreferences *copy = codeStylePool->cloneCodeStyle(currentPreferences);
if (copy) {
......
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