forked from qt-creator/qt-creator
CMake: Allow cancellation of CMake process
Allow cancellation of cmake runs in tea-leaf and fileapi modes. At least in those modes cmake can now get stopped when it goes into an infinite loop. Change-Id: I4e9bd769292325b9837904cd391ff61dbc477898 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QFutureInterface>
|
||||
#include <QTimer>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -67,10 +68,13 @@ signals:
|
||||
|
||||
private:
|
||||
void handleProcessFinished(int code, QProcess::ExitStatus status);
|
||||
void checkForCancelled();
|
||||
|
||||
std::unique_ptr<Utils::QtcProcess> m_process;
|
||||
std::unique_ptr<ProjectExplorer::IOutputParser> m_parser;
|
||||
std::unique_ptr<QFutureInterface<void>> m_future;
|
||||
bool m_processWasCanceled = false;
|
||||
QTimer m_cancelTimer;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user