Changeset View
Changeset View
Standalone View
Standalone View
addons/lspclient/lspclientservermanager.cpp
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Line(s) | |||||
165 | // helper guard to handle revision (un)lock | 165 | // helper guard to handle revision (un)lock | ||
166 | struct RevisionGuard { | 166 | struct RevisionGuard { | ||
167 | QPointer<KTextEditor::Document> m_doc; | 167 | QPointer<KTextEditor::Document> m_doc; | ||
168 | KTextEditor::MovingInterface *m_movingInterface = nullptr; | 168 | KTextEditor::MovingInterface *m_movingInterface = nullptr; | ||
169 | qint64 m_revision = -1; | 169 | qint64 m_revision = -1; | ||
170 | 170 | | |||
171 | RevisionGuard(KTextEditor::Document *doc = nullptr) | 171 | RevisionGuard(KTextEditor::Document *doc = nullptr) | ||
172 | : m_doc(doc), | 172 | : m_doc(doc), | ||
173 | m_movingInterface(qobject_cast<KTextEditor::MovingInterface *>(doc)), | 173 | m_movingInterface(qobject_cast<KTextEditor::MovingInterface *>(doc)) | ||
174 | m_revision(-1) | | |||
175 | { | 174 | { | ||
176 | if (m_movingInterface) { | 175 | if (m_movingInterface) { | ||
177 | m_revision = m_movingInterface->revision(); | 176 | m_revision = m_movingInterface->revision(); | ||
178 | m_movingInterface->lockRevision(m_revision); | 177 | m_movingInterface->lockRevision(m_revision); | ||
179 | } | 178 | } | ||
180 | } | 179 | } | ||
181 | 180 | | |||
182 | // really only need/allow this one (out of 5) | 181 | // really only need/allow this one (out of 5) | ||
▲ Show 20 Lines • Show All 626 Lines • Show Last 20 Lines |