summaryrefslogtreecommitdiff
path: root/tests/manual/debugger/multi/main.cpp
blob: 39a77739b1f2f83e5bf103e970344c525d1a9f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)));
    }
}