KTextEditor

kateglobal.cpp
1 /*
2  SPDX-FileCopyrightText: 2001-2010 Christoph Cullmann <[email protected]>
3  SPDX-FileCopyrightText: 2009 Erlend Hamberg <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "kateglobal.h"
9 #include "config.h"
10 
11 #include <ktexteditor_version.h>
12 
13 #include "katebuffer.h"
14 #include "katecmd.h"
15 #include "katecmds.h"
16 #include "kateconfig.h"
17 #include "katedocument.h"
18 #include "katehighlightingcmds.h"
19 #include "katekeywordcompletion.h"
20 #include "katemodemanager.h"
21 #include "katepartdebug.h"
22 #include "katerenderer.h"
23 #include "katescriptmanager.h"
24 #include "katesedcmd.h"
25 #include "katethemeconfig.h"
26 #include "katevariableexpansionmanager.h"
27 #include "kateview.h"
28 #include "katewordcompletion.h"
29 #include "spellcheck/spellcheck.h"
30 
31 #include "katenormalinputmodefactory.h"
32 #include "kateviinputmodefactory.h"
33 
34 #include <KAboutData>
35 #include <KConfigGroup>
36 #include <KDirWatch>
37 #include <KLocalizedString>
38 #include <KPageDialog>
39 #include <KPageWidgetModel>
40 
41 #include <QApplication>
42 #include <QBoxLayout>
43 #include <QClipboard>
44 #include <QPushButton>
45 #include <QStringListModel>
46 
47 #if LIBGIT2_FOUND
48 #include <git2.h>
49 #endif
50 
51 // BEGIN unit test mode
52 static bool kateUnitTestMode = false;
53 
55 {
56  kateUnitTestMode = true;
57 }
58 
60 {
61  return kateUnitTestMode;
62 }
63 // END unit test mode
64 
65 KTextEditor::EditorPrivate::EditorPrivate(QPointer<KTextEditor::EditorPrivate> &staticInstance)
66  : KTextEditor::Editor(this)
67  , m_aboutData(QStringLiteral("katepart"),
68  i18n("Kate Part"),
69  QStringLiteral(KTEXTEDITOR_VERSION_STRING),
70  i18n("Embeddable editor component"),
71  KAboutLicense::LGPL_V2,
72  i18n("(c) 2000-2019 The Kate Authors"),
73  QString(),
74  QStringLiteral("https://kate-editor.org"))
75  , m_dummyApplication(nullptr)
76  , m_application(&m_dummyApplication)
77  , m_dummyMainWindow(nullptr)
78  , m_searchHistoryModel(nullptr)
79  , m_replaceHistoryModel(nullptr)
80 {
81  // remember this
82  staticInstance = this;
83 
84  // init libgit2, we require at least 0.22 which has this function!
85 #if LIBGIT2_FOUND
86  git_libgit2_init();
87 #endif
88 
89  // register some datatypes
90  qRegisterMetaType<KTextEditor::Cursor>("KTextEditor::Cursor");
91  qRegisterMetaType<KTextEditor::Document *>("KTextEditor::Document*");
92  qRegisterMetaType<KTextEditor::View *>("KTextEditor::View*");
93 
94  //
95  // fill about data
96  //
97  m_aboutData.addAuthor(i18n("Christoph Cullmann"), i18n("Maintainer"), QStringLiteral("[email protected]"), QStringLiteral("https://cullmann.io"));
98  m_aboutData.addAuthor(i18n("Dominik Haumann"), i18n("Core Developer"), QStringLiteral("[email protected]"));
99  m_aboutData.addAuthor(i18n("Milian Wolff"), i18n("Core Developer"), QStringLiteral("[email protected]"), QStringLiteral("https://milianw.de/"));
100  m_aboutData.addAuthor(i18n("Joseph Wenninger"), i18n("Core Developer"), QStringLiteral("[email protected]"), QStringLiteral("http://stud3.tuwien.ac.at/~e9925371"));
101  m_aboutData.addAuthor(i18n("Erlend Hamberg"), i18n("Vi Input Mode"), QStringLiteral("[email protected]"), QStringLiteral("https://hamberg.no/erlend"));
102  m_aboutData.addAuthor(i18n("Bernhard Beschow"), i18n("Developer"), QStringLiteral("[email protected]"), QStringLiteral("https://user.cs.tu-berlin.de/~bbeschow"));
103  m_aboutData.addAuthor(i18n("Anders Lund"), i18n("Core Developer"), QStringLiteral("[email protected]"), QStringLiteral("https://alweb.dk"));
104  m_aboutData.addAuthor(i18n("Michel Ludwig"), i18n("On-the-fly spell checking"), QStringLiteral("[email protected]"));
105  m_aboutData.addAuthor(i18n("Pascal L├ętourneau"), i18n("Large scale bug fixing"), QStringLiteral("[email protected]"));
106  m_aboutData.addAuthor(i18n("Hamish Rodda"), i18n("Core Developer"), QStringLiteral("[email protected]"));
107  m_aboutData.addAuthor(i18n("Waldo Bastian"), i18n("The cool buffersystem"), QStringLiteral("[email protected]"));
108  m_aboutData.addAuthor(i18n("Charles Samuels"), i18n("The Editing Commands"), QStringLiteral("[email protected]"));
109  m_aboutData.addAuthor(i18n("Matt Newell"), i18n("Testing, ..."), QStringLiteral("[email protected]"));
110  m_aboutData.addAuthor(i18n("Michael Bartl"), i18n("Former Core Developer"), QStringLiteral("[email protected]"));
111  m_aboutData.addAuthor(i18n("Michael McCallum"), i18n("Core Developer"), QStringLiteral("[email protected]"));
112  m_aboutData.addAuthor(i18n("Michael Koch"), i18n("KWrite port to KParts"), QStringLiteral("[email protected]"));
113  m_aboutData.addAuthor(i18n("Christian Gebauer"), QString(), QStringLiteral("[email protected]"));
114  m_aboutData.addAuthor(i18n("Simon Hausmann"), QString(), QStringLiteral("[email protected]"));
115  m_aboutData.addAuthor(i18n("Glen Parker"), i18n("KWrite Undo History, Kspell integration"), QStringLiteral("[email protected]"));
116  m_aboutData.addAuthor(i18n("Scott Manson"), i18n("KWrite XML Syntax highlighting support"), QStringLiteral("[email protected]"));
117  m_aboutData.addAuthor(i18n("John Firebaugh"), i18n("Patches and more"), QStringLiteral("[email protected]"));
118  m_aboutData.addAuthor(i18n("Andreas Kling"), i18n("Developer"), QStringLiteral("[email protected]"));
119  m_aboutData.addAuthor(i18n("Mirko Stocker"), i18n("Various bugfixes"), QStringLiteral("[email protected]"), QStringLiteral("https://misto.ch/"));
120  m_aboutData.addAuthor(i18n("Matthew Woehlke"), i18n("Selection, KColorScheme integration"), QStringLiteral("[email protected]"));
121  m_aboutData.addAuthor(i18n("Sebastian Pipping"), i18n("Search bar back- and front-end"), QStringLiteral("[email protected]"), QStringLiteral("https://hartwork.org/"));
122  m_aboutData.addAuthor(i18n("Jochen Wilhelmy"), i18n("Original KWrite Author"), QStringLiteral("[email protected]"));
123  m_aboutData.addAuthor(i18n("Gerald Senarclens de Grancy"), i18n("QA and Scripting"), QStringLiteral("[email protected]"), QStringLiteral("http://find-santa.eu/"));
124 
125  m_aboutData.addCredit(i18n("Matteo Merli"), i18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), QStringLiteral("[email protected]"));
126  m_aboutData.addCredit(i18n("Rocky Scaletta"), i18n("Highlighting for VHDL"), QStringLiteral("[email protected]"));
127  m_aboutData.addCredit(i18n("Yury Lebedev"), i18n("Highlighting for SQL"), QString());
128  m_aboutData.addCredit(i18n("Chris Ross"), i18n("Highlighting for Ferite"), QString());
129  m_aboutData.addCredit(i18n("Nick Roux"), i18n("Highlighting for ILERPG"), QString());
130  m_aboutData.addCredit(i18n("Carsten Niehaus"), i18n("Highlighting for LaTeX"), QString());
131  m_aboutData.addCredit(i18n("Per Wigren"), i18n("Highlighting for Makefiles, Python"), QString());
132  m_aboutData.addCredit(i18n("Jan Fritz"), i18n("Highlighting for Python"), QString());
133  m_aboutData.addCredit(i18n("Daniel Naber"));
134  m_aboutData.addCredit(i18n("Roland Pabel"), i18n("Highlighting for Scheme"), QString());
135  m_aboutData.addCredit(i18n("Cristi Dumitrescu"), i18n("PHP Keyword/Datatype list"), QString());
136  m_aboutData.addCredit(i18n("Carsten Pfeiffer"), i18n("Very nice help"), QString());
137  m_aboutData.addCredit(i18n("Bruno Massa"), i18n("Highlighting for Lua"), QStringLiteral("[email protected]"));
138 
139  m_aboutData.addCredit(i18n("All people who have contributed and I have forgotten to mention"));
140 
141  m_aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails"));
142 
143  // set proper Kate icon for our about dialog
144  m_aboutData.setProgramLogo(QIcon(QStringLiteral(":/ktexteditor/kate.svg")));
145 
146  //
147  // dir watch
148  //
149  m_dirWatch = new KDirWatch();
150 
151  //
152  // command manager
153  //
154  m_cmdManager = new KateCmd();
155 
156  //
157  // variable expansion manager
158  //
159  m_variableExpansionManager = new KateVariableExpansionManager(this);
160 
161  //
162  // hl manager
163  //
164  m_hlManager = new KateHlManager();
165 
166  //
167  // mode man
168  //
169  m_modeManager = new KateModeManager();
170 
171  //
172  // input mode factories
173  //
174  KateAbstractInputModeFactory *fact;
175  fact = new KateNormalInputModeFactory();
176  m_inputModeFactories.insert(KTextEditor::View::NormalInputMode, fact);
177 
178 #if BUILD_VIMODE
179  fact = new KateViInputModeFactory();
180  m_inputModeFactories.insert(KTextEditor::View::ViInputMode, fact);
181 #endif
182 
183  //
184  // spell check manager
185  //
186  m_spellCheckManager = new KateSpellCheckManager();
187 
188  // config objects
189  m_globalConfig = new KateGlobalConfig();
190  m_documentConfig = new KateDocumentConfig();
191  m_viewConfig = new KateViewConfig();
192  m_rendererConfig = new KateRendererConfig();
193 
194  // create script manager (search scripts)
195  m_scriptManager = KateScriptManager::self();
196 
197  //
198  // init the cmds
199  //
200  m_cmds.push_back(KateCommands::CoreCommands::self());
201  m_cmds.push_back(KateCommands::Character::self());
202  m_cmds.push_back(KateCommands::Date::self());
203  m_cmds.push_back(KateCommands::SedReplace::self());
204  m_cmds.push_back(KateCommands::Highlighting::self());
205 
206  // global word completion model
207  m_wordCompletionModel = new KateWordCompletionModel(this);
208 
209  // global keyword completion model
210  m_keywordCompletionModel = new KateKeywordCompletionModel(this);
211 
212  // tap to QApplication object for color palette changes
213  qApp->installEventFilter(this);
214 }
215 
217 {
218  delete m_globalConfig;
219  delete m_documentConfig;
220  delete m_viewConfig;
221  delete m_rendererConfig;
222 
223  delete m_modeManager;
224 
225  delete m_dirWatch;
226 
227  // cu managers
228  delete m_scriptManager;
229  delete m_hlManager;
230 
231  delete m_spellCheckManager;
232 
233  // cu model
234  delete m_wordCompletionModel;
235 
236  // delete variable expansion manager
237  delete m_variableExpansionManager;
238  m_variableExpansionManager = nullptr;
239 
240  // delete the commands before we delete the cmd manager
241  qDeleteAll(m_cmds);
242  delete m_cmdManager;
243 
244  qDeleteAll(m_inputModeFactories);
245 
246  // shutdown libgit2, we require at least 0.22 which has this function!
247 #if LIBGIT2_FOUND
248  git_libgit2_shutdown();
249 #endif
250 }
251 
253 {
254  KTextEditor::DocumentPrivate *doc = new KTextEditor::DocumentPrivate(false, false, nullptr, parent);
255 
256  emit documentCreated(this, doc);
257 
258  return doc;
259 }
260 
261 // END KTextEditor::Editor config stuff
262 
264 {
265  QPointer<KPageDialog> kd = new KPageDialog(parent);
266 
267  kd->setWindowTitle(i18n("Configure"));
268  kd->setFaceType(KPageDialog::List);
270 
272 
273  for (int i = 0; i < configPages(); ++i) {
274  QFrame *page = new QFrame();
275  KTextEditor::ConfigPage *cp = configPage(i, page);
276 
277  KPageWidgetItem *item = kd->addPage(page, cp->name());
278  item->setHeader(cp->fullName());
279  item->setIcon(cp->icon());
280 
281  QVBoxLayout *topLayout = new QVBoxLayout(page);
282  topLayout->setContentsMargins(0, 0, 0, 0);
283 
284  connect(kd->button(QDialogButtonBox::Apply), SIGNAL(clicked()), cp, SLOT(apply()));
285  topLayout->addWidget(cp);
286  editorPages.append(cp);
287  }
288 
289  if (kd->exec() && kd) {
290  KateGlobalConfig::global()->configStart();
291  KateDocumentConfig::global()->configStart();
292  KateViewConfig::global()->configStart();
293  KateRendererConfig::global()->configStart();
294 
295  for (int i = 0; i < editorPages.count(); ++i) {
296  editorPages.at(i)->apply();
297  }
298 
299  KateGlobalConfig::global()->configEnd();
300  KateDocumentConfig::global()->configEnd();
301  KateViewConfig::global()->configEnd();
302  KateRendererConfig::global()->configEnd();
303  }
304 
305  delete kd;
306 }
307 
309 {
310  return 4;
311 }
312 
314 {
315  switch (number) {
316  case 0:
317  return new KateViewDefaultsConfig(parent);
318 
319  case 1:
320  return new KateThemeConfigPage(parent);
321 
322  case 2:
323  return new KateEditConfigTab(parent);
324 
325  case 3:
326  return new KateSaveConfigTab(parent);
327 
328  default:
329  break;
330  }
331 
332  return nullptr;
333 }
334 
338 static void cleanupGlobal()
339 {
340  // delete if there
342 }
343 
345 {
346  // remember the static instance in a QPointer
347  static bool inited = false;
348  static QPointer<KTextEditor::EditorPrivate> staticInstance;
349 
350  // just return it, if already inited
351  if (inited) {
352  return staticInstance.data();
353  }
354 
355  // start init process
356  inited = true;
357 
358  // now create the object and store it
359  new KTextEditor::EditorPrivate(staticInstance);
360 
361  // register cleanup
362  // let use be deleted during QCoreApplication shutdown
363  qAddPostRoutine(cleanupGlobal);
364 
365  // return instance
366  return staticInstance.data();
367 }
368 
369 void KTextEditor::EditorPrivate::registerDocument(KTextEditor::DocumentPrivate *doc)
370 {
371  Q_ASSERT(!m_documents.contains(doc));
372  m_documents.insert(doc, doc);
373 }
374 
375 void KTextEditor::EditorPrivate::deregisterDocument(KTextEditor::DocumentPrivate *doc)
376 {
377  Q_ASSERT(m_documents.contains(doc));
378  m_documents.remove(doc);
379 }
380 
381 void KTextEditor::EditorPrivate::registerView(KTextEditor::ViewPrivate *view)
382 {
383  Q_ASSERT(!m_views.contains(view));
384  m_views.insert(view);
385 }
386 
387 void KTextEditor::EditorPrivate::deregisterView(KTextEditor::ViewPrivate *view)
388 {
389  Q_ASSERT(m_views.contains(view));
390  m_views.remove(view);
391 }
392 
394 {
395  return m_cmdManager->queryCommand(cmd);
396 }
397 
399 {
400  return m_cmdManager->commands();
401 }
402 
404 {
405  return m_cmdManager->commandList();
406 }
407 
409 {
410  return m_variableExpansionManager;
411 }
412 
413 void KTextEditor::EditorPrivate::updateColorPalette()
414 {
415  // reload the global schema (triggers reload for every view as well)
416  // might trigger selection of better matching theme for new palette
417  m_rendererConfig->reloadSchema();
418 
419  // force full update of all view caches and colors
420  m_rendererConfig->updateConfig();
421 }
422 
424 {
425  // empty => nop
426  if (text.isEmpty()) {
427  return;
428  }
429 
430  // move to clipboard
432 
433  // LRU, kill potential duplicated, move new entry to top
434  // cut after 10 entries
435  m_clipboardHistory.removeOne(text);
436  m_clipboardHistory.prepend(text);
437  if (m_clipboardHistory.size() > 10) {
438  m_clipboardHistory.removeLast();
439  }
440 
441  // notify about change
443 }
444 
445 bool KTextEditor::EditorPrivate::eventFilter(QObject *obj, QEvent *event)
446 {
447  if (obj == qApp && event->type() == QEvent::ApplicationPaletteChange) {
448  // only update the color once for the event that belongs to the qApp
449  updateColorPalette();
450  }
451 
452  return false; // always continue processing
453 }
454 
456 {
457  return m_inputModeFactories.values();
458 }
459 
461 {
462  if (!m_searchHistoryModel) {
463  KConfigGroup cg(KSharedConfig::openConfig(), "KTextEditor::Search");
464  const QStringList history = cg.readEntry(QStringLiteral("Search History"), QStringList());
465  m_searchHistoryModel = new QStringListModel(history, this);
466  }
467  return m_searchHistoryModel;
468 }
469 
471 {
472  if (!m_replaceHistoryModel) {
473  KConfigGroup cg(KSharedConfig::openConfig(), "KTextEditor::Search");
474  const QStringList history = cg.readEntry(QStringLiteral("Replace History"), QStringList());
475  m_replaceHistoryModel = new QStringListModel(history, this);
476  }
477  return m_replaceHistoryModel;
478 }
479 
481 {
482  KConfigGroup cg(KSharedConfig::openConfig(), "KTextEditor::Search");
483  if (m_searchHistoryModel) {
484  cg.writeEntry(QStringLiteral("Search History"), m_searchHistoryModel->stringList());
485  }
486  if (m_replaceHistoryModel) {
487  cg.writeEntry(QStringLiteral("Replace History"), m_replaceHistoryModel->stringList());
488  }
489 }
490 
492 {
493  // use dummy config for unit tests!
495  return KSharedConfig::openConfig(QStringLiteral("katepartrc-unittest"), KConfig::SimpleConfig, QStandardPaths::TempLocation);
496  }
497 
498  // else: use application configuration, but try to transfer global settings on first use
499  auto applicationConfig = KSharedConfig::openConfig();
500  if (!KConfigGroup(applicationConfig, QStringLiteral("KTextEditor Editor")).exists()) {
501  auto globalConfig = KSharedConfig::openConfig(QStringLiteral("katepartrc"));
502  for (const auto &group : {QStringLiteral("Editor"), QStringLiteral("Document"), QStringLiteral("View"), QStringLiteral("Renderer")}) {
503  KConfigGroup origin(globalConfig, group);
504  KConfigGroup destination(applicationConfig, QStringLiteral("KTextEditor ") + group);
505  origin.copyTo(&destination);
506  }
507  }
508  return applicationConfig;
509 }
static bool unitTestMode()
Returns true, if the unit test mode was enabled through a call of enableUnitTestMode(), otherwise false.
Definition: kateglobal.cpp:59
void documentCreated(KTextEditor::Editor *editor, KTextEditor::Document *document)
The editor emits this signal whenever a document was successfully created.
ApplicationPaletteChange
QStringList commandList() const override
Get a list of available commandline strings.
Definition: kateglobal.cpp:403
QEvent::Type type() const const
void setContentsMargins(int left, int top, int right, int bottom)
T * data() const const
QList< KateAbstractInputModeFactory * > inputModeFactories()
Definition: kateglobal.cpp:455
const T & at(int i) const const
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
QSet::iterator insert(const T &value)
void deregisterDocument(KTextEditor::DocumentPrivate *doc)
unregister document at the factory
Definition: kateglobal.cpp:375
~EditorPrivate()
Destructor.
Definition: kateglobal.cpp:216
void deregisterView(KTextEditor::ViewPrivate *view)
unregister view at the factory
Definition: kateglobal.cpp:387
KAboutData & addAuthor(const QString &name, const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QString &ocsUsername=QString())
int size() const const
virtual bool event(QEvent *e)
static void enableUnitTestMode()
Calling this function internally sets a flag such that unitTestMode() returns true.
Definition: kateglobal.cpp:54
virtual QIcon icon() const
Get an icon for the config page.
void clipboardHistoryChanged()
Emitted if the history of clipboard changes via copyToClipboard.
QStringList stringList() const const
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
int count(const T &value) const const
void append(const T &value)
KAboutData & addCredit(const QString &name, const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QString &ocsUsername=QString())
QString i18nc(const char *context, const char *text, const TYPE &arg...)
A KParts derived class representing a text document.
Definition: document.h:185
virtual QString fullName() const
Get a readable full name for the config page.
bool isEmpty() const const
Manager class for variable expansion.
void setIcon(const QIcon &icon)
KateVariableExpansionManager * variableExpansionManager()
Returns the variable expansion manager.
Definition: kateglobal.cpp:408
void registerDocument(KTextEditor::DocumentPrivate *doc)
register document at the factory this allows us to loop over all docs for example on config changes ...
Definition: kateglobal.cpp:369
QStringListModel * searchHistoryModel()
Search pattern history shared among simple/power search instances.
Definition: kateglobal.cpp:460
void copyTo(KConfigBase *other, WriteConfigFlags pFlags=Normal) const
An Editor command line command.
virtual QString name() const =0
Get a readable name for the config page.
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
KTextEditor::ConfigPage * configPage(int number, QWidget *parent) override
returns config page with the given number, config pages from 0 to configPages()-1 are available if co...
Definition: kateglobal.cpp:313
bool contains(const T &value) const const
QString i18n(const char *text, const TYPE &arg...)
void configDialog(QWidget *parent) override
Configuration management.
Definition: kateglobal.cpp:263
static KSharedConfigPtr config()
The global configuration of katepart, e.g.
Definition: kateglobal.cpp:491
void registerView(KTextEditor::ViewPrivate *view)
register view at the factory this allows us to loop over all views for example on config changes ...
Definition: kateglobal.cpp:381
bool remove(const T &value)
KTextEditor::Document * createDocument(QObject *parent) override
Create a new document object.
Definition: kateglobal.cpp:252
Config page interface for the Editor and Plugins.
Definition: configpage.h:43
void removeLast()
KAboutData & setProgramLogo(const QVariant &image)
void setHeader(const QString &header)
void prepend(const T &value)
Accessor interface for the KTextEditor framework.
Definition: editor.h:82
Highlighting-file based keyword completion for the editor.
int configPages() const override
Number of available config pages If the editor returns a number < 1, it doesn&#39;t support this and the ...
Definition: kateglobal.cpp:308
void setText(const QString &text, QClipboard::Mode mode)
KTextEditor::Command * queryCommand(const QString &cmd) const override
query for command
Definition: kateglobal.cpp:393
KTextEditor::EditorPrivate One instance of this class is hold alive during a kate part session...
Definition: kateglobal.h:64
void saveSearchReplaceHistoryModels()
Call this function to store the history models to the application config.
Definition: kateglobal.cpp:480
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static KTextEditor::EditorPrivate * self()
Kate Part Internal stuff ;)
Definition: kateglobal.cpp:344
QObject * parent() const const
void copyToClipboard(const QString &text)
Copy text to clipboard an remember it in the history.
Definition: kateglobal.cpp:423
QStringListModel * replaceHistoryModel()
Replace pattern history shared among simple/power search instances.
Definition: kateglobal.cpp:470
T readEntry(const QString &key, const T &aDefault) const
QClipboard * clipboard()
bool removeOne(const T &value)
QList< KTextEditor::Command * > commands() const override
Get a list of all registered commands.
Definition: kateglobal.cpp:398
KAboutData & setTranslator(const QString &name, const QString &emailAddress)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:58:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.