Skip to content

Commit

Permalink
fix(qt): explicitly create QString
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Nov 3, 2024
1 parent 8fee5f0 commit a86d80c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt.desktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ namespace saucer::modules

if (opts.initial)
{
dialog.setDirectory(opts.initial.value());
dialog.setDirectory(QString::fromStdString(opts.initial.value()));
}

const auto filters = opts.filters | std::ranges::to<QStringList>();
dialog.setNameFilters(filters);

dialog.exec();

const auto result = dialog.selectedFiles() | //
std::views::transform([](auto &&str) { return str.toStdString(); }) | //
std::ranges::to<std::vector<fs::path>>();
auto result = dialog.selectedFiles() | //
std::views::transform([](auto &&str) { return str.toStdString(); }) | //
std::ranges::to<std::vector<fs::path>>();

if (result.empty())
{
Expand Down

0 comments on commit a86d80c

Please sign in to comment.