Message Boxes: Force to be more on top #5503 (#5536)
authorMarkus Goetz <markus@woboq.com>
Mon, 20 Feb 2017 12:58:35 +0000 (13:58 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2017 12:58:35 +0000 (13:58 +0100)
src/gui/folder.cpp
src/gui/owncloudgui.cpp

index 3bfb54cb0953923c2de6af6e69762e84ea25ef58..4eae28f67688c92845a99e1850ca4bc26dc6feae 100644 (file)
@@ -900,6 +900,7 @@ void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction dir, bool *cancel
             "If this was an accident and you decide to keep your files, they will be re-synced from the server.");
     QMessageBox msgBox(QMessageBox::Warning, tr("Remove All Files?"),
                        msg.arg(shortGuiLocalPath()));
+    msgBox.setWindowFlags(msgBox.windowFlags() | Qt::WindowStaysOnTopHint);
     msgBox.addButton(tr("Remove all files"), QMessageBox::DestructiveRole);
     QPushButton* keepBtn = msgBox.addButton(tr("Keep files"), QMessageBox::AcceptRole);
     if (msgBox.exec() == -1) {
@@ -924,6 +925,7 @@ void Folder::slotAboutToRestoreBackup(bool *restore)
            "Do you want to keep your local most recent files as conflict files?");
     QMessageBox msgBox(QMessageBox::Warning, tr("Backup detected"),
                        msg.arg(shortGuiLocalPath()));
+    msgBox.setWindowFlags(msgBox.windowFlags() | Qt::WindowStaysOnTopHint);
     msgBox.addButton(tr("Normal Synchronisation"), QMessageBox::DestructiveRole);
     QPushButton* keepBtn = msgBox.addButton(tr("Keep Local Files as Conflict"), QMessageBox::AcceptRole);
 
index 832297c6b9cee2a20e0ef082bd89ec41fb51b012..72d43ba26d7281d57102c8a74935e4297ad415b2 100644 (file)
@@ -924,6 +924,7 @@ void ownCloudGui::setPauseOnAllFoldersHelper(bool pause)
 void ownCloudGui::slotShowGuiMessage(const QString &title, const QString &message)
 {
     QMessageBox *msgBox = new QMessageBox;
+    msgBox->setWindowFlags(msgBox->windowFlags() | Qt::WindowStaysOnTopHint);
     msgBox->setAttribute(Qt::WA_DeleteOnClose);
     msgBox->setText(message);
     msgBox->setWindowTitle(title);