forked from qt-creator/qt-creator
debugger: add test code for multi-process debugging
Change-Id: I10a419a5dc538d4d42bab7f3f2070430db388eed Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
16
tests/manual/debugger/multi/main.cpp
Normal file
16
tests/manual/debugger/multi/main.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
QStringList args = app.arguments();
|
||||||
|
|
||||||
|
int n = args.size() == 1 ? 3 : args.at(0).toInt() - 1;
|
||||||
|
if (n >= 0) {
|
||||||
|
QProcess proc;
|
||||||
|
proc.startDetached(args.at(0), QStringList(QString::number(n)));
|
||||||
|
}
|
||||||
|
}
|
9
tests/manual/debugger/multi/multi.pro
Normal file
9
tests/manual/debugger/multi/multi.pro
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
TEMPLATE = app
|
||||||
|
TARGET = multi
|
||||||
|
DEPENDPATH += .
|
||||||
|
INCLUDEPATH += .
|
||||||
|
|
||||||
|
SOURCES += main.cpp
|
||||||
|
CONFIG += qt warn_on debug
|
||||||
|
OBJECTS_DIR = .obj/debug-shared
|
||||||
|
MOC_DIR = .moc/debug-shared
|
Reference in New Issue
Block a user