From d96cb63baf6476203fa47a7ebdf200d2552a0400 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 8 Oct 2026 18:49:35 +0200 Subject: [PATCH] rename suite to Deft (stage 1: namespace + artifact) Rename the C++ namespace katecustom -> deft and include guards KATECUSTOM_* -> DEFT_* across all sources. Rename the plugin artifact olliepalette.so -> deft.so (CMake target 'deft') and set the plugin display name to 'Deft'. Update README title/install paths. File names, class names (Ollie*), and the src/ directory grouping are left for the follow-up stages that split features into per-plugin .so's ([deft:nineify] / [deft:util]). --- README.md | 12 ++++++------ src/commands/olliecommands.cpp | 4 ++-- src/commands/olliecommands.h | 8 ++++---- src/commands/test_olliecommands_live.cpp | 2 +- src/commands/test_ollieregistration.cpp | 2 +- src/commands/test_texttransforms.cpp | 4 ++-- src/commands/texttransforms.cpp | 4 ++-- src/commands/texttransforms.h | 8 ++++---- src/fuzzy/fuzzyranker.cpp | 4 ++-- src/fuzzy/fuzzyranker.h | 8 ++++---- src/fuzzy/test_fuzzyranker.cpp | 2 +- src/palette/frecencystore.cpp | 4 ++-- src/palette/frecencystore.h | 8 ++++---- src/palette/palettemodel.cpp | 4 ++-- src/palette/palettemodel.h | 8 ++++---- src/palette/palettewidget.cpp | 4 ++-- src/palette/palettewidget.h | 8 ++++---- src/palette/test_frecencystore.cpp | 2 +- src/palette/test_palettemodel.cpp | 2 +- src/plugin/CMakeLists.txt | 12 ++++++------ src/plugin/ollieplugin.cpp | 6 +++--- src/plugin/ollieplugin.h | 8 ++++---- src/plugin/ollieplugin.json | 4 ++-- src/plugin/sampanel.cpp | 4 ++-- src/plugin/sampanel.h | 8 ++++---- src/plugin/waylandcursorwarp.cpp | 4 ++-- src/plugin/waylandcursorwarp.h | 8 ++++---- src/plugin/waylandcursorwarp_stub.cpp | 4 ++-- src/plumb/ninep.cpp | 4 ++-- src/plumb/ninep.h | 8 ++++---- src/plumb/plumber.cpp | 4 ++-- src/plumb/plumber.h | 8 ++++---- src/plumb/plumbmsg.cpp | 4 ++-- src/plumb/plumbmsg.h | 8 ++++---- src/plumb/plumbresolve.cpp | 4 ++-- src/plumb/plumbresolve.h | 8 ++++---- src/plumb/test_plumb_live.cpp | 2 +- src/plumb/test_plumbmsg.cpp | 2 +- src/plumb/test_plumbresolve.cpp | 2 +- src/project/bench_switcher.cpp | 2 +- src/project/kateprojectbridge.cpp | 4 ++-- src/project/kateprojectbridge.h | 8 ++++---- src/project/projectindex.cpp | 4 ++-- src/project/projectindex.h | 8 ++++---- src/project/projectindexer.cpp | 8 ++++---- src/project/projectindexer.h | 8 ++++---- src/project/symbolindex.cpp | 4 ++-- src/project/symbolindex.h | 14 +++++++------- src/project/test_kateprojectbridge.cpp | 2 +- src/project/test_projectindex.cpp | 2 +- src/project/test_projectindexer.cpp | 2 +- src/project/test_symbolindex.cpp | 2 +- src/radial/radialconfig.cpp | 4 ++-- src/radial/radialconfig.h | 8 ++++---- src/radial/radialmenu.cpp | 4 ++-- src/radial/radialmenu.h | 8 ++++---- src/radial/radialmodel.cpp | 4 ++-- src/radial/radialmodel.h | 8 ++++---- src/radial/test_radialconfig.cpp | 2 +- src/radial/test_radialmodel.cpp | 2 +- src/sam/samengine.cpp | 4 ++-- src/sam/samengine.h | 8 ++++---- src/sam/samregex.cpp | 4 ++-- src/sam/samregex.h | 8 ++++---- src/sam/test_samengine.cpp | 2 +- src/sam/test_samregex.cpp | 2 +- 66 files changed, 173 insertions(+), 173 deletions(-) diff --git a/README.md b/README.md index 388ed1d..7b78169 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# kate-custom +# Deft A suite of Kate plugins for people who despise menus. The aim is a text editor that is driven by the mouse at the cursor and by plain-letter keyboard input — @@ -53,16 +53,16 @@ ctest --test-dir build # or via ctest ## Install the plugin into Kate -The plugin builds to `build/bin/kf6/ktexteditor/olliepalette.so`. Drop it where +The plugin builds to `build/bin/kf6/ktexteditor/deft.so`. Drop it where Kate scans for KTextEditor plugins (a user path on `QT_PLUGIN_PATH`): ```sh -install -D build/bin/kf6/ktexteditor/olliepalette.so \ - ~/.local/lib/x86_64-linux-gnu/qt6/plugins/kf6/ktexteditor/olliepalette.so +install -D build/bin/kf6/ktexteditor/deft.so \ + ~/.local/lib/x86_64-linux-gnu/qt6/plugins/kf6/ktexteditor/deft.so ``` Then in Kate: Settings → Configure Kate → Plugins → enable -**Ollie Command Palette**. Press **Alt+X** (M-x) to open the command palette; +**Deft**. Press **Alt+X** (M-x) to open the command palette; type to filter, Enter or click to run. Open the editing **radial menu** either by pressing **Alt+R** (opens at the caret) or by **pressing the right mouse button** in the editor (opens at the pointer; the normal context menu is @@ -79,7 +79,7 @@ See [docs/PLAN.md](docs/PLAN.md) for the full roadmap. - **Milestone 2 — custom palette widget: DONE.** `PaletteModel` + `PaletteWidget` (frameless popup, live filtering, highlighted matches, keyboard + mouse activation). 10 model unit tests, all green. -- Milestone 3 — KTextEditor plugin + M-x: **DONE.** Loadable `olliepalette.so`; +- Milestone 3 — KTextEditor plugin + M-x: **DONE.** Loadable `deft.so`; `Alt+X` opens the palette over every action in the window's GUI clients. - Milestone 4 — radial caret menu: **DONE (first increment).** Multi-level radial menu at the caret (`Alt+R`) or at the pointer via a **right-mouse diff --git a/src/commands/olliecommands.cpp b/src/commands/olliecommands.cpp index e5be880..abf6265 100644 --- a/src/commands/olliecommands.cpp +++ b/src/commands/olliecommands.cpp @@ -13,7 +13,7 @@ #include #include -namespace katecustom +namespace deft { using namespace texttransforms; @@ -199,4 +199,4 @@ bool OllieCommands::help(KTextEditor::View *, const QString &cmd, QString &msg) return true; } -} // namespace katecustom +} // namespace deft diff --git a/src/commands/olliecommands.h b/src/commands/olliecommands.h index 54bf9f4..8f78c00 100644 --- a/src/commands/olliecommands.h +++ b/src/commands/olliecommands.h @@ -15,12 +15,12 @@ * pipe replace the selection with the output of `sh -c `, * feeding the selection on stdin */ -#ifndef KATECUSTOM_OLLIECOMMANDS_H -#define KATECUSTOM_OLLIECOMMANDS_H +#ifndef DEFT_OLLIECOMMANDS_H +#define DEFT_OLLIECOMMANDS_H #include -namespace katecustom +namespace deft { class OllieCommands : public KTextEditor::Command @@ -46,6 +46,6 @@ private: static QStringList supportedCmds(); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/commands/test_olliecommands_live.cpp b/src/commands/test_olliecommands_live.cpp index b46f923..101d823 100644 --- a/src/commands/test_olliecommands_live.cpp +++ b/src/commands/test_olliecommands_live.cpp @@ -14,7 +14,7 @@ #include -using namespace katecustom; +using namespace deft; class TestOllieCommandsLive : public QObject { diff --git a/src/commands/test_ollieregistration.cpp b/src/commands/test_ollieregistration.cpp index 2c4013c..632eede 100644 --- a/src/commands/test_ollieregistration.cpp +++ b/src/commands/test_ollieregistration.cpp @@ -18,7 +18,7 @@ #include -using namespace katecustom; +using namespace deft; class TestOllieRegistration : public QObject { diff --git a/src/commands/test_texttransforms.cpp b/src/commands/test_texttransforms.cpp index dc97340..5c4047c 100644 --- a/src/commands/test_texttransforms.cpp +++ b/src/commands/test_texttransforms.cpp @@ -6,8 +6,8 @@ #include #include -using namespace katecustom; -using namespace katecustom::texttransforms; +using namespace deft; +using namespace deft::texttransforms; class TestTextTransforms : public QObject { diff --git a/src/commands/texttransforms.cpp b/src/commands/texttransforms.cpp index 15736d6..cb282fc 100644 --- a/src/commands/texttransforms.cpp +++ b/src/commands/texttransforms.cpp @@ -10,7 +10,7 @@ #include -namespace katecustom +namespace deft { namespace texttransforms { @@ -170,4 +170,4 @@ QString uuid() } } // namespace texttransforms -} // namespace katecustom +} // namespace deft diff --git a/src/commands/texttransforms.h b/src/commands/texttransforms.h index 0bc56ad..b4cfc5f 100644 --- a/src/commands/texttransforms.h +++ b/src/commands/texttransforms.h @@ -5,12 +5,12 @@ * KTextEditor dependency so they are unit testable in isolation; the command * glue in olliecommands.cpp feeds them the selection and writes back the result. */ -#ifndef KATECUSTOM_TEXTTRANSFORMS_H -#define KATECUSTOM_TEXTTRANSFORMS_H +#ifndef DEFT_TEXTTRANSFORMS_H +#define DEFT_TEXTTRANSFORMS_H #include -namespace katecustom +namespace deft { enum class CaseStyle { @@ -49,6 +49,6 @@ QString rot13(const QString &text); QString uuid(); } // namespace texttransforms -} // namespace katecustom +} // namespace deft #endif diff --git a/src/fuzzy/fuzzyranker.cpp b/src/fuzzy/fuzzyranker.cpp index f6766cb..d7616ab 100644 --- a/src/fuzzy/fuzzyranker.cpp +++ b/src/fuzzy/fuzzyranker.cpp @@ -8,7 +8,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -284,4 +284,4 @@ MatchResult FuzzyRanker::score(QStringView candidate, QStringView query) return score(candidate, tokenize(query)); } -} // namespace katecustom +} // namespace deft diff --git a/src/fuzzy/fuzzyranker.h b/src/fuzzy/fuzzyranker.h index 7fc1227..db39822 100644 --- a/src/fuzzy/fuzzyranker.h +++ b/src/fuzzy/fuzzyranker.h @@ -12,14 +12,14 @@ * - returns highlight ranges for every matched character * - exposes a frecency bonus hook for usage-aware ranking */ -#ifndef KATECUSTOM_FUZZYRANKER_H -#define KATECUSTOM_FUZZYRANKER_H +#ifndef DEFT_FUZZYRANKER_H +#define DEFT_FUZZYRANKER_H #include #include #include -namespace katecustom +namespace deft { /*! A contiguous span of matched characters in the candidate string. */ @@ -82,6 +82,6 @@ public: static MatchResult score(QStringView candidate, QStringView query); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/fuzzy/test_fuzzyranker.cpp b/src/fuzzy/test_fuzzyranker.cpp index 9e5d8e2..d951d4f 100644 --- a/src/fuzzy/test_fuzzyranker.cpp +++ b/src/fuzzy/test_fuzzyranker.cpp @@ -9,7 +9,7 @@ #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/palette/frecencystore.cpp b/src/palette/frecencystore.cpp index 3763fd5..57e19e9 100644 --- a/src/palette/frecencystore.cpp +++ b/src/palette/frecencystore.cpp @@ -11,7 +11,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -132,4 +132,4 @@ int FrecencyStore::bonus(const QString &id, qint64 nowEpoch) const return computeBonus(it.value(), nowEpoch); } -} // namespace katecustom +} // namespace deft diff --git a/src/palette/frecencystore.h b/src/palette/frecencystore.h index 4ea6d12..c14faa6 100644 --- a/src/palette/frecencystore.h +++ b/src/palette/frecencystore.h @@ -15,13 +15,13 @@ * temp file); the plugin picks the real path from QStandardPaths. The class is * Qt::Core only and has no display or event-loop dependency. */ -#ifndef KATECUSTOM_FRECENCYSTORE_H -#define KATECUSTOM_FRECENCYSTORE_H +#ifndef DEFT_FRECENCYSTORE_H +#define DEFT_FRECENCYSTORE_H #include #include -namespace katecustom +namespace deft { class FrecencyStore @@ -67,6 +67,6 @@ private: QHash m_entries; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/palette/palettemodel.cpp b/src/palette/palettemodel.cpp index 6fa6847..edad823 100644 --- a/src/palette/palettemodel.cpp +++ b/src/palette/palettemodel.cpp @@ -10,7 +10,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -220,4 +220,4 @@ QVariant PaletteModel::data(const QModelIndex &index, int role) const } } -} // namespace katecustom +} // namespace deft diff --git a/src/palette/palettemodel.h b/src/palette/palettemodel.h index 77a7a1f..b71f748 100644 --- a/src/palette/palettemodel.h +++ b/src/palette/palettemodel.h @@ -11,8 +11,8 @@ * This class is intentionally free of any widget dependency so it can be unit * tested without an event loop or display. */ -#ifndef KATECUSTOM_PALETTEMODEL_H -#define KATECUSTOM_PALETTEMODEL_H +#ifndef DEFT_PALETTEMODEL_H +#define DEFT_PALETTEMODEL_H #include "fuzzyranker.h" @@ -21,7 +21,7 @@ #include #include -namespace katecustom +namespace deft { /*! One selectable entry in the palette. */ @@ -86,6 +86,6 @@ private: QString m_query; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/palette/palettewidget.cpp b/src/palette/palettewidget.cpp index e328e3e..5f373f2 100644 --- a/src/palette/palettewidget.cpp +++ b/src/palette/palettewidget.cpp @@ -16,7 +16,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -241,4 +241,4 @@ bool PaletteWidget::eventFilter(QObject *obj, QEvent *event) return QFrame::eventFilter(obj, event); } -} // namespace katecustom +} // namespace deft diff --git a/src/palette/palettewidget.h b/src/palette/palettewidget.h index 3fbf73c..bc454e1 100644 --- a/src/palette/palettewidget.h +++ b/src/palette/palettewidget.h @@ -12,8 +12,8 @@ * The widget owns a PaletteModel. Feed it items with setItems(); listen to * activated(id) for the chosen command. */ -#ifndef KATECUSTOM_PALETTEWIDGET_H -#define KATECUSTOM_PALETTEWIDGET_H +#ifndef DEFT_PALETTEWIDGET_H +#define DEFT_PALETTEWIDGET_H #include "palettemodel.h" @@ -25,7 +25,7 @@ class QLineEdit; class QListView; class QTimer; -namespace katecustom +namespace deft { class PaletteWidget : public QFrame @@ -64,6 +64,6 @@ private: QString m_pendingQuery; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/palette/test_frecencystore.cpp b/src/palette/test_frecencystore.cpp index 99a35b7..23141d7 100644 --- a/src/palette/test_frecencystore.cpp +++ b/src/palette/test_frecencystore.cpp @@ -10,7 +10,7 @@ #include #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/palette/test_palettemodel.cpp b/src/palette/test_palettemodel.cpp index 1e51746..ef95c00 100644 --- a/src/palette/test_palettemodel.cpp +++ b/src/palette/test_palettemodel.cpp @@ -7,7 +7,7 @@ #include #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/plugin/CMakeLists.txt b/src/plugin/CMakeLists.txt index b571cd0..c030b88 100644 --- a/src/plugin/CMakeLists.txt +++ b/src/plugin/CMakeLists.txt @@ -60,14 +60,14 @@ if(NOT OLLIE_WAYLAND) list(APPEND OLLIE_PLUGIN_SOURCES waylandcursorwarp_stub.cpp) endif() -kcoreaddons_add_plugin(olliepalette +kcoreaddons_add_plugin(deft SOURCES ${OLLIE_PLUGIN_SOURCES} INSTALL_NAMESPACE "kf6/ktexteditor" ) -target_include_directories(olliepalette PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") +target_include_directories(deft PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") -target_link_libraries(olliepalette PRIVATE +target_link_libraries(deft PRIVATE palette radial olliecommands_lib @@ -82,9 +82,9 @@ target_link_libraries(olliepalette PRIVATE ) if(OLLIE_WAYLAND) - target_compile_definitions(olliepalette PRIVATE OLLIE_WAYLAND=1) - target_include_directories(olliepalette PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS}) - target_link_libraries(olliepalette PRIVATE + target_compile_definitions(deft PRIVATE OLLIE_WAYLAND=1) + target_include_directories(deft PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS}) + target_link_libraries(deft PRIVATE ollie_wayland_proto Qt6::GuiPrivate ${WAYLAND_CLIENT_LIBRARIES}) diff --git a/src/plugin/ollieplugin.cpp b/src/plugin/ollieplugin.cpp index 0ba9480..9b01d95 100644 --- a/src/plugin/ollieplugin.cpp +++ b/src/plugin/ollieplugin.cpp @@ -51,7 +51,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -1784,11 +1784,11 @@ void OllieView::acmeEraseWord() } } -} // namespace katecustom +} // namespace deft // K_PLUGIN_FACTORY generates the factory and the moc-level registration. The // matching .moc include is required in this translation unit. K_PLUGIN_FACTORY_WITH_JSON(OlliePluginFactory, "ollieplugin.json", - registerPlugin();) + registerPlugin();) #include "ollieplugin.moc" diff --git a/src/plugin/ollieplugin.h b/src/plugin/ollieplugin.h index 39c4766..aee62b1 100644 --- a/src/plugin/ollieplugin.h +++ b/src/plugin/ollieplugin.h @@ -8,8 +8,8 @@ * (Alt+X) and, when triggered, gathers every QAction currently exposed by the * window's GUI clients into a PaletteWidget for orderless fuzzy selection. */ -#ifndef KATECUSTOM_OLLIEPLUGIN_H -#define KATECUSTOM_OLLIEPLUGIN_H +#ifndef DEFT_OLLIEPLUGIN_H +#define DEFT_OLLIEPLUGIN_H #include @@ -36,7 +36,7 @@ class View; class Document; } -namespace katecustom +namespace deft { class PaletteWidget; @@ -182,6 +182,6 @@ private: QWidget *m_samToolView = nullptr; // the dockable container from createToolView }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plugin/ollieplugin.json b/src/plugin/ollieplugin.json index 433ec52..be6fa4b 100644 --- a/src/plugin/ollieplugin.json +++ b/src/plugin/ollieplugin.json @@ -5,10 +5,10 @@ "Name": "Levi Neely" } ], - "Description": "Menu-free, mouse-first command access: an orderless fuzzy command palette (M-x).", + "Description": "Deft: menu-free, mouse-first editing — orderless fuzzy palette (M-x), radial caret menu, switchers, Plan 9 plumbing, and sam.", "Icon": "code-context", "License": "LGPL-2.0-or-later", - "Name": "Ollie Command Palette", + "Name": "Deft", "Version": "0.1.0" } } diff --git a/src/plugin/sampanel.cpp b/src/plugin/sampanel.cpp index 3aa9aa2..6337aa4 100644 --- a/src/plugin/sampanel.cpp +++ b/src/plugin/sampanel.cpp @@ -14,7 +14,7 @@ #include #include -namespace katecustom +namespace deft { // A small QPlainTextEdit that fires a signal on Ctrl+Return so the user can run @@ -112,4 +112,4 @@ void SamPanel::clearOutput() m_output->clear(); } -} // namespace katecustom +} // namespace deft diff --git a/src/plugin/sampanel.h b/src/plugin/sampanel.h index cf4aca0..882f530 100644 --- a/src/plugin/sampanel.h +++ b/src/plugin/sampanel.h @@ -8,8 +8,8 @@ * the program text; OllieView does the document work (snapshot, engine, apply * in an EditingTransaction) and calls showOutput()/showError() to report back. */ -#ifndef KATECUSTOM_SAMPANEL_H -#define KATECUSTOM_SAMPANEL_H +#ifndef DEFT_SAMPANEL_H +#define DEFT_SAMPANEL_H #include @@ -17,7 +17,7 @@ class QPlainTextEdit; class QPushButton; class QTextEdit; -namespace katecustom +namespace deft { class SamPanel : public QWidget @@ -47,6 +47,6 @@ private: QTextEdit *m_output = nullptr; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plugin/waylandcursorwarp.cpp b/src/plugin/waylandcursorwarp.cpp index 5352f8b..330015d 100644 --- a/src/plugin/waylandcursorwarp.cpp +++ b/src/plugin/waylandcursorwarp.cpp @@ -13,7 +13,7 @@ #include #include "wayland-pointer-constraints-unstable-v1-client-protocol.h" -namespace katecustom +namespace deft { namespace @@ -153,4 +153,4 @@ bool WaylandCursorWarp::warp(QWindow *window, const QPointF &surfaceLocalPos) return true; } -} // namespace katecustom +} // namespace deft diff --git a/src/plugin/waylandcursorwarp.h b/src/plugin/waylandcursorwarp.h index d7bd950..c345f42 100644 --- a/src/plugin/waylandcursorwarp.h +++ b/src/plugin/waylandcursorwarp.h @@ -22,8 +22,8 @@ * if the compositor lacks the global, or the surface/pointer is unavailable, * warp() returns false and the caller falls back (or no-ops). */ -#ifndef KATECUSTOM_WAYLANDCURSORWARP_H -#define KATECUSTOM_WAYLANDCURSORWARP_H +#ifndef DEFT_WAYLANDCURSORWARP_H +#define DEFT_WAYLANDCURSORWARP_H #include #include @@ -33,7 +33,7 @@ class QWindow; struct wl_registry; struct zwp_pointer_constraints_v1; -namespace katecustom +namespace deft { class WaylandCursorWarp : public QObject @@ -65,6 +65,6 @@ private: bool m_triedBind = false; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plugin/waylandcursorwarp_stub.cpp b/src/plugin/waylandcursorwarp_stub.cpp index ca307f3..9a3ea6e 100644 --- a/src/plugin/waylandcursorwarp_stub.cpp +++ b/src/plugin/waylandcursorwarp_stub.cpp @@ -10,7 +10,7 @@ #include -namespace katecustom +namespace deft { WaylandCursorWarp::WaylandCursorWarp(QObject *parent) @@ -39,4 +39,4 @@ bool WaylandCursorWarp::warp(QWindow *, const QPointF &) return false; // no Wayland support compiled in } -} // namespace katecustom +} // namespace deft diff --git a/src/plumb/ninep.cpp b/src/plumb/ninep.cpp index 163ed1a..77e900c 100644 --- a/src/plumb/ninep.cpp +++ b/src/plumb/ninep.cpp @@ -5,7 +5,7 @@ #include -namespace katecustom +namespace deft { // 9P2000 message type codes (plan9port fcall.h). @@ -477,4 +477,4 @@ bool NineP::clunk(uint32_t fid) return true; } -} // namespace katecustom +} // namespace deft diff --git a/src/plumb/ninep.h b/src/plumb/ninep.h index 4b1ffad..1939b86 100644 --- a/src/plumb/ninep.h +++ b/src/plumb/ninep.h @@ -12,8 +12,8 @@ * The plumb socket lives at $NAMESPACE/plumb and speaks raw 9P2000, exactly as * lib9pclient reaches it via nsmount("plumb") -> dial("unix!$ns/plumb"). */ -#ifndef KATECUSTOM_NINEP_H -#define KATECUSTOM_NINEP_H +#ifndef DEFT_NINEP_H +#define DEFT_NINEP_H #include #include @@ -21,7 +21,7 @@ class QLocalSocket; -namespace katecustom +namespace deft { /*! @@ -126,6 +126,6 @@ private: QString m_error; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plumb/plumber.cpp b/src/plumb/plumber.cpp index c843d43..121a7bc 100644 --- a/src/plumb/plumber.cpp +++ b/src/plumb/plumber.cpp @@ -11,7 +11,7 @@ #include -namespace katecustom +namespace deft { // Canonicalise the X11 display the way plan9 getns() does: "xxx:0.0" -> "xxx:0" @@ -233,6 +233,6 @@ void Plumber::startReader() m_reader->start(); } -} // namespace katecustom +} // namespace deft #include "plumber.moc" diff --git a/src/plumb/plumber.h b/src/plumb/plumber.h index 192ed69..16a1b94 100644 --- a/src/plumb/plumber.h +++ b/src/plumb/plumber.h @@ -15,15 +15,15 @@ * The namespace socket is $NAMESPACE/plumb, or /tmp/ns.$USER.$DISPLAY/plumb * when $NAMESPACE is unset — the same resolution plan9's getns() performs. */ -#ifndef KATECUSTOM_PLUMBER_H -#define KATECUSTOM_PLUMBER_H +#ifndef DEFT_PLUMBER_H +#define DEFT_PLUMBER_H #include #include #include "plumbmsg.h" -namespace katecustom +namespace deft { class PlumbReader; // reader living on its own thread @@ -75,6 +75,6 @@ private: QString m_error; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plumb/plumbmsg.cpp b/src/plumb/plumbmsg.cpp index 168535b..6774762 100644 --- a/src/plumb/plumbmsg.cpp +++ b/src/plumb/plumbmsg.cpp @@ -3,7 +3,7 @@ */ #include "plumbmsg.h" -namespace katecustom +namespace deft { QString PlumbMsg::lookup(const QString &name) const @@ -194,4 +194,4 @@ bool PlumbMsg::unpack(const QByteArray &buf, PlumbMsg *out) return true; } -} // namespace katecustom +} // namespace deft diff --git a/src/plumb/plumbmsg.h b/src/plumb/plumbmsg.h index d0f8345..5bd90eb 100644 --- a/src/plumb/plumbmsg.h +++ b/src/plumb/plumbmsg.h @@ -21,14 +21,14 @@ * This header is pure (QString/QByteArray only) so pack/unpack can be unit * tested against the bytes captured from a live plumber on the edit port. */ -#ifndef KATECUSTOM_PLUMBMSG_H -#define KATECUSTOM_PLUMBMSG_H +#ifndef DEFT_PLUMBMSG_H +#define DEFT_PLUMBMSG_H #include #include #include -namespace katecustom +namespace deft { /*! One plumb attribute (name=value). */ @@ -77,6 +77,6 @@ QByteArray packPlumbAttr(const QList &attr); /*! Parse a packed attribute line back into a list (exposed for tests). */ QList unpackPlumbAttr(const QByteArray &line); -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plumb/plumbresolve.cpp b/src/plumb/plumbresolve.cpp index 891d97b..61156e5 100644 --- a/src/plumb/plumbresolve.cpp +++ b/src/plumb/plumbresolve.cpp @@ -3,7 +3,7 @@ */ #include "plumbresolve.h" -namespace katecustom +namespace deft { PlumbAddr parsePlumbAddr(const QString &addr) @@ -46,4 +46,4 @@ PlumbAddr parsePlumbAddr(const QString &addr) return out; } -} // namespace katecustom +} // namespace deft diff --git a/src/plumb/plumbresolve.h b/src/plumb/plumbresolve.h index 1732993..9bbca4b 100644 --- a/src/plumb/plumbresolve.h +++ b/src/plumb/plumbresolve.h @@ -12,12 +12,12 @@ * - selectionToData() picks what text to plumb: an explicit selection wins, * otherwise the word under the caret. */ -#ifndef KATECUSTOM_PLUMBRESOLVE_H -#define KATECUSTOM_PLUMBRESOLVE_H +#ifndef DEFT_PLUMBRESOLVE_H +#define DEFT_PLUMBRESOLVE_H #include -namespace katecustom +namespace deft { /*! Zero-based editor position parsed from a plumb addr attribute. */ @@ -36,6 +36,6 @@ struct PlumbAddr { */ PlumbAddr parsePlumbAddr(const QString &addr); -} // namespace katecustom +} // namespace deft #endif diff --git a/src/plumb/test_plumb_live.cpp b/src/plumb/test_plumb_live.cpp index 256481d..0030fc5 100644 --- a/src/plumb/test_plumb_live.cpp +++ b/src/plumb/test_plumb_live.cpp @@ -19,7 +19,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestPlumbLive : public QObject { diff --git a/src/plumb/test_plumbmsg.cpp b/src/plumb/test_plumbmsg.cpp index b846778..4f99226 100644 --- a/src/plumb/test_plumbmsg.cpp +++ b/src/plumb/test_plumbmsg.cpp @@ -10,7 +10,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestPlumbMsg : public QObject { diff --git a/src/plumb/test_plumbresolve.cpp b/src/plumb/test_plumbresolve.cpp index 2f95979..9ebc73f 100644 --- a/src/plumb/test_plumbresolve.cpp +++ b/src/plumb/test_plumbresolve.cpp @@ -6,7 +6,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestPlumbResolve : public QObject { diff --git a/src/project/bench_switcher.cpp b/src/project/bench_switcher.cpp index b60a673..5b38f5b 100644 --- a/src/project/bench_switcher.cpp +++ b/src/project/bench_switcher.cpp @@ -33,7 +33,7 @@ #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/project/kateprojectbridge.cpp b/src/project/kateprojectbridge.cpp index 8079152..35f91fb 100644 --- a/src/project/kateprojectbridge.cpp +++ b/src/project/kateprojectbridge.cpp @@ -6,7 +6,7 @@ #include #include -namespace katecustom +namespace deft { KateProjectBridge::KateProjectBridge(QObject *parent) @@ -80,4 +80,4 @@ QStringList KateProjectBridge::files() const return m_view->property("projectFiles").toStringList(); } -} // namespace katecustom +} // namespace deft diff --git a/src/project/kateprojectbridge.h b/src/project/kateprojectbridge.h index e228ad7..6565f5f 100644 --- a/src/project/kateprojectbridge.h +++ b/src/project/kateprojectbridge.h @@ -14,15 +14,15 @@ * disabled, not yet created, or a different Kate build) every accessor returns * an empty value and callers fall back to our own ProjectIndex. */ -#ifndef KATECUSTOM_KATEPROJECTBRIDGE_H -#define KATECUSTOM_KATEPROJECTBRIDGE_H +#ifndef DEFT_KATEPROJECTBRIDGE_H +#define DEFT_KATEPROJECTBRIDGE_H #include #include #include #include -namespace katecustom +namespace deft { class KateProjectBridge : public QObject @@ -58,6 +58,6 @@ private: QPointer m_view; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/project/projectindex.cpp b/src/project/projectindex.cpp index ac590b0..6cc458c 100644 --- a/src/project/projectindex.cpp +++ b/src/project/projectindex.cpp @@ -8,7 +8,7 @@ #include #include -namespace katecustom +namespace deft { QStringList ProjectIndex::rootMarkers() @@ -185,4 +185,4 @@ QStringList ProjectIndex::listFiles(const QString &root) return walkDirectory(root, ignoredDirs()); } -} // namespace katecustom +} // namespace deft diff --git a/src/project/projectindex.h b/src/project/projectindex.h index fa7a555..16be0e5 100644 --- a/src/project/projectindex.h +++ b/src/project/projectindex.h @@ -15,13 +15,13 @@ * The matching/ranking of the returned list is left to FuzzyRanker / * PaletteWidget; this class only produces the candidate set. */ -#ifndef KATECUSTOM_PROJECTINDEX_H -#define KATECUSTOM_PROJECTINDEX_H +#ifndef DEFT_PROJECTINDEX_H +#define DEFT_PROJECTINDEX_H #include #include -namespace katecustom +namespace deft { class ProjectIndex @@ -85,6 +85,6 @@ private: static QStringList gitListFiles(const QString &root); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/project/projectindexer.cpp b/src/project/projectindexer.cpp index 0354209..078597e 100644 --- a/src/project/projectindexer.cpp +++ b/src/project/projectindexer.cpp @@ -9,7 +9,7 @@ #include #include -namespace katecustom +namespace deft { ProjectIndexer::ProjectIndexer(QObject *parent) @@ -17,8 +17,8 @@ ProjectIndexer::ProjectIndexer(QObject *parent) { // Needed so QList can travel through QVariant / queued signals and // be captured by QSignalSpy in tests. - qRegisterMetaType("katecustom::Symbol"); - qRegisterMetaType>("QList"); + qRegisterMetaType("deft::Symbol"); + qRegisterMetaType>("QList"); } ProjectIndexer::~ProjectIndexer() @@ -163,4 +163,4 @@ void ProjectIndexer::requestSymbols(const QString &root) })); } -} // namespace katecustom +} // namespace deft diff --git a/src/project/projectindexer.h b/src/project/projectindexer.h index 5f709ff..b1b9824 100644 --- a/src/project/projectindexer.h +++ b/src/project/projectindexer.h @@ -14,8 +14,8 @@ * dependency. A per-root generation counter drops results from superseded or * invalidated requests. */ -#ifndef KATECUSTOM_PROJECTINDEXER_H -#define KATECUSTOM_PROJECTINDEXER_H +#ifndef DEFT_PROJECTINDEXER_H +#define DEFT_PROJECTINDEXER_H #include "symbolindex.h" @@ -26,7 +26,7 @@ template class QFutureWatcher; -namespace katecustom +namespace deft { class ProjectIndexer : public QObject @@ -87,6 +87,6 @@ private: quint64 m_symbolsJobGen = 0; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/project/symbolindex.cpp b/src/project/symbolindex.cpp index 7e19bb7..491223f 100644 --- a/src/project/symbolindex.cpp +++ b/src/project/symbolindex.cpp @@ -6,7 +6,7 @@ #include #include -namespace katecustom +namespace deft { QString SymbolIndex::ctagsBinary() @@ -128,4 +128,4 @@ QList SymbolIndex::listSymbols(const QString &root, const QStringList &f return parseTags(out); } -} // namespace katecustom +} // namespace deft diff --git a/src/project/symbolindex.h b/src/project/symbolindex.h index a0f0460..bae20b3 100644 --- a/src/project/symbolindex.h +++ b/src/project/symbolindex.h @@ -12,15 +12,15 @@ * * The parsing (parseTags) is pure and unit-tested; listSymbols runs the process. */ -#ifndef KATECUSTOM_SYMBOLINDEX_H -#define KATECUSTOM_SYMBOLINDEX_H +#ifndef DEFT_SYMBOLINDEX_H +#define DEFT_SYMBOLINDEX_H #include #include #include #include -namespace katecustom +namespace deft { /*! One symbol located in the project. */ @@ -38,11 +38,11 @@ struct Symbol { } }; -} // namespace katecustom +} // namespace deft -Q_DECLARE_METATYPE(katecustom::Symbol) +Q_DECLARE_METATYPE(deft::Symbol) -namespace katecustom +namespace deft { class SymbolIndex @@ -73,6 +73,6 @@ public: static QList listSymbols(const QString &root, const QStringList &files); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/project/test_kateprojectbridge.cpp b/src/project/test_kateprojectbridge.cpp index 11c5804..7c6cdd9 100644 --- a/src/project/test_kateprojectbridge.cpp +++ b/src/project/test_kateprojectbridge.cpp @@ -10,7 +10,7 @@ #include #include -using namespace katecustom; +using namespace deft; // Stand-in with the same Q_PROPERTY names and one change signal as the real // KateProjectPluginView. diff --git a/src/project/test_projectindex.cpp b/src/project/test_projectindex.cpp index 41a4749..508054a 100644 --- a/src/project/test_projectindex.cpp +++ b/src/project/test_projectindex.cpp @@ -13,7 +13,7 @@ #include #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/project/test_projectindexer.cpp b/src/project/test_projectindexer.cpp index e3235be..2c48d5f 100644 --- a/src/project/test_projectindexer.cpp +++ b/src/project/test_projectindexer.cpp @@ -13,7 +13,7 @@ #include #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/project/test_symbolindex.cpp b/src/project/test_symbolindex.cpp index 31fd123..c7a8376 100644 --- a/src/project/test_symbolindex.cpp +++ b/src/project/test_symbolindex.cpp @@ -12,7 +12,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestSymbolIndex : public QObject { diff --git a/src/radial/radialconfig.cpp b/src/radial/radialconfig.cpp index e77b6fc..e674d1a 100644 --- a/src/radial/radialconfig.cpp +++ b/src/radial/radialconfig.cpp @@ -13,7 +13,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -204,4 +204,4 @@ QList RadialConfig::builtinDefault() return {edit, window}; } -} // namespace katecustom +} // namespace deft diff --git a/src/radial/radialconfig.h b/src/radial/radialconfig.h index b14b737..ca1332e 100644 --- a/src/radial/radialconfig.h +++ b/src/radial/radialconfig.h @@ -25,8 +25,8 @@ * * Pure parsing/data — no widget or plugin dependency, so it is unit testable. */ -#ifndef KATECUSTOM_RADIALCONFIG_H -#define KATECUSTOM_RADIALCONFIG_H +#ifndef DEFT_RADIALCONFIG_H +#define DEFT_RADIALCONFIG_H #include "radialmodel.h" @@ -35,7 +35,7 @@ class QJsonObject; -namespace katecustom +namespace deft { struct RadialDef { @@ -72,6 +72,6 @@ public: static QList builtinDefault(); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/radial/radialmenu.cpp b/src/radial/radialmenu.cpp index 54149ab..4953bb7 100644 --- a/src/radial/radialmenu.cpp +++ b/src/radial/radialmenu.cpp @@ -12,7 +12,7 @@ #include #include -namespace katecustom +namespace deft { RadialMenu::RadialMenu(QWidget *parent) @@ -266,4 +266,4 @@ void RadialMenu::finishCancelled() Q_EMIT cancelled(); } -} // namespace katecustom +} // namespace deft diff --git a/src/radial/radialmenu.h b/src/radial/radialmenu.h index a29c1db..7280d86 100644 --- a/src/radial/radialmenu.h +++ b/src/radial/radialmenu.h @@ -12,8 +12,8 @@ * outside the ring cancels, the central hub goes back one level or cancels. * Esc ascends one level, or cancels at the root. */ -#ifndef KATECUSTOM_RADIALMENU_H -#define KATECUSTOM_RADIALMENU_H +#ifndef DEFT_RADIALMENU_H +#define DEFT_RADIALMENU_H #include "radialmodel.h" @@ -21,7 +21,7 @@ #include -namespace katecustom +namespace deft { class RadialMenu : public QWidget @@ -77,6 +77,6 @@ private: double m_outerRadius = 130.0; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/radial/radialmodel.cpp b/src/radial/radialmodel.cpp index fcf7c51..2aab56d 100644 --- a/src/radial/radialmodel.cpp +++ b/src/radial/radialmodel.cpp @@ -5,7 +5,7 @@ #include -namespace katecustom +namespace deft { RadialModel::RadialModel(RadialNode root) @@ -116,4 +116,4 @@ RadialModel::Hit RadialModel::resolve(int index, QString &outActionId) const return Hit::Activate; } -} // namespace katecustom +} // namespace deft diff --git a/src/radial/radialmodel.h b/src/radial/radialmodel.h index 9519b86..71a0ec4 100644 --- a/src/radial/radialmodel.h +++ b/src/radial/radialmodel.h @@ -13,8 +13,8 @@ * Angle convention: 0 radians points up (12 o'clock); angles increase * clockwise. Slices are distributed evenly starting at the top. */ -#ifndef KATECUSTOM_RADIALMODEL_H -#define KATECUSTOM_RADIALMODEL_H +#ifndef DEFT_RADIALMODEL_H +#define DEFT_RADIALMODEL_H #include #include @@ -22,7 +22,7 @@ #include -namespace katecustom +namespace deft { struct RadialNode { @@ -94,6 +94,6 @@ private: const RadialNode &nodeAtPath() const; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/radial/test_radialconfig.cpp b/src/radial/test_radialconfig.cpp index f48d46c..bc0553f 100644 --- a/src/radial/test_radialconfig.cpp +++ b/src/radial/test_radialconfig.cpp @@ -8,7 +8,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestRadialConfig : public QObject { diff --git a/src/radial/test_radialmodel.cpp b/src/radial/test_radialmodel.cpp index 4ddc0d2..9fa0a9e 100644 --- a/src/radial/test_radialmodel.cpp +++ b/src/radial/test_radialmodel.cpp @@ -5,7 +5,7 @@ #include -using namespace katecustom; +using namespace deft; namespace { diff --git a/src/sam/samengine.cpp b/src/sam/samengine.cpp index 5514da8..c9ef1ab 100644 --- a/src/sam/samengine.cpp +++ b/src/sam/samengine.cpp @@ -23,7 +23,7 @@ #include #include -namespace katecustom +namespace deft { namespace @@ -1286,4 +1286,4 @@ SamEngine::FileLoop SamEngine::peelFileLoop(const QString &program) return fl; } -} // namespace katecustom +} // namespace deft diff --git a/src/sam/samengine.h b/src/sam/samengine.h index c39f003..7f99f9f 100644 --- a/src/sam/samengine.h +++ b/src/sam/samengine.h @@ -28,13 +28,13 @@ * - Multi-file features (b B n D X Y, "re" file-addressing) and external file * I/O (e r w f) are out of scope: Kate manages files and views. */ -#ifndef KATECUSTOM_SAMENGINE_H -#define KATECUSTOM_SAMENGINE_H +#ifndef DEFT_SAMENGINE_H +#define DEFT_SAMENGINE_H #include #include -namespace katecustom +namespace deft { /*! One edit against the ORIGINAL snapshot: replace [start,end) with text. */ @@ -89,6 +89,6 @@ public: static FileLoop peelFileLoop(const QString &program); }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/sam/samregex.cpp b/src/sam/samregex.cpp index c9b6201..85f02b1 100644 --- a/src/sam/samregex.cpp +++ b/src/sam/samregex.cpp @@ -6,7 +6,7 @@ */ #include "samregex.h" -namespace katecustom +namespace deft { // Action codes (regexp.c). A literal rune uses its own code point as `type` @@ -629,4 +629,4 @@ std::optional SamRegex::match(const QString &text, int from, int bound return best; } -} // namespace katecustom +} // namespace deft diff --git a/src/sam/samregex.h b/src/sam/samregex.h index 3f3d15f..ed36847 100644 --- a/src/sam/samregex.h +++ b/src/sam/samregex.h @@ -24,15 +24,15 @@ * Only the forward machine is ported; backward search is done by the caller * scanning forward and keeping the last qualifying match. */ -#ifndef KATECUSTOM_SAMREGEX_H -#define KATECUSTOM_SAMREGEX_H +#ifndef DEFT_SAMREGEX_H +#define DEFT_SAMREGEX_H #include #include #include #include -namespace katecustom +namespace deft { /*! A match: half-open character ranges. caps[0] is the whole match; caps[1..9] @@ -109,6 +109,6 @@ private: friend class SamRegexCompiler; }; -} // namespace katecustom +} // namespace deft #endif diff --git a/src/sam/test_samengine.cpp b/src/sam/test_samengine.cpp index 4aa45f3..6ffa2b0 100644 --- a/src/sam/test_samengine.cpp +++ b/src/sam/test_samengine.cpp @@ -10,7 +10,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestSamEngine : public QObject { diff --git a/src/sam/test_samregex.cpp b/src/sam/test_samregex.cpp index 7a9eca2..43ce952 100644 --- a/src/sam/test_samregex.cpp +++ b/src/sam/test_samregex.cpp @@ -11,7 +11,7 @@ #include #include -using namespace katecustom; +using namespace deft; class TestSamRegex : public QObject {