Rename KApplication to TDEApplication to avoid conflicts with KDE4

r14.0.x
Timothy Pearson 11 years ago
parent fe83a8b649
commit 2715c65c51

@ -2986,8 +2986,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return false; ++ return false;
++ ++
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initKApplication", m_pApplicationInitFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initTDEApplication", m_pApplicationInitFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownKApplication", m_pApplicationShutdownFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownTDEApplication", m_pApplicationShutdownFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc );
++ ++
++ if ( !m_hConnectorModule ) ++ if ( !m_hConnectorModule )
@ -7389,8 +7389,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++UDK_3_0_0 { ++UDK_3_0_0 {
++ global: ++ global:
++ createKabConnection; ++ createKabConnection;
++ initKApplication; ++ initTDEApplication;
++ shutdownKApplication; ++ shutdownTDEApplication;
++ matchTDEVersion; ++ matchTDEVersion;
++ local: ++ local:
++ *; ++ *;
@ -7577,7 +7577,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ { ++ {
++ private: ++ private:
++ /// TDE application if we own it ++ /// TDE application if we own it
++ static KApplication* s_pKApplication; ++ static TDEApplication* s_pTDEApplication;
++ static bool s_bDidInsertCatalogue; ++ static bool s_bDidInsertCatalogue;
++ ++
++ public: ++ public:
@ -7586,7 +7586,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ }; ++ };
++ ++
++ // --------------------------------------------------------------- ++ // ---------------------------------------------------------------
++ KApplication* TDEInit::s_pKApplication = NULL; ++ TDEApplication* TDEInit::s_pTDEApplication = NULL;
++ bool TDEInit::s_bDidInsertCatalogue = false; ++ bool TDEInit::s_bDidInsertCatalogue = false;
++ ++
++ // --------------------------------------------------------------- ++ // ---------------------------------------------------------------
@ -7595,14 +7595,14 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // TODO: All this is not thread-safe ++ // TODO: All this is not thread-safe
++ ++
++ // we create a TDE application only if it is not already done ++ // we create a TDE application only if it is not already done
++ if (KApplication::kApplication() == NULL) ++ if (TDEApplication::kApplication() == NULL)
++ { ++ {
++ OSL_ENSURE(s_pKApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!"); ++ OSL_ENSURE(s_pTDEApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!");
++ ++
++ char *kabargs[1] = {(char*)"libkab1"}; ++ char *kabargs[1] = {(char*)"libkab1"};
++ KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION); ++ KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION);
++ ++
++ s_pKApplication = new KApplication(false, false); ++ s_pTDEApplication = new TDEApplication(false, false);
++ } ++ }
++ ++
++ // set language ++ // set language
@ -7627,10 +7627,10 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // which we did not previously insert ++ // which we did not previously insert
++ KGlobal::locale()->removeCatalogue("kaddressbook"); ++ KGlobal::locale()->removeCatalogue("kaddressbook");
++ ++
++ if ( s_pKApplication != NULL ) ++ if ( s_pTDEApplication != NULL )
++ { ++ {
++ delete s_pKApplication; ++ delete s_pTDEApplication;
++ s_pKApplication = NULL; ++ s_pTDEApplication = NULL;
++ } ++ }
++ } ++ }
++ } ++ }
@ -7646,13 +7646,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++} ++}
++ ++
++// ----------------------------------------------------------------------- ++// -----------------------------------------------------------------------
++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initKApplication() ++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initTDEApplication()
++{ ++{
++ ::connectivity::kab::TDEInit::Init(); ++ ::connectivity::kab::TDEInit::Init();
++} ++}
++ ++
++// ----------------------------------------------------------------------- ++// -----------------------------------------------------------------------
++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownKApplication() ++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownTDEApplication()
++{ ++{
++ ::connectivity::kab::TDEInit::Shutdown(); ++ ::connectivity::kab::TDEInit::Shutdown();
++} ++}
@ -7661,7 +7661,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ by the driver ++ by the driver
++ ++
++ Has to be called before any other code from this library, in particular, ++ Has to be called before any other code from this library, in particular,
++ it has to be called before initKApplication() ++ it has to be called before initTDEApplication()
++ ++
++ If this function returns <code>0</code>, then no other code from this library ++ If this function returns <code>0</code>, then no other code from this library
++ has to be called, else the results are unpredictable. ++ has to be called, else the results are unpredictable.
@ -9043,7 +9043,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ KLocale::setMainCatalogue( "kdialog" ); ++ KLocale::setMainCatalogue( "kdialog" );
++ ++
++ KApplication kApplication; ++ TDEApplication kApplication;
++ ++
++ // Setup the modality ++ // Setup the modality
++ KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs(); ++ KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs();
@ -11951,7 +11951,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>= ++ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
++ desktop; ++ desktop;
++ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) && ++ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) &&
++ KApplication::kApplication() != 0; ++ TDEApplication::kApplication() != 0;
++ } ++ }
++} ++}
++ ++
@ -15201,13 +15201,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include "i18n_im.hxx" ++#include "i18n_im.hxx"
++#include "i18n_xkb.hxx" ++#include "i18n_xkb.hxx"
++ ++
++/* #i59042# override KApplications method for session management ++/* #i59042# override TDEApplications method for session management
++ * since it will interfere badly with our own. ++ * since it will interfere badly with our own.
++ */ ++ */
++class VCLTDEApplication : public KApplication ++class VCLTDEApplication : public TDEApplication
++{ ++{
++ public: ++ public:
++ VCLTDEApplication() : KApplication() {} ++ VCLTDEApplication() : TDEApplication() {}
++ ++
++ virtual void commitData(QSessionManager &sm); ++ virtual void commitData(QSessionManager &sm);
++}; ++};
@ -15231,7 +15231,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ static_cast<TDEXLib*>(GetXLib())->doStartup(); ++ static_cast<TDEXLib*>(GetXLib())->doStartup();
++ // clean up own members ++ // clean up own members
++ doDestruct(); ++ doDestruct();
++ // prevent SalDisplay from closing KApplication's display ++ // prevent SalDisplay from closing TDEApplication's display
++ pDisp_ = NULL; ++ pDisp_ = NULL;
++} ++}
++ ++
@ -15249,10 +15249,10 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // we should use tde's method to signal screen changes similar ++ // we should use tde's method to signal screen changes similar
++ // to the gtk plugin ++ // to the gtk plugin
++ #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64) ++ #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64)
++ // properly deinitialize KApplication ++ // properly deinitialize TDEApplication
++ delete (VCLTDEApplication*)m_pApplication; ++ delete (VCLTDEApplication*)m_pApplication;
++ #endif ++ #endif
++ // free the faked cmdline arguments no longer needed by KApplication ++ // free the faked cmdline arguments no longer needed by TDEApplication
++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) ++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
++ free( m_pFreeCmdLineArgs[i] ); ++ free( m_pFreeCmdLineArgs[i] );
++ delete [] m_pFreeCmdLineArgs; ++ delete [] m_pFreeCmdLineArgs;
@ -15308,15 +15308,15 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() ); ++ m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() );
++ ++
++ // make a copy of the string list for freeing it since ++ // make a copy of the string list for freeing it since
++ // KApplication manipulates the pointers inside the argument vector ++ // TDEApplication manipulates the pointers inside the argument vector
++ // note: KApplication bad ! ++ // note: TDEApplication bad !
++ m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ]; ++ m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ];
++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) ++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
++ m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i]; ++ m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i];
++ ++
++ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData ); ++ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
++ ++
++ KApplication::disableAutoDcopRegistration(); ++ TDEApplication::disableAutoDcopRegistration();
++ m_pApplication = new VCLTDEApplication(); ++ m_pApplication = new VCLTDEApplication();
++ kapp->disableSessionManagement(); ++ kapp->disableSessionManagement();
++ ++

@ -2986,8 +2986,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return false; ++ return false;
++ ++
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initKApplication", m_pApplicationInitFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initTDEApplication", m_pApplicationInitFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownKApplication", m_pApplicationShutdownFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownTDEApplication", m_pApplicationShutdownFunc );
++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc ); ++ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc );
++ ++
++ if ( !m_hConnectorModule ) ++ if ( !m_hConnectorModule )
@ -7389,8 +7389,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++UDK_3_0_0 { ++UDK_3_0_0 {
++ global: ++ global:
++ createKabConnection; ++ createKabConnection;
++ initKApplication; ++ initTDEApplication;
++ shutdownKApplication; ++ shutdownTDEApplication;
++ matchTDEVersion; ++ matchTDEVersion;
++ local: ++ local:
++ *; ++ *;
@ -7577,7 +7577,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ { ++ {
++ private: ++ private:
++ /// TDE application if we own it ++ /// TDE application if we own it
++ static KApplication* s_pKApplication; ++ static TDEApplication* s_pTDEApplication;
++ static bool s_bDidInsertCatalogue; ++ static bool s_bDidInsertCatalogue;
++ ++
++ public: ++ public:
@ -7586,7 +7586,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ }; ++ };
++ ++
++ // --------------------------------------------------------------- ++ // ---------------------------------------------------------------
++ KApplication* TDEInit::s_pKApplication = NULL; ++ TDEApplication* TDEInit::s_pTDEApplication = NULL;
++ bool TDEInit::s_bDidInsertCatalogue = false; ++ bool TDEInit::s_bDidInsertCatalogue = false;
++ ++
++ // --------------------------------------------------------------- ++ // ---------------------------------------------------------------
@ -7595,14 +7595,14 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // TODO: All this is not thread-safe ++ // TODO: All this is not thread-safe
++ ++
++ // we create a TDE application only if it is not already done ++ // we create a TDE application only if it is not already done
++ if (KApplication::kApplication() == NULL) ++ if (TDEApplication::kApplication() == NULL)
++ { ++ {
++ OSL_ENSURE(s_pKApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!"); ++ OSL_ENSURE(s_pTDEApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!");
++ ++
++ char *kabargs[1] = {(char*)"libkab1"}; ++ char *kabargs[1] = {(char*)"libkab1"};
++ KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION); ++ KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION);
++ ++
++ s_pKApplication = new KApplication(false, false); ++ s_pTDEApplication = new TDEApplication(false, false);
++ } ++ }
++ ++
++ // set language ++ // set language
@ -7627,10 +7627,10 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // which we did not previously insert ++ // which we did not previously insert
++ KGlobal::locale()->removeCatalogue("kaddressbook"); ++ KGlobal::locale()->removeCatalogue("kaddressbook");
++ ++
++ if ( s_pKApplication != NULL ) ++ if ( s_pTDEApplication != NULL )
++ { ++ {
++ delete s_pKApplication; ++ delete s_pTDEApplication;
++ s_pKApplication = NULL; ++ s_pTDEApplication = NULL;
++ } ++ }
++ } ++ }
++ } ++ }
@ -7646,13 +7646,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++} ++}
++ ++
++// ----------------------------------------------------------------------- ++// -----------------------------------------------------------------------
++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initKApplication() ++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initTDEApplication()
++{ ++{
++ ::connectivity::kab::TDEInit::Init(); ++ ::connectivity::kab::TDEInit::Init();
++} ++}
++ ++
++// ----------------------------------------------------------------------- ++// -----------------------------------------------------------------------
++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownKApplication() ++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownTDEApplication()
++{ ++{
++ ::connectivity::kab::TDEInit::Shutdown(); ++ ::connectivity::kab::TDEInit::Shutdown();
++} ++}
@ -7661,7 +7661,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ by the driver ++ by the driver
++ ++
++ Has to be called before any other code from this library, in particular, ++ Has to be called before any other code from this library, in particular,
++ it has to be called before initKApplication() ++ it has to be called before initTDEApplication()
++ ++
++ If this function returns <code>0</code>, then no other code from this library ++ If this function returns <code>0</code>, then no other code from this library
++ has to be called, else the results are unpredictable. ++ has to be called, else the results are unpredictable.
@ -9043,7 +9043,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ KLocale::setMainCatalogue( "kdialog" ); ++ KLocale::setMainCatalogue( "kdialog" );
++ ++
++ KApplication kApplication; ++ TDEApplication kApplication;
++ ++
++ // Setup the modality ++ // Setup the modality
++ KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs(); ++ KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs();
@ -11951,7 +11951,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>= ++ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
++ desktop; ++ desktop;
++ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) && ++ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) &&
++ KApplication::kApplication() != 0; ++ TDEApplication::kApplication() != 0;
++ } ++ }
++} ++}
++ ++
@ -15201,13 +15201,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include "i18n_im.hxx" ++#include "i18n_im.hxx"
++#include "i18n_xkb.hxx" ++#include "i18n_xkb.hxx"
++ ++
++/* #i59042# override KApplications method for session management ++/* #i59042# override TDEApplications method for session management
++ * since it will interfere badly with our own. ++ * since it will interfere badly with our own.
++ */ ++ */
++class VCLTDEApplication : public KApplication ++class VCLTDEApplication : public TDEApplication
++{ ++{
++ public: ++ public:
++ VCLTDEApplication() : KApplication() {} ++ VCLTDEApplication() : TDEApplication() {}
++ ++
++ virtual void commitData(QSessionManager &sm); ++ virtual void commitData(QSessionManager &sm);
++}; ++};
@ -15231,7 +15231,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ static_cast<TDEXLib*>(GetXLib())->doStartup(); ++ static_cast<TDEXLib*>(GetXLib())->doStartup();
++ // clean up own members ++ // clean up own members
++ doDestruct(); ++ doDestruct();
++ // prevent SalDisplay from closing KApplication's display ++ // prevent SalDisplay from closing TDEApplication's display
++ pDisp_ = NULL; ++ pDisp_ = NULL;
++} ++}
++ ++
@ -15249,10 +15249,10 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // we should use tde's method to signal screen changes similar ++ // we should use tde's method to signal screen changes similar
++ // to the gtk plugin ++ // to the gtk plugin
++ #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64) ++ #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64)
++ // properly deinitialize KApplication ++ // properly deinitialize TDEApplication
++ delete (VCLTDEApplication*)m_pApplication; ++ delete (VCLTDEApplication*)m_pApplication;
++ #endif ++ #endif
++ // free the faked cmdline arguments no longer needed by KApplication ++ // free the faked cmdline arguments no longer needed by TDEApplication
++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) ++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
++ free( m_pFreeCmdLineArgs[i] ); ++ free( m_pFreeCmdLineArgs[i] );
++ delete [] m_pFreeCmdLineArgs; ++ delete [] m_pFreeCmdLineArgs;
@ -15308,15 +15308,15 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() ); ++ m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() );
++ ++
++ // make a copy of the string list for freeing it since ++ // make a copy of the string list for freeing it since
++ // KApplication manipulates the pointers inside the argument vector ++ // TDEApplication manipulates the pointers inside the argument vector
++ // note: KApplication bad ! ++ // note: TDEApplication bad !
++ m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ]; ++ m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ];
++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) ++ for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
++ m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i]; ++ m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i];
++ ++
++ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData ); ++ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
++ ++
++ KApplication::disableAutoDcopRegistration(); ++ TDEApplication::disableAutoDcopRegistration();
++ m_pApplication = new VCLTDEApplication(); ++ m_pApplication = new VCLTDEApplication();
++ kapp->disableSessionManagement(); ++ kapp->disableSessionManagement();
++ ++

@ -845,8 +845,8 @@ index 0000000..5de866f
+UDK_3_0_0 { +UDK_3_0_0 {
+ global: + global:
+ createKabConnection; + createKabConnection;
+ initKApplication; + initTDEApplication;
+ shutdownKApplication; + shutdownTDEApplication;
+ matchKDEVersion; + matchKDEVersion;
+ local: + local:
+ *; + *;
@ -2858,7 +2858,7 @@ index d66e227..f84136a 100644
+#define THIS_DESKENV_NAME_LOW "kde" +#define THIS_DESKENV_NAME_LOW "kde"
+#endif // ENABLE_TDE +#endif // ENABLE_TDE
+ +
/* #i59042# override KApplications method for session management /* #i59042# override TDEApplications method for session management
* since it will interfere badly with our own. * since it will interfere badly with our own.
*/ */
@@ -123,7 +132,7 @@ void KDEXLib::Init() @@ -123,7 +132,7 @@ void KDEXLib::Init()

@ -2634,8 +2634,8 @@ index 0000000..cdf0463
+ return false; + return false;
+ +
+ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc ); + lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "createKabConnection", m_pConnectionFactoryFunc );
+ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initKApplication", m_pApplicationInitFunc ); + lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "initTDEApplication", m_pApplicationInitFunc );
+ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownKApplication", m_pApplicationShutdownFunc ); + lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "shutdownTDEApplication", m_pApplicationShutdownFunc );
+ lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc ); + lcl_getFunctionFromModuleOrUnload( m_hConnectorModule, "matchTDEVersion", m_pTDEVersionCheckFunc );
+ +
+ if ( !m_hConnectorModule ) + if ( !m_hConnectorModule )
@ -6632,7 +6632,7 @@ index 0000000..375b158
+ { + {
+ private: + private:
+ /// TDE application if we own it + /// TDE application if we own it
+ static KApplication* s_pKApplication; + static TDEApplication* s_pTDEApplication;
+ static bool s_bDidInsertCatalogue; + static bool s_bDidInsertCatalogue;
+ +
+ public: + public:
@ -6641,7 +6641,7 @@ index 0000000..375b158
+ }; + };
+ +
+ // --------------------------------------------------------------- + // ---------------------------------------------------------------
+ KApplication* TDEInit::s_pKApplication = NULL; + TDEApplication* TDEInit::s_pTDEApplication = NULL;
+ bool TDEInit::s_bDidInsertCatalogue = false; + bool TDEInit::s_bDidInsertCatalogue = false;
+ +
+ // --------------------------------------------------------------- + // ---------------------------------------------------------------
@ -6650,14 +6650,14 @@ index 0000000..375b158
+ // TODO: All this is not thread-safe + // TODO: All this is not thread-safe
+ +
+ // we create a TDE application only if it is not already done + // we create a TDE application only if it is not already done
+ if (KApplication::kApplication() == NULL) + if (TDEApplication::kApplication() == NULL)
+ { + {
+ OSL_ENSURE(s_pKApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!"); + OSL_ENSURE(s_pTDEApplication == NULL, "TDEInit::Init: inconsistency in the application pointers!");
+ +
+ char *kabargs[1] = {(char*)"libkab1"}; + char *kabargs[1] = {(char*)"libkab1"};
+ KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION); + KCmdLineArgs::init(1, kabargs, "KAddressBook", *kabargs, "Address Book driver", KAB_DRIVER_VERSION);
+ +
+ s_pKApplication = new KApplication(false, false); + s_pTDEApplication = new TDEApplication(false, false);
+ } + }
+ +
+ // set language + // set language
@ -6682,10 +6682,10 @@ index 0000000..375b158
+ // which we did not previously insert + // which we did not previously insert
+ KGlobal::locale()->removeCatalogue("kaddressbook"); + KGlobal::locale()->removeCatalogue("kaddressbook");
+ +
+ if ( s_pKApplication != NULL ) + if ( s_pTDEApplication != NULL )
+ { + {
+ delete s_pKApplication; + delete s_pTDEApplication;
+ s_pKApplication = NULL; + s_pTDEApplication = NULL;
+ } + }
+ } + }
+ } + }
@ -6701,13 +6701,13 @@ index 0000000..375b158
+} +}
+ +
+// ----------------------------------------------------------------------- +// -----------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initKApplication() +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initTDEApplication()
+{ +{
+ ::connectivity::kab::TDEInit::Init(); + ::connectivity::kab::TDEInit::Init();
+} +}
+ +
+// ----------------------------------------------------------------------- +// -----------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownKApplication() +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownTDEApplication()
+{ +{
+ ::connectivity::kab::TDEInit::Shutdown(); + ::connectivity::kab::TDEInit::Shutdown();
+} +}
@ -6716,7 +6716,7 @@ index 0000000..375b158
+ by the driver + by the driver
+ +
+ Has to be called before any other code from this library, in particular, + Has to be called before any other code from this library, in particular,
+ it has to be called before initKApplication() + it has to be called before initTDEApplication()
+ +
+ If this function returns <code>0</code>, then no other code from this library + If this function returns <code>0</code>, then no other code from this library
+ has to be called, else the results are unpredictable. + has to be called, else the results are unpredictable.
@ -7848,8 +7848,8 @@ index 0000000..2c828d8
+UDK_3_0_0 { +UDK_3_0_0 {
+ global: + global:
+ createKabConnection; + createKabConnection;
+ initKApplication; + initTDEApplication;
+ shutdownKApplication; + shutdownTDEApplication;
+ matchTDEVersion; + matchTDEVersion;
+ local: + local:
+ *; + *;
@ -9370,7 +9370,7 @@ index 0000000..eb20aa3
+ +
+ KLocale::setMainCatalogue( "kdialog" ); + KLocale::setMainCatalogue( "kdialog" );
+ +
+ KApplication kApplication; + TDEApplication kApplication;
+ +
+ // Setup the modality + // Setup the modality
+ KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs(); + KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs();
@ -12930,7 +12930,7 @@ index 0000000..19eaa60
+ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>= + RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
+ desktop; + desktop;
+ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) && + enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TDE")) &&
+ KApplication::kApplication() != 0; + TDEApplication::kApplication() != 0;
+ } + }
+} +}
+ +
@ -15965,13 +15965,13 @@ index 0000000..adeb628
+ +
+#include "vclpluginapi.h" +#include "vclpluginapi.h"
+ +
+/* #i59042# override KApplications method for session management +/* #i59042# override TDEApplications method for session management
+ * since it will interfere badly with our own. + * since it will interfere badly with our own.
+ */ + */
+class VCLTDEApplication : public KApplication +class VCLTDEApplication : public TDEApplication
+{ +{
+ public: + public:
+ VCLTDEApplication() : KApplication() {} + VCLTDEApplication() : TDEApplication() {}
+ +
+ virtual void commitData(QSessionManager &sm); + virtual void commitData(QSessionManager &sm);
+}; +};
@ -15995,7 +15995,7 @@ index 0000000..adeb628
+ static_cast<TDEXLib*>(GetXLib())->doStartup(); + static_cast<TDEXLib*>(GetXLib())->doStartup();
+ // clean up own members + // clean up own members
+ doDestruct(); + doDestruct();
+ // prevent SalDisplay from closing KApplication's display + // prevent SalDisplay from closing TDEApplication's display
+ pDisp_ = NULL; + pDisp_ = NULL;
+} +}
+ +
@ -16013,10 +16013,10 @@ index 0000000..adeb628
+ // we should use tde's method to signal screen changes similar + // we should use tde's method to signal screen changes similar
+ // to the gtk plugin + // to the gtk plugin
+ #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64) + #if ! defined USE_RANDR || ! (defined LINUX && defined X86_64)
+ // properly deinitialize KApplication + // properly deinitialize TDEApplication
+ delete (VCLTDEApplication*)m_pApplication; + delete (VCLTDEApplication*)m_pApplication;
+ #endif + #endif
+ // free the faked cmdline arguments no longer needed by KApplication + // free the faked cmdline arguments no longer needed by TDEApplication
+ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) + for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
+ free( m_pFreeCmdLineArgs[i] ); + free( m_pFreeCmdLineArgs[i] );
+ delete [] m_pFreeCmdLineArgs; + delete [] m_pFreeCmdLineArgs;
@ -16072,15 +16072,15 @@ index 0000000..adeb628
+ m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() ); + m_pFreeCmdLineArgs[0] = strdup( aExec.getStr() );
+ +
+ // make a copy of the string list for freeing it since + // make a copy of the string list for freeing it since
+ // KApplication manipulates the pointers inside the argument vector + // TDEApplication manipulates the pointers inside the argument vector
+ // note: KApplication bad ! + // note: TDEApplication bad !
+ m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ]; + m_pAppCmdLineArgs = new char*[ m_nFakeCmdLineArgs ];
+ for( int i = 0; i < m_nFakeCmdLineArgs; i++ ) + for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
+ m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i]; + m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i];
+ +
+ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData ); + KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
+ +
+ KApplication::disableAutoDcopRegistration(); + TDEApplication::disableAutoDcopRegistration();
+ m_pApplication = new VCLTDEApplication(); + m_pApplication = new VCLTDEApplication();
+ kapp->disableSessionManagement(); + kapp->disableSessionManagement();
+ +

Loading…
Cancel
Save