forked from qt-creator/qt-creator
Improve safety of VcsCommand
Amends 6e85ff9f4b
Using "invokeMethod(m_outputWindow, ..." has the disadvantage that it
crashes if m_outputWindow was deleted. This is nicely handled when
connecting to signals, so switch back to signals.
Change-Id: I6a681ac48a86536fa8e69e42d3c61ffa9d30c3d5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -138,21 +138,17 @@ signals:
|
||||
|
||||
void terminate(); // Internal
|
||||
|
||||
void append(const QString &text);
|
||||
void appendSilently(const QString &text);
|
||||
void appendError(const QString &text);
|
||||
void appendCommand(const QString &workingDirectory, const Utils::CommandLine &command);
|
||||
void appendMessage(const QString &text);
|
||||
|
||||
protected:
|
||||
virtual void addTask(QFuture<void> &future);
|
||||
int timeoutS() const;
|
||||
QString workDirectory(const QString &wd) const;
|
||||
|
||||
// Below methods are called directly from other threads
|
||||
virtual void append(const QString &text) { Q_UNUSED(text) }
|
||||
virtual void appendSilently(const QString &text) { Q_UNUSED(text) }
|
||||
virtual void appendError(const QString &text) { Q_UNUSED(text) }
|
||||
virtual void appendCommand(const QString &workingDirectory, const Utils::CommandLine &command) {
|
||||
Q_UNUSED(workingDirectory)
|
||||
Q_UNUSED(command)
|
||||
}
|
||||
virtual void appendMessage(const QString &text) { Q_UNUSED(text) }
|
||||
|
||||
private:
|
||||
void run(QFutureInterface<void> &future);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user