From eb0b77035dcbf8fd3b3d3cd7f2a7da7037caa7a0 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Tue, 11 Apr 2023 10:52:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=89=93=E5=BC=80=E6=96=B9=E5=BC=8F=E6=97=B6=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=8C=89=E9=92=AE=E4=B8=BA=E6=98=AF=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E7=A1=AE=E5=AE=9A=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/index/file-search-plugin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libsearch/index/file-search-plugin.cpp b/libsearch/index/file-search-plugin.cpp index 558f8e8..eba1a9c 100644 --- a/libsearch/index/file-search-plugin.cpp +++ b/libsearch/index/file-search-plugin.cpp @@ -92,8 +92,7 @@ void FileSearchPlugin::openAction(int actionkey, QString key, int type) if(FileUtils::openFile(key) == -1) { QMessageBox msgBox(m_detailPage); msgBox.setWindowModality(Qt::WindowModal); - msgBox.setStandardButtons(QMessageBox::Yes); - msgBox.setButtonText(QMessageBox::Yes, tr("Yes")); + msgBox.addButton(tr("Yes"), QMessageBox::YesRole); msgBox.setIcon(QMessageBox::Information); msgBox.setText(tr("Can not get a default application for opening %1.").arg(key)); msgBox.exec(); @@ -204,8 +203,7 @@ void FileSearchPlugin::initDetailPage() if(FileUtils::openFile(m_currentActionKey) == -1) { QMessageBox msgBox(m_detailPage); msgBox.setWindowModality(Qt::WindowModal); - msgBox.setStandardButtons(QMessageBox::Yes); - msgBox.setButtonText(QMessageBox::Yes, tr("Yes")); + msgBox.addButton(tr("Yes"), QMessageBox::YesRole); msgBox.setIcon(QMessageBox::Information); msgBox.setText(tr("Can not get a default application for opening %1.").arg(m_currentActionKey)); msgBox.exec();