From 496a3cb583a2f5fb2da7c1808077c1fc5a9bfc28 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 15 Dec 2017 13:56:26 -0500 Subject: A bit more work on the networking side of the OSInterface. Also add a test project for running tests against particular frameworks. --- src-qt5/src-cpp/tests/main.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src-qt5/src-cpp/tests/main.cpp (limited to 'src-qt5/src-cpp/tests/main.cpp') diff --git a/src-qt5/src-cpp/tests/main.cpp b/src-qt5/src-cpp/tests/main.cpp new file mode 100644 index 00000000..682c318a --- /dev/null +++ b/src-qt5/src-cpp/tests/main.cpp @@ -0,0 +1,38 @@ +#include +#include + +#include + +/* +class tester : public QObject{ + Q_OBJECT +public slots: + void finished(){ QApplication::exit(0); } + +public: + QTimer *timer; + + tester(){ + timer = new QTimer(this); + timer->setInterval(5000); + timer->setSingleShot(true); + connect(timer, SIGNAL(timeout()), this, SLOT(finished()) ); + } + +}; +*/ + +int main(int argc, char** argv){ + + QApplication A(argc,argv); + OSInterface OS; + OS.start(); + QTimer *timer = new QTimer(); + timer->setInterval(5000); + timer->setSingleShot(true); + QObject::connect(timer, SIGNAL(timeout()), &A, SLOT(quit()) ); + timer->start(); + int ret = A.exec(); + qDebug() << " - Finished"; + return ret; +} -- cgit