[ooo-build-commit] .: 2 commits - fpicker/source sfx2/source
Lubos Lunak
llunak at kemper.freedesktop.org
Tue Oct 5 07:03:22 PDT 2010
fpicker/source/unx/kde4/KDE4FilePicker.cxx | 8 +++++++-
sfx2/source/dialog/filedlghelper.cxx | 20 ++------------------
2 files changed, 9 insertions(+), 19 deletions(-)
New commits:
commit e5b53281b9395b6ef3554e139094155ed20dd3b7
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Oct 5 15:50:37 2010 +0200
release solar mutex before entering Qt event loop
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 744e19f..b106222 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -186,7 +186,13 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
_dialog->clearFilter();
_dialog->setFilter(_filter);
_dialog->filterWidget()->setEditable(false);
-
+
+ // We are now entering Qt code, so release the Solar Mutex, as the Qt code
+ // should not generally call back into core code (and if yes, it needs to claim
+ // the mutex again). Otherwise this would block core code (e.g. bnc#616047,
+ // KDE file dialog asks for clipboard contents, if it is owned by core code,
+ // it will try to lock the mutex and block there).
+ SolarMutexReleaser releaser;
//block and wait for user input
if (_dialog->exec() == KFileDialog::Accepted)
return ExecutableDialogResults::OK;
commit 6aa6b7c80cb570f38928e9b2771e784006370da8
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Oct 5 15:49:27 2010 +0200
refactor several SolarMutex releaser classes into one
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 3bab58f..c885791 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -707,22 +707,6 @@ void FileDialogHelper_Impl::updateVersions()
}
// -----------------------------------------------------------------------
-class OReleaseSolarMutex
-{
-private:
- const sal_Int32 m_nAquireCount;
-public:
- OReleaseSolarMutex( )
- :m_nAquireCount( Application::ReleaseSolarMutex() )
- {
- }
- ~OReleaseSolarMutex( )
- {
- Application::AcquireSolarMutex( m_nAquireCount );
- }
-};
-
-// -----------------------------------------------------------------------
IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG )
{
if ( !mbHasPreview )
@@ -787,7 +771,7 @@ IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG )
try
{
- OReleaseSolarMutex aReleaseForCallback;
+ SolarMutexReleaser aReleaseForCallback;
// clear the preview window
xFilePicker->setImage( FilePreviewImageFormats::BITMAP, aAny );
}
@@ -1357,7 +1341,7 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute()
#ifdef WNT
if ( mbSystemPicker )
{
- OReleaseSolarMutex aSolarMutex;
+ SolarMutexReleaser aSolarMutex;
nRet = mxFileDlg->execute();
}
else
More information about the ooo-build-commit
mailing list