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
|
||||
{
|
||||
public:
|
||||
KDecorationPrivate(KDecorationBridge *b)
|
||||
KDecorationPrivate(KDecorationBridge *b, KDecorationFactory *f)
|
||||
: bridge(b)
|
||||
, factory(f)
|
||||
, alphaEnabled(false)
|
||||
, w()
|
||||
{
|
||||
}
|
||||
KDecorationBridge *bridge;
|
||||
KDecorationFactory *factory;
|
||||
bool alphaEnabled;
|
||||
QScopedPointer<QWidget> w;
|
||||
};
|
||||
|
@ -68,8 +70,7 @@ public:
|
|||
KDecorationOptions* KDecoration::options_;
|
||||
|
||||
KDecoration::KDecoration(KDecorationBridge* bridge, KDecorationFactory* factory)
|
||||
: factory_(factory),
|
||||
d(new KDecorationPrivate(bridge))
|
||||
: d(new KDecorationPrivate(bridge, factory))
|
||||
{
|
||||
factory->addDecoration(this);
|
||||
connect(this, static_cast<void (KDecoration::*)(bool)>(&KDecoration::keepAboveChanged),
|
||||
|
@ -517,7 +518,7 @@ const QWidget* KDecoration::widget() const
|
|||
|
||||
KDecorationFactory* KDecoration::factory() const
|
||||
{
|
||||
return factory_;
|
||||
return d->factory;
|
||||
}
|
||||
|
||||
bool KDecoration::isOnAllDesktops() const
|
||||
|
|
|
@ -1156,7 +1156,6 @@ protected Q_SLOTS:
|
|||
QRegion region(KDecorationDefines::Region r);
|
||||
|
||||
private:
|
||||
KDecorationFactory* factory_;
|
||||
friend class KDecorationOptions; // for options_
|
||||
static KDecorationOptions* options_;
|
||||
KDecorationPrivate* d;
|
||||
|
|
Loading…
Reference in a new issue