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 handleDone(const ProcessResultData &data);
|
||||||
void clearForRun();
|
void clearForRun();
|
||||||
|
|
||||||
|
void emitStarting();
|
||||||
void emitStarted();
|
void emitStarted();
|
||||||
void emitDone();
|
void emitDone();
|
||||||
void emitReadyReadStandardOutput();
|
void emitReadyReadStandardOutput();
|
||||||
@@ -1149,6 +1150,7 @@ void QtcProcess::start()
|
|||||||
// Pass a dynamic property with info about blocking type
|
// Pass a dynamic property with info about blocking type
|
||||||
d->m_process->setProperty(QTC_PROCESS_BLOCKING_TYPE, property(QTC_PROCESS_BLOCKING_TYPE));
|
d->m_process->setProperty(QTC_PROCESS_BLOCKING_TYPE, property(QTC_PROCESS_BLOCKING_TYPE));
|
||||||
}
|
}
|
||||||
|
d->emitStarting();
|
||||||
d->m_process->start();
|
d->m_process->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2031,6 +2033,12 @@ void QtcProcessPrivate::handleDone(const ProcessResultData &data)
|
|||||||
m_applicationMainThreadId = 0;
|
m_applicationMainThreadId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtcProcessPrivate::emitStarting()
|
||||||
|
{
|
||||||
|
GuardLocker locker(m_guard);
|
||||||
|
emit q->starting();
|
||||||
|
}
|
||||||
|
|
||||||
void QtcProcessPrivate::emitStarted()
|
void QtcProcessPrivate::emitStarted()
|
||||||
{
|
{
|
||||||
GuardLocker locker(m_guard);
|
GuardLocker locker(m_guard);
|
||||||
|
|||||||
@@ -177,8 +177,9 @@ public:
|
|||||||
QString toStandaloneCommandLine() const;
|
QString toStandaloneCommandLine() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void started();
|
void starting(); // On NotRunning -> Starting state transition
|
||||||
void done();
|
void started(); // On Starting -> Running state transition
|
||||||
|
void done(); // On Starting | Running -> NotRunning state transition
|
||||||
void readyReadStandardOutput();
|
void readyReadStandardOutput();
|
||||||
void readyReadStandardError();
|
void readyReadStandardError();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user