forked from qt-creator/qt-creator
Clang: Check that local renaming QFuture is not cancelled
We can't take QFuture result if it's cancelled. Task-number: QTCREATORBUG-20008 Change-Id: I781746cf1d638627bb5992efa23d94111908f6d0 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -52,6 +52,8 @@ void RefactoringEngine::startLocalRenaming(const CppTools::CursorInEditor &data,
|
|||||||
return defaultCallback();
|
return defaultCallback();
|
||||||
|
|
||||||
QObject::connect(&m_watcher, &FutureCursorWatcher::finished, [=]() {
|
QObject::connect(&m_watcher, &FutureCursorWatcher::finished, [=]() {
|
||||||
|
if (m_watcher.isCanceled())
|
||||||
|
return defaultCallback();
|
||||||
const CppTools::CursorInfo info = m_watcher.result();
|
const CppTools::CursorInfo info = m_watcher.result();
|
||||||
if (info.useRanges.empty())
|
if (info.useRanges.empty())
|
||||||
return defaultCallback();
|
return defaultCallback();
|
||||||
|
|||||||
Reference in New Issue
Block a user