Changeset View
Changeset View
Standalone View
Standalone View
src/utils/ktexteditor.cpp
Show All 26 Lines | |||||
27 | 27 | | |||
28 | #include "document.h" | 28 | #include "document.h" | ||
29 | 29 | | |||
30 | #include "view.h" | 30 | #include "view.h" | ||
31 | 31 | | |||
32 | #include "plugin.h" | 32 | #include "plugin.h" | ||
33 | 33 | | |||
34 | #include "command.h" | 34 | #include "command.h" | ||
35 | #include "inlinenoteinterface.h" | ||||
35 | #include "markinterface.h" | 36 | #include "markinterface.h" | ||
36 | #include "modificationinterface.h" | 37 | #include "modificationinterface.h" | ||
37 | #include "sessionconfiginterface.h" | 38 | #include "sessionconfiginterface.h" | ||
38 | #include "texthintinterface.h" | 39 | #include "texthintinterface.h" | ||
39 | 40 | | |||
40 | #include "annotationinterface.h" | 41 | #include "annotationinterface.h" | ||
41 | 42 | | |||
42 | #include "kateglobal.h" | 43 | #include "kateglobal.h" | ||
▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | |||||
205 | {} | 206 | {} | ||
206 | 207 | | |||
207 | TextHintProvider::TextHintProvider() | 208 | TextHintProvider::TextHintProvider() | ||
208 | {} | 209 | {} | ||
209 | 210 | | |||
210 | TextHintProvider::~TextHintProvider() | 211 | TextHintProvider::~TextHintProvider() | ||
211 | {} | 212 | {} | ||
212 | 213 | | |||
214 | InlineNoteInterface::InlineNoteInterface() | ||||
215 | {} | ||||
216 | | ||||
217 | InlineNoteInterface::~InlineNoteInterface() | ||||
218 | {} | ||||
219 | | ||||
220 | InlineNoteProvider::InlineNoteProvider() | ||||
221 | {} | ||||
222 | | ||||
223 | InlineNoteProvider::~InlineNoteProvider() | ||||
224 | {} | ||||
225 | | ||||
213 | Command::Command(const QStringList &cmds, QObject *parent) | 226 | Command::Command(const QStringList &cmds, QObject *parent) | ||
214 | : QObject(parent) | 227 | : QObject(parent) | ||
215 | , m_cmds (cmds) | 228 | , m_cmds (cmds) | ||
216 | , d(nullptr) | 229 | , d(nullptr) | ||
217 | { | 230 | { | ||
218 | // register this command | 231 | // register this command | ||
219 | static_cast<KTextEditor::EditorPrivate *> (KTextEditor::Editor::instance())->cmdManager()->registerCommand (this); | 232 | static_cast<KTextEditor::EditorPrivate *> (KTextEditor::Editor::instance())->cmdManager()->registerCommand (this); | ||
220 | } | 233 | } | ||
221 | 234 | | |||
222 | Command::~Command() | 235 | Command::~Command() | ||
223 | { | 236 | { | ||
224 | // unregister this command, if instance is still there! | 237 | // unregister this command, if instance is still there! | ||
225 | if (KTextEditor::Editor::instance()) | 238 | if (KTextEditor::Editor::instance()) | ||
dhaumann: When members are initialized in the header file, you can write here:
InlineNote… | |||||
226 | static_cast<KTextEditor::EditorPrivate *> (KTextEditor::Editor::instance())->cmdManager()->unregisterCommand (this); | 239 | static_cast<KTextEditor::EditorPrivate *> (KTextEditor::Editor::instance())->cmdManager()->unregisterCommand (this); | ||
227 | } | 240 | } | ||
228 | 241 | | |||
229 | bool Command::supportsRange(const QString &) | 242 | bool Command::supportsRange(const QString &) | ||
230 | { | 243 | { | ||
231 | return false; | 244 | return false; | ||
232 | } | 245 | } | ||
233 | 246 | | |||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
When members are initialized in the header file, you can write here: