fix(filesearch):为打开没有默认打开方式的文件时的弹窗设置窗口标题

This commit is contained in:
iaom 2024-06-26 13:42:02 +08:00
parent 44986a3f1d
commit aef43bd5b6
2 changed files with 3 additions and 1 deletions

View File

@ -152,6 +152,7 @@ void FileSearchPlugin::openAction(int actionkey, QString key, int type)
if(FileUtils::openFile(key) == -1) {
QMessageBox msgBox(m_detailPage);
msgBox.setModal(true);
msgBox.setWindowTitle(tr("ukui-search"));
msgBox.addButton(tr("OK"), QMessageBox::YesRole);
msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("Can not get a default application for opening %1.").arg(key));
@ -271,6 +272,7 @@ void FileSearchPlugin::initDetailPage()
if(FileUtils::openFile(m_currentActionKey) == -1) {
QMessageBox msgBox(m_detailPage);
msgBox.setModal(true);
msgBox.setWindowTitle(tr("ukui-search"));
msgBox.addButton(tr("OK"), QMessageBox::YesRole);
msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("Can not get a default application for opening %1.").arg(m_currentActionKey));

View File

@ -50,7 +50,7 @@
<context>
<name>UkuiSearch::MainWindow</name>
<message>
<location filename="../../../frontend/mainwindow.cpp" line="73"/>
<location filename="../../../frontend/mainwindow.cpp" line="74"/>
<source>ukui-search</source>
<translation type="unfinished"></translation>
</message>