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