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 <dcopref.h>
class KDesktopIface : virtual public DCOPObject
class KDesktopIface : public DCOPObject
{
K_DCOP
public:
KDesktopIface() : DCOPObject("KDesktopIface") {}
k_dcop:
/**
* @internal

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

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

@ -135,7 +135,7 @@ KDesktop::WheelDirection KDesktop::m_eWheelDirection = KDesktop::m_eDefaultWheel
const char* KDesktop::m_wheelDirectionStrings[2] = { "Forward", "Reverse" };
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)) ),
// those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd)
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.
* The icon view is a child widget of KDesktop.
*/
class KDesktop : public TQWidget, virtual public KDesktopIface
class KDesktop : public TQWidget,
public KDesktopIface
{
Q_OBJECT

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

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

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

Loading…
Cancel
Save