Changeset View
Changeset View
Standalone View
Standalone View
debuggers/gdb/printers/tests/qtprinters.cpp
Show All 25 Lines | |||||
26 | 26 | | |||
27 | #include "qtprintersconfig.h" | 27 | #include "qtprintersconfig.h" | ||
28 | 28 | | |||
29 | const QString BINARY_PATH(PRINTER_BIN_DIR); | 29 | const QString BINARY_PATH(PRINTER_BIN_DIR); | ||
30 | 30 | | |||
31 | class GdbProcess : private QProcess | 31 | class GdbProcess : private QProcess | ||
32 | { | 32 | { | ||
33 | public: | 33 | public: | ||
34 | GdbProcess(const QString &program) : QProcess() | 34 | explicit GdbProcess(const QString &program) : QProcess() | ||
35 | { | 35 | { | ||
36 | setProcessChannelMode(MergedChannels); | 36 | setProcessChannelMode(MergedChannels); | ||
37 | // don't attempt to load .gdbinit in home (may cause unexpected results) | 37 | // don't attempt to load .gdbinit in home (may cause unexpected results) | ||
38 | QProcess::start("gdb", (QStringList() << "-nx" << (BINARY_PATH + '/' + program))); | 38 | QProcess::start("gdb", (QStringList() << "-nx" << (BINARY_PATH + '/' + program))); | ||
39 | const bool started = waitForStarted(); | 39 | const bool started = waitForStarted(); | ||
40 | if (!started) { | 40 | if (!started) { | ||
41 | qDebug() << "Failed to start 'gdb' executable:" << errorString(); | 41 | qDebug() << "Failed to start 'gdb' executable:" << errorString(); | ||
42 | Q_ASSERT(false); | 42 | Q_ASSERT(false); | ||
▲ Show 20 Lines • Show All 412 Lines • Show Last 20 Lines |