2019-07-22 21:48:06 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
2019-07-22 21:48:06 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2019-07-22 21:48:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "objectfactory.h"
|
|
|
|
|
|
|
|
QObject* ObjectFactory::create() {
|
|
|
|
if (m_f0) return m_f0();
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
QObject* ObjectFactory::create(const QVariant& arg1) {
|
|
|
|
if (m_f1) return m_f1(arg1);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
QObject* ObjectFactory::create(const QVariant& arg1, const QVariant& arg2) {
|
|
|
|
if (m_f2) return m_f2(arg1, arg2);
|
|
|
|
return nullptr;
|
|
|
|
}
|