[ooo-build-commit] .: 3 commits - svtools/source toolkit/source vcl/inc vcl/source vcl/unx
Lubos Lunak
llunak at kemper.freedesktop.org
Tue Oct 5 07:03:27 PDT 2010
svtools/source/contnr/fileview.cxx | 21 +--------------------
toolkit/source/awt/vclxwindow.cxx | 2 +-
vcl/inc/vcl/svapp.hxx | 20 ++++++++++++++++++++
vcl/source/helper/xconnection.cxx | 19 -------------------
vcl/unx/kde4/KDEXLib.cxx | 4 +---
vcl/unx/kde4/KDEXLib.hxx | 4 +++-
vcl/unx/kde4/VCLKDEApplication.cxx | 13 -------------
vcl/unx/kde4/VCLKDEApplication.hxx | 5 -----
8 files changed, 26 insertions(+), 62 deletions(-)
New commits:
commit 84def8400a146ba815d5e6cb6dc22496c9411a27
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Oct 5 15:56:06 2010 +0200
remove filtering of Qt's X11 events by our core
It doesn't seem to be necessary and it looks like a bad idea
to filter X events in Qt's X connection using the core which uses
another X connection.
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index b17c72c..3b9080d 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -146,8 +146,6 @@ void KDEXLib::Init()
Display* pDisp = QX11Info::display();
SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
- m_pApplication->disp = pSalDisplay;
-
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod );
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index bcebe4e..4e5bc43 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -36,17 +36,4 @@
VCLKDEApplication::VCLKDEApplication() :
KApplication()
{
- disp = 0;
}
-
-bool VCLKDEApplication::x11EventFilter(XEvent* event)
-{
- //if we have a display and the display consumes the event
- //do not process the event in qt
- if (disp && disp->Dispatch(event) > 0)
- {
- return true;
- }
-
- return false;
-}
\ No newline at end of file
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
index f3d5afd..b67436e 100644
--- a/vcl/unx/kde4/VCLKDEApplication.hxx
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx
@@ -46,8 +46,4 @@ class VCLKDEApplication : public KApplication
VCLKDEApplication();
virtual void commitData(QSessionManager&) {};
-
- virtual bool x11EventFilter(XEvent* event);
-
- SalKDEDisplay* disp;
-};
\ No newline at end of file
+};
commit e3227b74763e83d3f76a9c34c204a64f1daa3e97
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Oct 5 15:49:42 2010 +0200
refactor several SolarMutex releaser classes into one
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index af19379..f6c4dc0 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -109,25 +109,6 @@ DECLARE_LIST( StringList_Impl, OUString* )
namespace
{
//====================================================================
- //= ReleaseSolarMutex
- //====================================================================
- struct ReleaseSolarMutex
- {
- private:
- ULONG m_nCount;
-
- public:
- inline ReleaseSolarMutex()
- {
- m_nCount = Application::ReleaseSolarMutex();
- }
- inline ~ReleaseSolarMutex()
- {
- Application::AcquireSolarMutex( m_nCount );
- }
- };
-
- //====================================================================
//= ITimeoutHandler
//====================================================================
class CallbackTimer;
@@ -2022,7 +2003,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
// also release the SolarMutex. Not all code which is needed during the enumeration
// is Solar-Thread-Safe, in particular there is some code which needs to access
// string resources (and our resource system relies on the SolarMutex :()
- ReleaseSolarMutex aSolarRelease;
+ SolarMutexReleaser aSolarRelease;
// now wait. Note that if we didn't get an pAsyncDescriptor, then this is an infinite wait.
eResult = m_aAsyncActionFinished.wait( pTimeout.get() );
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 3fb70f5..93e6c23 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -339,7 +339,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
}
{
- ::toolkit::ReleaseSolarMutex aReleaseSolar;
+ SolarMutexReleaser aReleaseSolar;
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
++loop
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index dd87b6c..62af3d0 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -498,6 +498,26 @@ private:
DECL_STATIC_LINK( Application, PostEventHandler, void* );
};
+/**
+ A helper class that calls Application::ReleaseSolarMutex() in its constructor
+ and restores the mutex in its destructor.
+*/
+class SolarMutexReleaser
+{
+ ULONG mnReleased;
+public:
+ SolarMutexReleaser()
+ {
+ mnReleased = Application::ReleaseSolarMutex();
+ }
+
+ ~SolarMutexReleaser()
+ {
+ if( mnReleased )
+ Application::AcquireSolarMutex( mnReleased );
+ }
+};
+
VCL_DLLPUBLIC Application* GetpApp();
VCL_DLLPUBLIC BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index 9a3f9c5..a5085de 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -34,25 +34,6 @@
#include "vcl/salinst.hxx"
#include "vcl/svapp.hxx"
-namespace vcl
-{
- class SolarMutexReleaser
- {
- ULONG mnReleased;
- public:
- SolarMutexReleaser()
- {
- mnReleased = Application::ReleaseSolarMutex();
- }
-
- ~SolarMutexReleaser()
- {
- if( mnReleased )
- Application::AcquireSolarMutex( mnReleased );
- }
- };
-}
-
using namespace rtl;
using namespace osl;
using namespace vcl;
commit 26597c72fe28aae88d33eb9995a768eb2616f9e6
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed Sep 22 11:44:09 2010 +0200
use proper type instead of void* and casting
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 6f64cb8..b17c72c 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -59,7 +59,7 @@ KDEXLib::KDEXLib() :
KDEXLib::~KDEXLib()
{
- delete (VCLKDEApplication*)m_pApplication;
+ delete m_pApplication;
// free the faked cmdline arguments no longer needed by KApplication
for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
@@ -146,7 +146,7 @@ void KDEXLib::Init()
Display* pDisp = QX11Info::display();
SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
- ((VCLKDEApplication*)m_pApplication)->disp = pSalDisplay;
+ m_pApplication->disp = pSalDisplay;
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 4672dee..9f053ef 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -29,11 +29,13 @@
#include <saldisp.hxx>
+class VCLKDEApplication;
+
class KDEXLib : public SalXLib
{
private:
bool m_bStartupDone;
- void* m_pApplication;
+ VCLKDEApplication* m_pApplication;
char** m_pFreeCmdLineArgs;
char** m_pAppCmdLineArgs;
int m_nFakeCmdLineArgs;
More information about the ooo-build-commit
mailing list