summaryrefslogtreecommitdiffstats
path: root/synchronizer/main.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2014-12-06 02:33:51 +0100
committerAaron Seigo <aseigo@kde.org>2014-12-06 02:33:51 +0100
commit5f40ace47be289c74ad95948c75ed86676158639 (patch)
treeb3c50012da8c7404398050a17724342866a9e83e /synchronizer/main.cpp
parent6b8994edba4fcc0663838b90f66fe2ad0f9e134a (diff)
downloadsink-5f40ace47be289c74ad95948c75ed86676158639.tar.gz
sink-5f40ace47be289c74ad95948c75ed86676158639.zip
resource -> synchronizer
the resource will be the plugin that interacts with the source and store
Diffstat (limited to 'synchronizer/main.cpp')
-rw-r--r--synchronizer/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp
new file mode 100644
index 0000000..91c0a9a
--- /dev/null
+++ b/synchronizer/main.cpp
@@ -0,0 +1,25 @@
1
2#include <QApplication>
3
4#include "common/console.h"
5#include "listener.h"
6
7int main(int argc, char *argv[])
8{
9 QApplication app(argc, argv);
10
11 new Console(QString("Resource: %1").arg(argv[1]));
12 if (argc < 2) {
13 Console::main()->log("Not enough args");
14 return app.exec();
15 }
16
17 Listener *listener = new Listener(argv[1]);
18
19 QObject::connect(&app, &QCoreApplication::aboutToQuit,
20 listener, &Listener::closeAllConnections);
21 QObject::connect(listener, &Listener::noClients,
22 &app, &QCoreApplication::quit);
23
24 return app.exec();
25} \ No newline at end of file