forked from qt-creator/qt-creator
Utils: Start adding some asynchronous API to FilePath
Especially with the "remote" scenarios synchronous operations cannot be expected to work reasonably well. This here starts with adding asynchronous versions to some of the FilePath member functions, taking additional "Continuation" style. This is not necessarily the final syntax (sugar like .then(...) comes to mind...), but is simple enough for now for the few uses we have, and it is too early to see what will be needed in the end. Change-Id: Idf4dde1b77d04cafb81b6c024031145bdd91a762 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -223,10 +223,11 @@ void CallgrindController::getLocalDataFile()
|
||||
// this, &CallgrindController::sftpInitialized);
|
||||
// m_sftp->start();
|
||||
|
||||
const bool res = m_valgrindOutputFile.copyFile(m_hostOutputFile);
|
||||
QTC_CHECK(res);
|
||||
|
||||
emit localParseDataAvailable(m_hostOutputFile);
|
||||
const auto afterCopy = [this](bool res) {
|
||||
QTC_CHECK(res);
|
||||
emit localParseDataAvailable(m_hostOutputFile);
|
||||
};
|
||||
m_valgrindOutputFile.asyncCopyFile(afterCopy, m_hostOutputFile);
|
||||
}
|
||||
|
||||
void CallgrindController::sftpInitialized()
|
||||
|
||||
Reference in New Issue
Block a user