mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Merge pull request #857 from Arakmar/hiddenFix
Don't add empty entries in hidden files editor with an empty string or when cancel is clicked
This commit is contained in:
commit
f4da7f1fb0
1 changed files with 8 additions and 1 deletions
|
@ -101,7 +101,14 @@ void IgnoreListEditor::slotUpdateLocalIgnoreList()
|
|||
|
||||
void IgnoreListEditor::slotAddPattern()
|
||||
{
|
||||
QString pattern = QInputDialog::getText(this, tr("Add Ignore Pattern"), tr("Add a new ignore pattern:"));
|
||||
bool okClicked;
|
||||
QString pattern = QInputDialog::getText(this, tr("Add Ignore Pattern"),
|
||||
tr("Add a new ignore pattern:"),
|
||||
QLineEdit::Normal, QString(), &okClicked);
|
||||
|
||||
if (!okClicked || pattern.isEmpty())
|
||||
return;
|
||||
|
||||
QListWidgetItem *item = new QListWidgetItem;
|
||||
setupItemFlags(item);
|
||||
if (pattern.startsWith("]")) {
|
||||
|
|
Loading…
Reference in a new issue