From df8e6b9f9674336532fb66aa6644031a8845ef1c Mon Sep 17 00:00:00 2001 From: PYRET1C <88980503+PYRET1C@users.noreply.github.com> Date: Fri, 14 Apr 2023 17:21:45 +0530 Subject: [PATCH] Revert "this commit changed the QFileDialog::getOpenFileName to misc::getOpenFileName" This reverts commit 5fae434f03d5e4eccb0abbf0573e40006cac9a00. --- build_scripts/Windows-msys2/build.bat | 4 ++-- libretroshare | 2 +- retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build_scripts/Windows-msys2/build.bat b/build_scripts/Windows-msys2/build.bat index cfccc3e53..529a1350f 100644 --- a/build_scripts/Windows-msys2/build.bat +++ b/build_scripts/Windows-msys2/build.bat @@ -9,11 +9,11 @@ call "%EnvPath%\env.bat" if errorlevel 1 goto error_env %cecho% info "Build %SourceName%" -call "%~dp0build\build.bat" 64 release autologin "CONFIG+=rs_efs" "CONFIG+=gxsthewire" "CONFIG+=no_retroshare_plugins" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_libsam3" +call "%~dp0build\build.bat" 64 release autologin "CONFIG+=rs_use_native_dialogs" if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL% %cecho% info "Pack %SourceName%" -call "%~dp0build\pack.bat" 64 release autologin "CONFIG+=rs_efs" "CONFIG+=gxsthewire" "CONFIG+=no_retroshare_plugins" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_libsam3" +call "%~dp0build\pack.bat" 64 release autologin "CONFIG+=rs_use_native_dialogs" if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL% exit /B 0 diff --git a/libretroshare b/libretroshare index 7a50d7a81..74cd958cf 160000 --- a/libretroshare +++ b/libretroshare @@ -1 +1 @@ -Subproject commit 7a50d7a81d60c4bf76ea4bd81f45a0f028419e89 +Subproject commit 74cd958cf8a3c8b3e2d3f8a22657b5e16bdad476 diff --git a/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp b/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp index 572772a1e..84a8e322c 100644 --- a/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp +++ b/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp @@ -20,11 +20,11 @@ #include #include +#include #include "PulseReply.h" #include "gui/gxs/GxsIdDetails.h" #include "gui/common/FilesDefs.h" -#include "util/misc.h" #include "PulseAddDialog.h" @@ -540,8 +540,7 @@ void PulseAddDialog::toggle() // Function to get the file dialog for the browse button void PulseAddDialog::onBrowseButtonClicked() { - QString filePath; - misc::getOpenFileName(this, RshareSettings::LASTDIR_IMAGES, tr("Load Picture File"), "Pictures (*.png *.xpm *.jpg *.jpeg *.gif *.webp )", filePath); + QString filePath = QFileDialog::getOpenFileName(this, tr("Select image file"), QString(), tr("Image files (*.png *.jpg *.jpeg *.bmp *.gif)")); if (!filePath.isEmpty()) { ui.lineEdit_FilePath->setText(filePath); addImage(filePath);