[Libreoffice-commits] .: vcl/unx

Lubos Lunak llunak at kemper.freedesktop.org
Wed Aug 1 03:10:02 PDT 2012


 vcl/unx/kde4/KDE4FilePicker.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 78f1e95df4b8bd1fbc32ed4192676fd4f176f5bf
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Wed Aug 1 12:08:03 2012 +0200

    workaround for KFileDialog remembering its settings
    
    Change-Id: I6f473c246408684c5d952a2161645e4fe76873ea

diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 4917bf7..4bd2836 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -200,6 +200,11 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
         mutexrelease = Application::ReleaseSolarMutex();
     //block and wait for user input
     int result = _dialog->exec();
+    // HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings
+    // (such as the auto-extension flag), but that doesn't update KGlobal::config()
+    // (which is probably a KDE bug), so force reading the new configuration,
+    // otherwise the next opening of the dialog would use the old settings.
+    KGlobal::config()->reparseConfiguration();
     if( !qApp->clipboard()->property( "useEventLoopWhenWaiting" ).toBool())
         Application::AcquireSolarMutex( mutexrelease );
     if( result == KFileDialog::Accepted)


More information about the Libreoffice-commits mailing list