Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit e63fe0fa authored by Luigi Toscano's avatar Luigi Toscano

Check if the name returned by QInputDialog is not empty

Relevant difference from KInputDialog::getText: an empty value
is accepted. Thanks to Christoph Feck for noticing.

A similar change was not applied to the converted ::getItem
method because the logic is a bit different, and an empty or invalid
value was accepted.
parent 3d37f974
......@@ -1548,7 +1548,7 @@ void KImageMapEditor::mapEditName()
QString input = QInputDialog::getText(widget(),
i18n("Enter Map Name"), i18n("Enter the name of the map:"),
QLineEdit::Normal, _mapName, &ok);
if (ok) {
if (ok && !input.isEmpty()) {
if (input != _mapName) {
if (mapsListView->nameAlreadyExists(input))
KMessageBox::sorry(this->widget(), i18n("The name <em>%1</em> already exists.", input));
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