修复没有默认打开方式时弹窗按钮为是而不是确定的问题。
This commit is contained in:
parent
2a22356e05
commit
360f991846
|
@ -92,8 +92,7 @@ void FileSearchPlugin::openAction(int actionkey, QString key, int type)
|
||||||
if(FileUtils::openFile(key) == -1) {
|
if(FileUtils::openFile(key) == -1) {
|
||||||
QMessageBox msgBox(m_detailPage);
|
QMessageBox msgBox(m_detailPage);
|
||||||
msgBox.setWindowModality(Qt::WindowModal);
|
msgBox.setWindowModality(Qt::WindowModal);
|
||||||
msgBox.setStandardButtons(QMessageBox::Yes);
|
msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||||
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
msgBox.setIcon(QMessageBox::Information);
|
||||||
msgBox.setText(tr("Can not get a default application for opening %1.").arg(key));
|
msgBox.setText(tr("Can not get a default application for opening %1.").arg(key));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
@ -204,8 +203,7 @@ void FileSearchPlugin::initDetailPage()
|
||||||
if(FileUtils::openFile(m_currentActionKey) == -1) {
|
if(FileUtils::openFile(m_currentActionKey) == -1) {
|
||||||
QMessageBox msgBox(m_detailPage);
|
QMessageBox msgBox(m_detailPage);
|
||||||
msgBox.setWindowModality(Qt::WindowModal);
|
msgBox.setWindowModality(Qt::WindowModal);
|
||||||
msgBox.setStandardButtons(QMessageBox::Yes);
|
msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||||
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
msgBox.setIcon(QMessageBox::Information);
|
||||||
msgBox.setText(tr("Can not get a default application for opening %1.").arg(m_currentActionKey));
|
msgBox.setText(tr("Can not get a default application for opening %1.").arg(m_currentActionKey));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
Loading…
Reference in New Issue