Move factory to d-ptr class KDecorationPrivate
This commit is contained in:
parent
7c1a7f46d8
commit
f0e8f5ee64
2 changed files with 5 additions and 5 deletions
|
@ -54,13 +54,15 @@ inheriting KCommonDecoration and adding the new API matching KDecoration2.
|
||||||
class KDecorationPrivate
|
class KDecorationPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KDecorationPrivate(KDecorationBridge *b)
|
KDecorationPrivate(KDecorationBridge *b, KDecorationFactory *f)
|
||||||
: bridge(b)
|
: bridge(b)
|
||||||
|
, factory(f)
|
||||||
, alphaEnabled(false)
|
, alphaEnabled(false)
|
||||||
, w()
|
, w()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
KDecorationBridge *bridge;
|
KDecorationBridge *bridge;
|
||||||
|
KDecorationFactory *factory;
|
||||||
bool alphaEnabled;
|
bool alphaEnabled;
|
||||||
QScopedPointer<QWidget> w;
|
QScopedPointer<QWidget> w;
|
||||||
};
|
};
|
||||||
|
@ -68,8 +70,7 @@ public:
|
||||||
KDecorationOptions* KDecoration::options_;
|
KDecorationOptions* KDecoration::options_;
|
||||||
|
|
||||||
KDecoration::KDecoration(KDecorationBridge* bridge, KDecorationFactory* factory)
|
KDecoration::KDecoration(KDecorationBridge* bridge, KDecorationFactory* factory)
|
||||||
: factory_(factory),
|
: d(new KDecorationPrivate(bridge, factory))
|
||||||
d(new KDecorationPrivate(bridge))
|
|
||||||
{
|
{
|
||||||
factory->addDecoration(this);
|
factory->addDecoration(this);
|
||||||
connect(this, static_cast<void (KDecoration::*)(bool)>(&KDecoration::keepAboveChanged),
|
connect(this, static_cast<void (KDecoration::*)(bool)>(&KDecoration::keepAboveChanged),
|
||||||
|
@ -517,7 +518,7 @@ const QWidget* KDecoration::widget() const
|
||||||
|
|
||||||
KDecorationFactory* KDecoration::factory() const
|
KDecorationFactory* KDecoration::factory() const
|
||||||
{
|
{
|
||||||
return factory_;
|
return d->factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KDecoration::isOnAllDesktops() const
|
bool KDecoration::isOnAllDesktops() const
|
||||||
|
|
|
@ -1156,7 +1156,6 @@ protected Q_SLOTS:
|
||||||
QRegion region(KDecorationDefines::Region r);
|
QRegion region(KDecorationDefines::Region r);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KDecorationFactory* factory_;
|
|
||||||
friend class KDecorationOptions; // for options_
|
friend class KDecorationOptions; // for options_
|
||||||
static KDecorationOptions* options_;
|
static KDecorationOptions* options_;
|
||||||
KDecorationPrivate* d;
|
KDecorationPrivate* d;
|
||||||
|
|
Loading…
Reference in a new issue