Index: addons/kate-ctags/kate_ctags_plugin.cpp =================================================================== --- addons/kate-ctags/kate_ctags_plugin.cpp +++ addons/kate-ctags/kate_ctags_plugin.cpp @@ -219,7 +219,7 @@ targets += target + QLatin1Char(' '); } - QString file = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/katectags"); + QString file = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("kate/katectags"); QDir().mkpath(file); file += QLatin1String("/common_db"); Index: addons/kate-ctags/kate_ctags_view.h =================================================================== --- addons/kate-ctags/kate_ctags_view.h +++ addons/kate-ctags/kate_ctags_view.h @@ -98,7 +98,7 @@ void jumpToTag(const QString &file, const QString &pattern, const QString &word); - KTextEditor::MainWindow *m_mWin; + QPointer m_mWin; QWidget *m_toolView; Ui::kateCtags m_ctagsUi; Index: addons/kate-ctags/kate_ctags_view.cpp =================================================================== --- addons/kate-ctags/kate_ctags_view.cpp +++ addons/kate-ctags/kate_ctags_view.cpp @@ -20,6 +20,7 @@ */ #include "kate_ctags_view.h" +#include "kate_ctags_plugin.h" #include "kate_ctags_debug.h" #include @@ -66,6 +67,16 @@ lookup->setText(i18n("Lookup Current Text")); connect(lookup, &QAction::triggered, this, &KateCTagsView::lookupTag); + QAction *updateDB = actionCollection()->addAction(QLatin1String("ctags_update_global_db")); + updateDB->setText(i18n("Update the Database")); + connect(updateDB, &QAction::triggered, this, [this, plugin, mainWin] (bool) { + KateCTagsPlugin *p = dynamic_cast(plugin); + QDialog *confWin = new QDialog(mainWin->window()); + auto confPage = p->configPage(0, confWin); + confPage->show(); + confWin->exec(); + }); + // popup menu m_menu = new KActionMenu(i18n("CTags"), this); actionCollection()->addAction(QLatin1String("popup_ctags"), m_menu); @@ -118,14 +129,16 @@ m_mWin->guiFactory()->addClient(this); - m_commonDB = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/katectags/common_db"); + m_commonDB = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kate/katectags/common_db"); } /******************************************************************/ KateCTagsView::~KateCTagsView() { - m_mWin->guiFactory()->removeClient( this ); + if (m_mWin->guiFactory()) { + m_mWin->guiFactory()->removeClient( this ); + } delete m_toolView; } @@ -494,7 +507,7 @@ targets += target + QLatin1Char(' '); } - QString pluginFolder = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/katectags"); + QString pluginFolder = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("kate/katectags"); QDir().mkpath(pluginFolder); if (m_ctagsUi.tagsFile->text().isEmpty()) { Index: addons/kate-ctags/katectagsplugin.desktop =================================================================== --- addons/kate-ctags/katectagsplugin.desktop +++ addons/kate-ctags/katectagsplugin.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Service -ServiceTypes=KTextEditor/Plugin +ServiceTypes=KTextEditor/Plugin,KDevelop/Plugin X-KDE-Library=katectagsplugin Name=CTags Name[ar]=وسوم سي Index: addons/kate-ctags/ui.rc =================================================================== --- addons/kate-ctags/ui.rc +++ addons/kate-ctags/ui.rc @@ -1,14 +1,16 @@ - + CTags + +