KDecorationFactory inherits from QObject

Adjusting to reality: our decorations have the factory already inheriting
from QObject.
icc-effect-5.14.5
Martin Gräßlin 2013-08-23 09:05:59 +02:00
parent 10e044151e
commit 784c40a338
6 changed files with 14 additions and 11 deletions

View File

@ -38,9 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Aurorae
{
AuroraeFactory::AuroraeFactory()
: QObject()
, KDecorationFactory()
AuroraeFactory::AuroraeFactory(QObject *parent)
: KDecorationFactory(parent)
, m_theme(new AuroraeTheme(this))
, m_engine(new QDeclarativeEngine(this))
, m_component(new QDeclarativeComponent(m_engine, this))

View File

@ -37,7 +37,7 @@ namespace Aurorae
class AuroraeTheme;
class AuroraeClient;
class AuroraeFactory : public QObject, public KDecorationFactory
class AuroraeFactory : public KDecorationFactory
{
Q_OBJECT
public:
@ -62,7 +62,7 @@ private:
AuroraeEngine,
QMLEngine
};
AuroraeFactory();
explicit AuroraeFactory(QObject *parent = nullptr);
void init();
void initAurorae(KConfig &conf, KConfigGroup &group);
void initQML(const KConfigGroup& group);

View File

@ -40,7 +40,8 @@ namespace Oxygen
{
//___________________________________________________
Factory::Factory():
Factory::Factory(QObject *parent):
KDecorationFactory(parent),
_initialized( false ),
_helper(),
_shadowCache( _helper )

View File

@ -54,7 +54,7 @@ namespace Oxygen
};
//! window decoration factory
class Factory: public QObject, public KDecorationFactory
class Factory: public KDecorationFactory
{
Q_OBJECT
@ -62,7 +62,7 @@ namespace Oxygen
public:
//! constructor
Factory();
explicit Factory(QObject *parent = nullptr);
//! destructor
virtual ~Factory();

View File

@ -36,7 +36,9 @@ public:
Qt::Corner closeButtonCorner;
};
KDecorationFactory::KDecorationFactory() : d(new KDecorationFactoryPrivate)
KDecorationFactory::KDecorationFactory(QObject *parent)
: QObject(parent)
, d(new KDecorationFactoryPrivate)
{
}

View File

@ -35,14 +35,15 @@ class KDecorationBridge;
class KDecorationFactoryPrivate;
class KWIN_EXPORT KDecorationFactory
: public KDecorationDefines
: public QObject, public KDecorationDefines
{
Q_OBJECT
public:
/**
* Constructor. Called after loading the decoration plugin. All global
* initialization of the plugin should be done in the factory constructor.
*/
KDecorationFactory();
explicit KDecorationFactory(QObject *parent = nullptr);
/**
* Destructor. Called before unloading the decoration plugin. All global
* cleanup of the plugin should be done in the factory destructor.