Commit d6da4e51 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Use class enum for CppUseSelectionsUpdater::CallType

Change-Id: Iaf6df1ccec50b84048933506a46b93bedf77da8e
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent af3416a9
...@@ -774,7 +774,7 @@ QMenu *CppEditorWidget::createRefactorMenu(QWidget *parent) const ...@@ -774,7 +774,7 @@ QMenu *CppEditorWidget::createRefactorMenu(QWidget *parent) const
// updateSemanticInfo(m_semanticHighlighter->semanticInfo(currentSource())); // updateSemanticInfo(m_semanticHighlighter->semanticInfo(currentSource()));
if (isSemanticInfoValidExceptLocalUses()) { if (isSemanticInfoValidExceptLocalUses()) {
d->m_useSelectionsUpdater.update(CppUseSelectionsUpdater::Synchronous); d->m_useSelectionsUpdater.update(CppUseSelectionsUpdater::CallType::Synchronous);
addRefactoringActions(menu, createAssistInterface(QuickFix, ExplicitlyInvoked)); addRefactoringActions(menu, createAssistInterface(QuickFix, ExplicitlyInvoked));
} }
...@@ -881,8 +881,8 @@ void CppEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo, ...@@ -881,8 +881,8 @@ void CppEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo,
if (!d->m_localRenaming.isActive()) { if (!d->m_localRenaming.isActive()) {
const CppUseSelectionsUpdater::CallType type = updateUseSelectionSynchronously const CppUseSelectionsUpdater::CallType type = updateUseSelectionSynchronously
? CppUseSelectionsUpdater::Synchronous ? CppUseSelectionsUpdater::CallType::Synchronous
: CppUseSelectionsUpdater::Asynchronous; : CppUseSelectionsUpdater::CallType::Asynchronous;
d->m_useSelectionsUpdater.update(type); d->m_useSelectionsUpdater.update(type);
} }
......
...@@ -78,7 +78,7 @@ void CppUseSelectionsUpdater::update(CallType callType) ...@@ -78,7 +78,7 @@ void CppUseSelectionsUpdater::update(CallType callType)
params.semanticInfo = cppEditorWidget->semanticInfo(); params.semanticInfo = cppEditorWidget->semanticInfo();
params.textCursor = TextEditor::Convenience::wordStartCursor(cppEditorWidget->textCursor()); params.textCursor = TextEditor::Convenience::wordStartCursor(cppEditorWidget->textCursor());
if (callType == Asynchronous) { if (callType == CallType::Asynchronous) {
if (isSameIdentifierAsBefore(params.textCursor)) if (isSameIdentifierAsBefore(params.textCursor))
return; return;
......
...@@ -49,8 +49,8 @@ public: ...@@ -49,8 +49,8 @@ public:
void scheduleUpdate(); void scheduleUpdate();
void abortSchedule(); void abortSchedule();
enum CallType { Synchronous, Asynchronous }; enum class CallType { Synchronous, Asynchronous };
void update(CallType callType = Asynchronous); void update(CallType callType = CallType::Asynchronous);
signals: signals:
void finished(CppTools::SemanticInfo::LocalUseMap localUses); void finished(CppTools::SemanticInfo::LocalUseMap localUses);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment