diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-11-20 16:28:31 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-11-20 16:28:31 +0100 |
commit | ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1 (patch) | |
tree | c4ad96fde99c38ee66c0ba7d0f8231bc5326b3d6 /resource/main.cpp | |
download | sink-ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1.tar.gz sink-ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1.zip |
sketch in the client/resource model
Diffstat (limited to 'resource/main.cpp')
-rw-r--r-- | resource/main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/resource/main.cpp b/resource/main.cpp new file mode 100644 index 0000000..3bd4656 --- /dev/null +++ b/resource/main.cpp | |||
@@ -0,0 +1,23 @@ | |||
1 | |||
2 | #include <QApplication> | ||
3 | |||
4 | #include "common/console.h" | ||
5 | #include "listener.h" | ||
6 | |||
7 | int main(int argc, char *argv[]) | ||
8 | { | ||
9 | QApplication app(argc, argv); | ||
10 | |||
11 | new Console(QString("Toy 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 | |||
22 | return app.exec(); | ||
23 | } \ No newline at end of file | ||