Skip to content
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
11 changes: 7 additions & 4 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3453,13 +3453,16 @@ void MainWindow::sendNotify(SaveAction saveAction, QString saveFilePath, const b
// QString fileDir = QUrl::fromLocalFile(QFileInfo(saveFilePath).absoluteDir().absolutePath()).toString();
// QString filePath = QUrl::fromLocalFile(saveFilePath).toString();

QString command, savepathcommand;

QStringList command, savepathcommand;
tips = QString(tr("Saved to %1")).arg(saveFilePath);
if (!QStandardPaths::findExecutable("dde-file-manager").isEmpty()) {
savepathcommand = QString("dde-file-manager,--show-item,%1").arg(saveFilePath);
savepathcommand << "dde-file-manager";
savepathcommand << "--show-item";
savepathcommand << saveFilePath;
}
command = QString("xdg-open,%1").arg(saveFilePath);
command << "xdg-open";
command << saveFilePath;
qDebug() << "command:" << command;

hints["x-deepin-action-_open"] = command;
Expand Down
4 changes: 2 additions & 2 deletions src/pin_screenshots/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ void MainWindow::sendNotify(QString savePath, bool bSaveState)
actions << "_open" << tr("View");
if (!QStandardPaths::findExecutable("dde-file-manager").isEmpty()) {
qDebug() << QFileInfo(savePath).path();
hints["x-deepin-action-_open"] = QString("dde-file-manager,--show-item,%1").arg(savePath);
hints["x-deepin-action-_open"] = QStringList{"dde-file-manager", "--show-item", savePath};
} else {
hints["x-deepin-action-_open"] = QString("xdg-open,%1").arg(savePath);
hints["x-deepin-action-_open"] = QStringList{"xdg-open", savePath};
}
body = QString(tr("Saved to %1")).arg(savePath);
}
Expand Down
4 changes: 2 additions & 2 deletions src/record_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ void RecordProcess::exitRecord(QString newSavePath)
actions << "_open1" << tr("Open Folder");

QVariantMap hints;
hints["x-deepin-action-_open"] = QString("xdg-open,%1").arg(newSavePath);
QString savepathcommand = QString("dde-file-manager,--show-item,%1").arg(newSavePath);
hints["x-deepin-action-_open"] = QStringList{"xdg-open", newSavePath};
QStringList savepathcommand = QStringList{"dde-file-manager", "--show-item", newSavePath};
hints["x-deepin-action-_open1"] = savepathcommand;
int timeout = -1;
unsigned int id = 0;
Expand Down