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
8c2711e7
Kaydet (Commit)
8c2711e7
authored
Mar 18, 2013
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
change #ifdef -> #if for KDE4 feature macros
Change-Id: I289744eaa62ad819620f0b31a54efd5ebbdb9dc2
üst
58d8ad36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
config_kde4.h.in
config_host/config_kde4.h.in
+3
-0
KDEXLib.cxx
vcl/unx/kde4/KDEXLib.cxx
+14
-10
No files found.
config_host/config_kde4.h.in
Dosyayı görüntüle @
8c2711e7
...
...
@@ -6,5 +6,8 @@ Settings for KDE4 integration.
#define CONFIG_KDE4_H
#undef KDE_HAVE_GLIB
#ifndef KDE_HAVE_GLIB
#define KDE_HAVE_GLIB 0
#endif
#endif
vcl/unx/kde4/KDEXLib.cxx
Dosyayı görüntüle @
8c2711e7
...
...
@@ -47,14 +47,18 @@
#include <config_kde4.h>
#if QT_VERSION >= QT_VERSION_CHECK( 4, 9, 0 )
#define QT_UNIX_EVENT_LOOP_SUPPORT
#define QT_UNIX_EVENT_LOOP_SUPPORT 1
#else
#define QT_UNIX_EVENT_LOOP_SUPPORT 0
#endif
#ifdef KDE_HAVE_GLIB
#define GLIB_EVENT_LOOP_SUPPORT
#if KDE_HAVE_GLIB
#define GLIB_EVENT_LOOP_SUPPORT 1
#else
#define GLIB_EVENT_LOOP_SUPPORT 0
#endif
#if
def
GLIB_EVENT_LOOP_SUPPORT
#if GLIB_EVENT_LOOP_SUPPORT
#include <glib-2.0/glib.h>
#endif
...
...
@@ -176,11 +180,11 @@ void KDEXLib::Init()
// needs to be unlocked shortly before entering the main sleep (e.g. select()) and locked
// immediatelly after. So we need to know which event loop implementation is used and
// hook accordingly.
#if
def
GLIB_EVENT_LOOP_SUPPORT
#if GLIB_EVENT_LOOP_SUPPORT
static
GPollFunc
old_gpoll
=
NULL
;
static
gint
gpoll_wrapper
(
GPollFD
*
,
guint
,
gint
);
#endif
#if
def
QT_UNIX_EVENT_LOOP_SUPPORT
#if QT_UNIX_EVENT_LOOP_SUPPORT
static
int
(
*
qt_select
)(
int
nfds
,
fd_set
*
fdread
,
fd_set
*
fdwrite
,
fd_set
*
fdexcept
,
const
struct
timeval
*
orig_timeout
);
static
int
lo_select
(
int
nfds
,
fd_set
*
fdread
,
fd_set
*
fdwrite
,
fd_set
*
fdexcept
,
...
...
@@ -200,7 +204,7 @@ static bool qt_event_filter( void* m )
void
KDEXLib
::
setupEventLoop
()
{
old_qt_event_filter
=
QAbstractEventDispatcher
::
instance
()
->
setEventFilter
(
qt_event_filter
);
#if
def
GLIB_EVENT_LOOP_SUPPORT
#if GLIB_EVENT_LOOP_SUPPORT
// Glib is simple, it has g_main_context_set_poll_func() for wrapping the sleep call.
// The catch is that Qt has a bug that allows triggering timers even when they should
// not be, leading to crashes caused by QClipboard re-entering the event loop.
...
...
@@ -219,7 +223,7 @@ void KDEXLib::setupEventLoop()
}
#endif
#endif
#if
def
QT_UNIX_EVENT_LOOP_SUPPORT
#if QT_UNIX_EVENT_LOOP_SUPPORT
// When Qt does not use Glib support, it uses its own Unix event dispatcher.
// That one has aboutToBlock() and awake() signals, but they are broken (either
// functionality or semantics), as e.g. awake() is not emitted right after the dispatcher
...
...
@@ -239,7 +243,7 @@ void KDEXLib::setupEventLoop()
#endif
}
#if
def
GLIB_EVENT_LOOP_SUPPORT
#if GLIB_EVENT_LOOP_SUPPORT
gint
gpoll_wrapper
(
GPollFD
*
ufds
,
guint
nfds
,
gint
timeout
)
{
SalYieldMutexReleaser
release
;
// release YieldMutex (and re-acquire at block end)
...
...
@@ -247,7 +251,7 @@ gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
}
#endif
#if
def
QT_UNIX_EVENT_LOOP_SUPPORT
#if QT_UNIX_EVENT_LOOP_SUPPORT
int
lo_select
(
int
nfds
,
fd_set
*
fdread
,
fd_set
*
fdwrite
,
fd_set
*
fdexcept
,
const
struct
timeval
*
orig_timeout
)
{
...
...
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