Fix a second cause of the ever-ubiquitous Bug #456

This one is related to the MOC having a different idea of the data structure than the C compiler does in bgmanager.xx,
thereby causing memory corruption when the bgmanager object attempts to access data members that the MOC did not add to the objects memory structure.
Also apply the fix in r1420474 to KDesktopIface and KScreenSaverIface


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1241406 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent bee265d855
commit 4f2f95ce18

@ -6,11 +6,13 @@
#include <dcopobject.h> #include <dcopobject.h>
#include <dcopref.h> #include <dcopref.h>
class KDesktopIface : virtual public DCOPObject class KDesktopIface : public DCOPObject
{ {
K_DCOP K_DCOP
public: public:
KDesktopIface() : DCOPObject("KDesktopIface") {}
k_dcop: k_dcop:
/** /**
* @internal * @internal

@ -4,11 +4,13 @@
#include <dcopobject.h> #include <dcopobject.h>
class KScreensaverIface : virtual public DCOPObject class KScreensaverIface : public DCOPObject
{ {
K_DCOP K_DCOP
public: public:
KScreensaverIface() : DCOPObject("KScreensaverIface") {}
k_dcop: k_dcop:
/** Lock the screen now even if the screensaver does not lock by default. */ /** Lock the screen now even if the screensaver does not lock by default. */
virtual void lock() = 0; virtual void lock() = 0;

@ -19,10 +19,6 @@
#define COMPOSITE #define COMPOSITE
#endif #endif
#ifdef Q_MOC_RUN
#define COMPOSITE
#endif
class KConfig; class KConfig;
class TQTimer; class TQTimer;
class TQPixmap; class TQPixmap;
@ -93,11 +89,8 @@ private slots:
void desktopResized(); void desktopResized();
void clearRoot(); void clearRoot();
void saveImages(); void saveImages();
#ifdef COMPOSITE
void slotCmBackgroundChanged(bool); void slotCmBackgroundChanged(bool);
#endif
private: private:
void applyCommon(bool common); void applyCommon(bool common);
void applyExport(bool _export); void applyExport(bool _export);
@ -129,9 +122,7 @@ private:
TQWidget *m_pDesktop; TQWidget *m_pDesktop;
TQTimer *m_pTimer; TQTimer *m_pTimer;
#ifdef COMPOSITE KPixmap *m_tPixmap;
KPixmap *m_tPixmap;
#endif
TQPtrVector<KVirtualBGRenderer> m_Renderer; TQPtrVector<KVirtualBGRenderer> m_Renderer;
TQPtrVector<KBackgroundCacheEntry> m_Cache; TQPtrVector<KBackgroundCacheEntry> m_Cache;

@ -135,7 +135,7 @@ KDesktop::WheelDirection KDesktop::m_eWheelDirection = KDesktop::m_eDefaultWheel
const char* KDesktop::m_wheelDirectionStrings[2] = { "Forward", "Reverse" }; const char* KDesktop::m_wheelDirectionStrings[2] = { "Forward", "Reverse" };
KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) : KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) :
DCOPObject( "KDesktopIface" ), KDesktopIface(),
TQWidget( 0L, "desktop", (WFlags)(WResizeNoErase | ( x_root_hack ? (WStyle_Customize | WStyle_NoBorder) : 0)) ), TQWidget( 0L, "desktop", (WFlags)(WResizeNoErase | ( x_root_hack ? (WStyle_Customize | WStyle_NoBorder) : 0)) ),
// those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd) // those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd)
startup_id( NULL ), m_waitForKicker(0) startup_id( NULL ), m_waitForKicker(0)

@ -59,7 +59,8 @@ signals:
* It handles the background, the screensaver and all the rest of the global stuff. * It handles the background, the screensaver and all the rest of the global stuff.
* The icon view is a child widget of KDesktop. * The icon view is a child widget of KDesktop.
*/ */
class KDesktop : public TQWidget, virtual public KDesktopIface class KDesktop : public TQWidget,
public KDesktopIface
{ {
Q_OBJECT Q_OBJECT

@ -49,14 +49,14 @@ class KDesktopApp : public KUniqueApplication
return m_bgSupported; return m_bgSupported;
} }
#endif #endif
signals: signals:
void cmBackgroundChanged(bool supported); void cmBackgroundChanged(bool supported);
#ifdef COMPOSITE #ifdef COMPOSITE
private: private:
void initCmBackground(); void initCmBackground();
private: private:
Atom m_cmBackground; Atom m_cmBackground;

@ -34,7 +34,7 @@ extern xautolock_corner_t xautolock_corners[ 4 ];
// a newly started process. // a newly started process.
// //
SaverEngine::SaverEngine() SaverEngine::SaverEngine()
: DCOPObject("KScreensaverIface"), : KScreensaverIface(),
TQWidget(), TQWidget(),
mBlankOnly(false) mBlankOnly(false)
{ {

@ -24,7 +24,7 @@ class DCOPClientTransaction;
*/ */
class SaverEngine class SaverEngine
: public TQWidget, : public TQWidget,
virtual public KScreensaverIface public KScreensaverIface
{ {
Q_OBJECT Q_OBJECT
public: public:

Loading…
Cancel
Save