forked from qt-creator/qt-creator
Valgrind: Merge MemCheckRunner and ValgrindRunner base
It's mostly the xml/log handling, which can be re-used in other tools. The change is purely mechanical, including some style fixes and some modernization. Change-Id: I6b44ae71451e8d3e26df40b9af9b4ec70038a92d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
|
||||
namespace Valgrind {
|
||||
|
||||
namespace XmlProtocol { class ThreadedParser; }
|
||||
|
||||
class ValgrindProcess;
|
||||
|
||||
class ValgrindRunner : public QObject
|
||||
@@ -63,12 +65,16 @@ public:
|
||||
|
||||
QString errorString() const;
|
||||
|
||||
virtual bool start();
|
||||
bool start();
|
||||
void stop();
|
||||
|
||||
ValgrindProcess *valgrindProcess() const;
|
||||
|
||||
void setParser(XmlProtocol::ThreadedParser *parser);
|
||||
void disableXml();
|
||||
|
||||
signals:
|
||||
void logMessageReceived(const QByteArray &);
|
||||
void extraStart();
|
||||
|
||||
void processOutputReceived(const QString &, Utils::OutputFormat);
|
||||
@@ -77,12 +83,18 @@ signals:
|
||||
void finished();
|
||||
void extraProcessFinished();
|
||||
|
||||
protected:
|
||||
virtual void processError(QProcess::ProcessError);
|
||||
virtual void processFinished(int, QProcess::ExitStatus);
|
||||
virtual void localHostAddressRetrieved(const QHostAddress &localHostAddress);
|
||||
|
||||
private:
|
||||
bool startServers(const QHostAddress &localHostAddress);
|
||||
QStringList memcheckLogArguments() const;
|
||||
|
||||
void processError(QProcess::ProcessError);
|
||||
void processFinished(int, QProcess::ExitStatus);
|
||||
|
||||
void localHostAddressRetrieved(const QHostAddress &localHostAddress);
|
||||
void xmlSocketConnected();
|
||||
void logSocketConnected();
|
||||
void readLogSocket();
|
||||
|
||||
class Private;
|
||||
Private *d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user