Procházet zdrojové kódy

Message Boxes: Force to be more on top #5503 (#5536)

Markus Goetz před 9 roky
rodič
revize
65d8f51a10
2 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 2 0
      src/gui/folder.cpp
  2. 1 0
      src/gui/owncloudgui.cpp

+ 2 - 0
src/gui/folder.cpp

@@ -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);
 

+ 1 - 0
src/gui/owncloudgui.cpp

@@ -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);