DBus enabling of base classes plus sample for testing / show how to use them. Also qdbuscpp2xml plugin for blackmisc classes.

This commit is contained in:
Klaus Basan
2013-07-22 14:33:50 +02:00
parent 6736209945
commit 8b512ba818
48 changed files with 1264 additions and 52 deletions

View File

@@ -0,0 +1,32 @@
#include "testservicetool.h"
namespace BlackMiscTest
{
/*
* Start a new process
*/
QProcess * TestserviceTool::startNewProcess(const QString &executable, QObject *parent = 0)
{
QProcess *process = new QProcess(parent);
process->startDetached(executable);
return process;
}
/*
* Sleep
*/
void TestserviceTool::sleep(qint32 ms)
{
if (ms < 1) return;
#ifdef Q_OS_WIN
Sleep(uint(ms));
#else
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
nanosleep(&ts, NULL);
#endif
}
} // namespace