aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/FilePage.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-07-13 12:57:24 +0000
committerSaturneric <[email protected]>2023-07-13 13:29:19 +0000
commit5425a62f8ea6d7678219fba961f2efc00a0cac38 (patch)
tree098a8d4717f46bc8ac5af59eddf80ff1a1a437cb /src/ui/widgets/FilePage.cpp
parentfix: solve compile issues (diff)
downloadGpgFrontend-5425a62f8ea6d7678219fba961f2efc00a0cac38.tar.gz
GpgFrontend-5425a62f8ea6d7678219fba961f2efc00a0cac38.zip
fix: solve a compile issue on windows platform
Diffstat (limited to 'src/ui/widgets/FilePage.cpp')
-rw-r--r--src/ui/widgets/FilePage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/widgets/FilePage.cpp b/src/ui/widgets/FilePage.cpp
index 59c4d0e0..b5243da0 100644
--- a/src/ui/widgets/FilePage.cpp
+++ b/src/ui/widgets/FilePage.cpp
@@ -360,12 +360,13 @@ void FilePage::slot_open_item() {
void FilePage::slot_open_item_by_system_application() {
QFileInfo info(QString::fromStdString(selected_path_.u8string()));
+ auto q_selected_path = QString::fromStdString(selected_path_.u8string());
if (info.isDir()) {
const auto file_path = info.filePath().toUtf8().toStdString();
- QDesktopServices::openUrl(QUrl::fromLocalFile(file_path.c_str()));
+ QDesktopServices::openUrl(QUrl::fromLocalFile(q_selected_path));
} else {
- QDesktopServices::openUrl(QUrl::fromLocalFile(selected_path_.c_str()));
+ QDesktopServices::openUrl(QUrl::fromLocalFile(q_selected_path));
}
}