diff --git a/dialer/src/CMakeLists.txt b/dialer/src/CMakeLists.txt index f430c3f6..e3c452ed 100644 --- a/dialer/src/CMakeLists.txt +++ b/dialer/src/CMakeLists.txt @@ -2,6 +2,7 @@ set(plasmaphonedialer_SRCS main.cpp + dialerutils.cpp ) add_executable(plasmaphonedialer ${plasmaphonedialer_SRCS}) diff --git a/dialer/src/dialerutils.cpp b/dialer/src/dialerutils.cpp new file mode 100644 index 00000000..745a4da3 --- /dev/null +++ b/dialer/src/dialerutils.cpp @@ -0,0 +1,33 @@ +/* + * Copyright 2015 Marco Martin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "dialerutils.h" + +#include + +DialerUtils::DialerUtils(QObject *parent) +: QObject(parent) +{ + +} + +DialerUtils::~DialerUtils() +{ +} + +#include "moc_dialerutils.cpp" diff --git a/dialer/src/dialerutils.h b/dialer/src/dialerutils.h new file mode 100644 index 00000000..ae2d5d23 --- /dev/null +++ b/dialer/src/dialerutils.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 Marco Martin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef DIALERUTILS_H +#define DIALERUTILS_H + +#include + +class DialerUtils : public QObject +{ + Q_OBJECT +public: + + DialerUtils(QObject *parent = 0); + virtual ~DialerUtils(); + +private: + +}; + + +#endif diff --git a/dialer/src/main.cpp b/dialer/src/main.cpp index 8b7862ce..7356386f 100644 --- a/dialer/src/main.cpp +++ b/dialer/src/main.cpp @@ -19,6 +19,8 @@ #include +#include "dialerutils.h" + #include #include #include @@ -67,6 +69,9 @@ int main(int argc, char **argv) obj->loadPackage(packagePath); obj->engine()->rootContext()->setContextProperty("commandlineArguments", parser.positionalArguments()); + DialerUtils *dialerUtils = new DialerUtils; + obj->engine()->rootContext()->setContextProperty("dialerUtils", QVariant::fromValue(dialerUtils)); + obj->completeInitialization(); if (!obj->package().metadata().isValid()) {