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

This commit is contained in:
iaom 2024-06-26 13:42:02 +08:00
parent b424e70904
commit 91417a59b4
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) { if(FileUtils::openFile(key) == -1) {
QMessageBox msgBox(m_detailPage); QMessageBox msgBox(m_detailPage);
msgBox.setModal(true); msgBox.setModal(true);
msgBox.setWindowTitle(tr("ukui-search"));
msgBox.addButton(tr("OK"), QMessageBox::YesRole); msgBox.addButton(tr("OK"), QMessageBox::YesRole);
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));
@ -271,6 +272,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.setModal(true); msgBox.setModal(true);
msgBox.setWindowTitle(tr("ukui-search"));
msgBox.addButton(tr("OK"), QMessageBox::YesRole); msgBox.addButton(tr("OK"), QMessageBox::YesRole);
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));

View File

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