forked from qt-creator/qt-creator
QtcProcess: Add starting() signal
Will be useful for VcsCommand controlling. Change-Id: I6e0199c7a45948526cfd916907b098472b78219c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -704,6 +704,7 @@ public:
|
||||
void handleDone(const ProcessResultData &data);
|
||||
void clearForRun();
|
||||
|
||||
void emitStarting();
|
||||
void emitStarted();
|
||||
void emitDone();
|
||||
void emitReadyReadStandardOutput();
|
||||
@@ -1149,6 +1150,7 @@ void QtcProcess::start()
|
||||
// Pass a dynamic property with info about blocking type
|
||||
d->m_process->setProperty(QTC_PROCESS_BLOCKING_TYPE, property(QTC_PROCESS_BLOCKING_TYPE));
|
||||
}
|
||||
d->emitStarting();
|
||||
d->m_process->start();
|
||||
}
|
||||
|
||||
@@ -2031,6 +2033,12 @@ void QtcProcessPrivate::handleDone(const ProcessResultData &data)
|
||||
m_applicationMainThreadId = 0;
|
||||
}
|
||||
|
||||
void QtcProcessPrivate::emitStarting()
|
||||
{
|
||||
GuardLocker locker(m_guard);
|
||||
emit q->starting();
|
||||
}
|
||||
|
||||
void QtcProcessPrivate::emitStarted()
|
||||
{
|
||||
GuardLocker locker(m_guard);
|
||||
|
||||
@@ -177,8 +177,9 @@ public:
|
||||
QString toStandaloneCommandLine() const;
|
||||
|
||||
signals:
|
||||
void started();
|
||||
void done();
|
||||
void starting(); // On NotRunning -> Starting state transition
|
||||
void started(); // On Starting -> Running state transition
|
||||
void done(); // On Starting | Running -> NotRunning state transition
|
||||
void readyReadStandardOutput();
|
||||
void readyReadStandardError();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user