Skip to content

Commit

Permalink
Also filter out KDirSelectDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
equeim committed Nov 18, 2024
1 parent 80d8ec1 commit 18e289e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/screens/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ namespace tremotesf {

#ifndef Q_OS_MACOS
constexpr auto kdePlatformFileDialogClassName = "KDEPlatformFileDialog";
constexpr auto kDirSelectDialogClassName = "KDirSelectDialog";

[[nodiscard]] std::vector<QPointer<QWidget>> toQPointers(const QWidgetList& widgets) {
return {widgets.begin(), widgets.end()};
Expand Down Expand Up @@ -1492,7 +1493,8 @@ namespace tremotesf {
mOtherWindowsHiddenByUs.clear();
for (auto&& widget : toQPointers(qApp->topLevelWidgets())) {
if (widget != mWindow && widget->isWindow() && !widget->isHidden() &&
!widget->inherits(kdePlatformFileDialogClassName)) {
// These are managed by QFileDialog
!widget->inherits(kdePlatformFileDialogClassName) && !widget->inherits(kDirSelectDialogClassName)) {
info().log("Hiding {}", *widget);
widget->hide();
mOtherWindowsHiddenByUs.push_back(std::move(widget));
Expand Down

0 comments on commit 18e289e

Please sign in to comment.