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
6c3eff7e
Kaydet (Commit)
6c3eff7e
authored
Agu 25, 2010
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fpicker-kde-less-threads.diff: Update KDE3 fpicker after the threads change.
Introduced in i#93366 - n#427336.
üst
bf8b9c0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
UnxCommandThread.hxx
fpicker/source/unx/kde_unx/UnxCommandThread.hxx
+42
-2
UnxFilePicker.cxx
fpicker/source/unx/kde_unx/UnxFilePicker.cxx
+6
-2
No files found.
fpicker/source/unx/kde_unx/UnxCommandThread.hxx
Dosyayı görüntüle @
6c3eff7e
...
@@ -36,10 +36,50 @@
...
@@ -36,10 +36,50 @@
#include <osl/thread.hxx>
#include <osl/thread.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <vcl/svapp.hxx>
#include <list>
#include <list>
class
UnxFilePickerNotifyThread
;
class
UnxFilePickerNotifyThread
;
/** Synchronization for the 'thread-less' version of the fpicker.
Something like osl::Condition, but calls Application::Yield() while in
wait().
*/
class
YieldingCondition
{
::
osl
::
Mutex
m_aMutex
;
bool
m_bValue
;
bool
get
()
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
return
m_bValue
;
}
public
:
YieldingCondition
()
{
reset
();
}
void
reset
()
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
m_bValue
=
false
;
}
void
set
()
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
m_bValue
=
true
;
}
void
wait
()
{
while
(
!
get
()
)
Application
::
Yield
();
}
};
class
UnxFilePickerCommandThread
:
public
::
osl
::
Thread
class
UnxFilePickerCommandThread
:
public
::
osl
::
Thread
{
{
protected
:
protected
:
...
@@ -48,7 +88,7 @@ protected:
...
@@ -48,7 +88,7 @@ protected:
::
osl
::
Mutex
m_aMutex
;
::
osl
::
Mutex
m_aMutex
;
::
osl
::
Condition
m_aExecCondition
;
YieldingCondition
m_aExecCondition
;
sal_Bool
m_aResult
;
sal_Bool
m_aResult
;
::
osl
::
Condition
m_aGetCurrentFilterCondition
;
::
osl
::
Condition
m_aGetCurrentFilterCondition
;
...
@@ -67,7 +107,7 @@ public:
...
@@ -67,7 +107,7 @@ public:
UnxFilePickerCommandThread
(
UnxFilePickerNotifyThread
*
pNotifyThread
,
int
nReadFD
);
UnxFilePickerCommandThread
(
UnxFilePickerNotifyThread
*
pNotifyThread
,
int
nReadFD
);
~
UnxFilePickerCommandThread
();
~
UnxFilePickerCommandThread
();
::
osl
::
Condition
&
SAL_CALL
execCondition
()
{
return
m_aExecCondition
;
}
YieldingCondition
&
SAL_CALL
execCondition
()
{
return
m_aExecCondition
;
}
sal_Bool
SAL_CALL
result
();
sal_Bool
SAL_CALL
result
();
::
osl
::
Condition
&
SAL_CALL
getCurrentFilterCondition
()
{
return
m_aGetCurrentFilterCondition
;
}
::
osl
::
Condition
&
SAL_CALL
getCurrentFilterCondition
()
{
return
m_aGetCurrentFilterCondition
;
}
...
...
fpicker/source/unx/kde_unx/UnxFilePicker.cxx
Dosyayı görüntüle @
6c3eff7e
...
@@ -178,8 +178,12 @@ sal_Int16 SAL_CALL UnxFilePicker::execute()
...
@@ -178,8 +178,12 @@ sal_Int16 SAL_CALL UnxFilePicker::execute()
{
{
checkFilePicker
();
checkFilePicker
();
sendCommand
(
::
rtl
::
OUString
::
createFromAscii
(
"exec"
),
// this is _not_ an osl::Condition, see i#93366
m_pCommandThread
->
execCondition
()
);
m_pCommandThread
->
execCondition
().
reset
();
sendCommand
(
::
rtl
::
OUString
::
createFromAscii
(
"exec"
)
);
m_pCommandThread
->
execCondition
().
wait
();
return
m_pCommandThread
->
result
();
return
m_pCommandThread
->
result
();
}
}
...
...
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