Patches for bugs

Dirk Hohndel dirk at hohndel.org
Wed Jun 11 14:27:40 PDT 2014


On Tue, Jun 10, 2014 at 11:06:39AM -0300, Tomaz Canabrava wrote:
> From 4352ac280a489a21df8aa3c8b718b4635afe64b6 Mon Sep 17 00:00:00 2001
> From: Tomaz Canabrava <tomaz.canabrava at intel.com>
> Date: Tue, 10 Jun 2014 07:42:13 -0300
> Subject: [PATCH 3/9] Change the QDialog for html export to getExistingFolder
> 
> the QDialog for html created a folder, we needed to choose
> a folder, not a file. getSaveFileName was wrong. ;p
> 
> Signed-off-by: Tomaz Canabrava <tomaz.canabrava at intel.com>
> ---
>  qt-ui/divelogexportdialog.cpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
> index 602d450..84be70b 100644
> --- a/qt-ui/divelogexportdialog.cpp
> +++ b/qt-ui/divelogexportdialog.cpp
> @@ -176,8 +176,7 @@ void DiveLogExportDialog::on_buttonBox_accepted()
>  		}
>  		break;
>  	case 1:
> -		filename = QFileDialog::getSaveFileName(this, tr("Export Subsurface"), lastDir,
> -							tr("Folders"), 0, QFileDialog::ShowDirsOnly);
> +		filename = QFileDialog::getExistingDirectory(this, tr("Export Subsurface"), lastDir);

So I wonder about this "Existing" part here. What if the user wants to
create a new subdirectory? That seems like a fairly common thing to want
to do...

On Linux/KDE the form has a button to create a new folder. Is that ensure
on all OSs / all themes? The documentation says nothing about this.
Also, wouldn't it be nice to have "ShowDirsOnly" set? The documentation
appears to imply that that is needed in order to get native dialogs shown.

I've taken the patch (and Gehad, this fixes the issue I asked you to look
into), but I wonder about these two questions...

/D


More information about the subsurface mailing list