Delete all files: make the 'Keep' on by default
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 23 Oct 2015 15:06:14 +0000 (17:06 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Fri, 23 Oct 2015 15:06:14 +0000 (17:06 +0200)
On windows, we need to specify at least one AcceptRole.
Otherwise the DestructiveRole might become the default

Issue #3824

src/gui/folder.cpp

index fbd6a2adc2873dca9538b9c4621a11bc021c391b..53509edc85907ff31db68d4d3af22087bac98da8 100644 (file)
@@ -1142,7 +1142,7 @@ void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool *cancel)
     QMessageBox msgBox(QMessageBox::Warning, tr("Remove All Files?"),
                        msg.arg(alias()));
     msgBox.addButton(tr("Remove all files"), QMessageBox::DestructiveRole);
-    QPushButton* keepBtn = msgBox.addButton(tr("Keep files"), QMessageBox::ActionRole);
+    QPushButton* keepBtn = msgBox.addButton(tr("Keep files"), QMessageBox::AcceptRole);
     if (msgBox.exec() == -1) {
         *cancel = true;
         return;