File: objectfactory.cpp

package info (click to toggle)
kdeconnect 25.04.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,584 kB
  • sloc: cpp: 22,922; xml: 520; python: 92; sh: 25; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
 * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
 *
 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
 */

#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;
}

#include "moc_objectfactory.cpp"