Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Unable to open pdf file by Okular #1666

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/dfm-base/mimetype/mimesappsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ void MimesAppsManager::initMimeTypeApps()
it.next();
const QString &filePath = it.filePath();
DesktopFile desktopFile(filePath);
if (desktopFile.isNoShow())
continue;

DesktopFiles.append(filePath);
DesktopObjs.insert(filePath, desktopFile);
QStringList mimeTypes = desktopFile.desktopMimeType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,12 @@ bool FileOperationsEventReceiver::handleOperationOpenFilesByApp(const quint64 wi
app = apps.at(0);
}
ok = fileHandler.openFilesByApp(urls, app);
if (!ok) {
error = fileHandler.errorString();
dialogManager->showErrorDialog("open file by app error", error);
}
if (!ok)
fmWarning() << "open file by app error: "
<< fileHandler.errorString()
<< " app name: "
<< app;

// TODO:: file openFilesByApp finished need to send file openFilesByApp finished event
dpfSignalDispatcher->publish(DFMBASE_NAMESPACE::GlobalEventType::kOpenFilesByAppResult, windowId, urls, ok, error);
return ok;
Expand Down