aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/FilePage.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-19 12:10:17 +0000
committersaturneric <[email protected]>2024-01-19 12:10:17 +0000
commitf22ceca734868a4cb946c232f661aad72da01ded (patch)
tree5d858753ca06a8dfed12a92f4762e579900cfb1f /src/ui/widgets/FilePage.cpp
parentfix: slove discovered bugs (diff)
downloadGpgFrontend-f22ceca734868a4cb946c232f661aad72da01ded.tar.gz
GpgFrontend-f22ceca734868a4cb946c232f661aad72da01ded.zip
fix: slove discovered faults and bugs
Diffstat (limited to '')
-rw-r--r--src/ui/widgets/FilePage.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ui/widgets/FilePage.cpp b/src/ui/widgets/FilePage.cpp
index 27f4205f..c6260003 100644
--- a/src/ui/widgets/FilePage.cpp
+++ b/src/ui/widgets/FilePage.cpp
@@ -49,8 +49,7 @@ FilePage::FilePage(QWidget* parent, const QString& target_path)
connect(this->ui_->newDirButton, &QPushButton::clicked, file_tree_view_,
&FileTreeView::SlotMkdir);
- ui_->pathEdit->setText(
- QString::fromStdString(file_tree_view_->GetCurrentPath().u8string()));
+ ui_->pathEdit->setText(file_tree_view_->GetCurrentPath());
path_edit_completer_ = new QCompleter(this);
path_complete_model_ = new QStringListModel();
@@ -150,16 +149,11 @@ FilePage::FilePage(QWidget* parent, const QString& target_path)
}
auto FilePage::GetSelected() const -> QString {
- return QString::fromStdString(file_tree_view_->GetSelectedPath().string());
+ return file_tree_view_->GetSelectedPath();
}
void FilePage::SlotGoPath() {
-#ifdef WINDOWS
- std::filesystem::path target_path(ui_->pathEdit->text().toStdU16String());
-#else
- std::filesystem::path target_path(ui_->pathEdit->text().toStdString());
-#endif
- file_tree_view_->SlotGoPath(target_path);
+ file_tree_view_->SlotGoPath(ui_->pathEdit->text());
}
void FilePage::keyPressEvent(QKeyEvent* event) {