Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
474ad6b0
Kaydet (Commit)
474ad6b0
authored
Nis 25, 2014
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make sure KFileDialog does not leave the SolarMutex released
Change-Id: I806bf5fe1cd1871de499ceeeadf36de539e9d637
üst
2cd8a1e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
KDE4FilePicker.cxx
vcl/unx/kde4/KDE4FilePicker.cxx
+10
-14
No files found.
vcl/unx/kde4/KDE4FilePicker.cxx
Dosyayı görüntüle @
474ad6b0
...
@@ -256,19 +256,17 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
...
@@ -256,19 +256,17 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
_dialog
->
setFilter
(
_filter
);
_dialog
->
setFilter
(
_filter
);
_dialog
->
filterWidget
()
->
setEditable
(
false
);
_dialog
->
filterWidget
()
->
setEditable
(
false
);
// At this point, SolarMutex is held. Opening the KDE file dialog here
// KFileDialog intergration requires using event loop with QClipboard.
// can lead to QClipboard asking for clipboard contents. If LO core
// Opening the KDE file dialog here can lead to QClipboard
// is the owner of the clipboard content, this will block for 5 seconds
// asking for clipboard contents. If LO core is the owner of the clipboard
// and timeout, since the clipboard thread will not be able to acquire
// content, without event loop use this will block for 5 seconds and timeout,
// SolarMutex and thus won't be able to respond. If the event loops
// since the clipboard thread will not be able to acquire SolarMutex
// and thus won't be able to respond. If the event loops
// are properly integrated and QClipboard can use a nested event loop
// are properly integrated and QClipboard can use a nested event loop
// (see the KDE VCL plug), then this won't happen, but otherwise
// (see the KDE VCL plug), then this won't happen.
// simply release the SolarMutex here. The KDE file dialog does not
// We cannot simply release SolarMutex here, because the event loop started
// call back to the core, so this should be safe (and if it does,
// by the file dialog would also call back to LO code.
// SolarMutex will need to be re-acquired).
assert
(
qApp
->
clipboard
()
->
property
(
"useEventLoopWhenWaiting"
).
toBool
()
==
true
);
long
mutexrelease
=
0
;
if
(
!
qApp
->
clipboard
()
->
property
(
"useEventLoopWhenWaiting"
).
toBool
())
mutexrelease
=
Application
::
ReleaseSolarMutex
();
//block and wait for user input
//block and wait for user input
int
result
=
_dialog
->
exec
();
int
result
=
_dialog
->
exec
();
// HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings
// HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings
...
@@ -276,8 +274,6 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
...
@@ -276,8 +274,6 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
// (which is probably a KDE bug), so force reading the new configuration,
// (which is probably a KDE bug), so force reading the new configuration,
// otherwise the next opening of the dialog would use the old settings.
// otherwise the next opening of the dialog would use the old settings.
KGlobal
::
config
()
->
reparseConfiguration
();
KGlobal
::
config
()
->
reparseConfiguration
();
if
(
!
qApp
->
clipboard
()
->
property
(
"useEventLoopWhenWaiting"
).
toBool
())
Application
::
AcquireSolarMutex
(
mutexrelease
);
if
(
result
==
KFileDialog
::
Accepted
)
if
(
result
==
KFileDialog
::
Accepted
)
return
ExecutableDialogResults
::
OK
;
return
ExecutableDialogResults
::
OK
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment