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]).
This commit is contained in:
Levi Neely 2026-10-08 18:49:35 +02:00
parent 019fed6db4
commit d96cb63baf
66 changed files with 173 additions and 173 deletions

View File

@ -1,4 +1,4 @@
# kate-custom # Deft
A suite of Kate plugins for people who despise menus. The aim is a text editor 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 — 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 ## 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`): Kate scans for KTextEditor plugins (a user path on `QT_PLUGIN_PATH`):
```sh ```sh
install -D build/bin/kf6/ktexteditor/olliepalette.so \ install -D build/bin/kf6/ktexteditor/deft.so \
~/.local/lib/x86_64-linux-gnu/qt6/plugins/kf6/ktexteditor/olliepalette.so ~/.local/lib/x86_64-linux-gnu/qt6/plugins/kf6/ktexteditor/deft.so
``` ```
Then in Kate: Settings → Configure Kate → Plugins → enable 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 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 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 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` + - **Milestone 2 — custom palette widget: DONE.** `PaletteModel` +
`PaletteWidget` (frameless popup, live filtering, highlighted matches, `PaletteWidget` (frameless popup, live filtering, highlighted matches,
keyboard + mouse activation). 10 model unit tests, all green. 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. `Alt+X` opens the palette over every action in the window's GUI clients.
- Milestone 4 — radial caret menu: **DONE (first increment).** Multi-level - 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 radial menu at the caret (`Alt+R`) or at the pointer via a **right-mouse

View File

@ -13,7 +13,7 @@
#include <QProcess> #include <QProcess>
#include <QStringList> #include <QStringList>
namespace katecustom namespace deft
{ {
using namespace texttransforms; using namespace texttransforms;
@ -199,4 +199,4 @@ bool OllieCommands::help(KTextEditor::View *, const QString &cmd, QString &msg)
return true; return true;
} }
} // namespace katecustom } // namespace deft

View File

@ -15,12 +15,12 @@
* pipe <shell> replace the selection with the output of `sh -c <shell>`, * pipe <shell> replace the selection with the output of `sh -c <shell>`,
* feeding the selection on stdin * feeding the selection on stdin
*/ */
#ifndef KATECUSTOM_OLLIECOMMANDS_H #ifndef DEFT_OLLIECOMMANDS_H
#define KATECUSTOM_OLLIECOMMANDS_H #define DEFT_OLLIECOMMANDS_H
#include <KTextEditor/Command> #include <KTextEditor/Command>
namespace katecustom namespace deft
{ {
class OllieCommands : public KTextEditor::Command class OllieCommands : public KTextEditor::Command
@ -46,6 +46,6 @@ private:
static QStringList supportedCmds(); static QStringList supportedCmds();
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -14,7 +14,7 @@
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestOllieCommandsLive : public QObject class TestOllieCommandsLive : public QObject
{ {

View File

@ -18,7 +18,7 @@
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestOllieRegistration : public QObject class TestOllieRegistration : public QObject
{ {

View File

@ -6,8 +6,8 @@
#include <QTest> #include <QTest>
#include <QRegularExpression> #include <QRegularExpression>
using namespace katecustom; using namespace deft;
using namespace katecustom::texttransforms; using namespace deft::texttransforms;
class TestTextTransforms : public QObject class TestTextTransforms : public QObject
{ {

View File

@ -10,7 +10,7 @@
#include <algorithm> #include <algorithm>
namespace katecustom namespace deft
{ {
namespace texttransforms namespace texttransforms
{ {
@ -170,4 +170,4 @@ QString uuid()
} }
} // namespace texttransforms } // namespace texttransforms
} // namespace katecustom } // namespace deft

View File

@ -5,12 +5,12 @@
* KTextEditor dependency so they are unit testable in isolation; the command * KTextEditor dependency so they are unit testable in isolation; the command
* glue in olliecommands.cpp feeds them the selection and writes back the result. * glue in olliecommands.cpp feeds them the selection and writes back the result.
*/ */
#ifndef KATECUSTOM_TEXTTRANSFORMS_H #ifndef DEFT_TEXTTRANSFORMS_H
#define KATECUSTOM_TEXTTRANSFORMS_H #define DEFT_TEXTTRANSFORMS_H
#include <QString> #include <QString>
namespace katecustom namespace deft
{ {
enum class CaseStyle { enum class CaseStyle {
@ -49,6 +49,6 @@ QString rot13(const QString &text);
QString uuid(); QString uuid();
} // namespace texttransforms } // namespace texttransforms
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -8,7 +8,7 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
namespace katecustom namespace deft
{ {
namespace namespace
@ -284,4 +284,4 @@ MatchResult FuzzyRanker::score(QStringView candidate, QStringView query)
return score(candidate, tokenize(query)); return score(candidate, tokenize(query));
} }
} // namespace katecustom } // namespace deft

View File

@ -12,14 +12,14 @@
* - returns highlight ranges for every matched character * - returns highlight ranges for every matched character
* - exposes a frecency bonus hook for usage-aware ranking * - exposes a frecency bonus hook for usage-aware ranking
*/ */
#ifndef KATECUSTOM_FUZZYRANKER_H #ifndef DEFT_FUZZYRANKER_H
#define KATECUSTOM_FUZZYRANKER_H #define DEFT_FUZZYRANKER_H
#include <QString> #include <QString>
#include <QList> #include <QList>
#include <vector> #include <vector>
namespace katecustom namespace deft
{ {
/*! A contiguous span of matched characters in the candidate string. */ /*! A contiguous span of matched characters in the candidate string. */
@ -82,6 +82,6 @@ public:
static MatchResult score(QStringView candidate, QStringView query); static MatchResult score(QStringView candidate, QStringView query);
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -9,7 +9,7 @@
#include <algorithm> #include <algorithm>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -11,7 +11,7 @@
#include <QJsonValue> #include <QJsonValue>
#include <QSaveFile> #include <QSaveFile>
namespace katecustom namespace deft
{ {
namespace namespace
@ -132,4 +132,4 @@ int FrecencyStore::bonus(const QString &id, qint64 nowEpoch) const
return computeBonus(it.value(), nowEpoch); return computeBonus(it.value(), nowEpoch);
} }
} // namespace katecustom } // namespace deft

View File

@ -15,13 +15,13 @@
* temp file); the plugin picks the real path from QStandardPaths. The class is * temp file); the plugin picks the real path from QStandardPaths. The class is
* Qt::Core only and has no display or event-loop dependency. * Qt::Core only and has no display or event-loop dependency.
*/ */
#ifndef KATECUSTOM_FRECENCYSTORE_H #ifndef DEFT_FRECENCYSTORE_H
#define KATECUSTOM_FRECENCYSTORE_H #define DEFT_FRECENCYSTORE_H
#include <QHash> #include <QHash>
#include <QString> #include <QString>
namespace katecustom namespace deft
{ {
class FrecencyStore class FrecencyStore
@ -67,6 +67,6 @@ private:
QHash<QString, Entry> m_entries; QHash<QString, Entry> m_entries;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -10,7 +10,7 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
namespace katecustom namespace deft
{ {
namespace namespace
@ -220,4 +220,4 @@ QVariant PaletteModel::data(const QModelIndex &index, int role) const
} }
} }
} // namespace katecustom } // namespace deft

View File

@ -11,8 +11,8 @@
* This class is intentionally free of any widget dependency so it can be unit * This class is intentionally free of any widget dependency so it can be unit
* tested without an event loop or display. * tested without an event loop or display.
*/ */
#ifndef KATECUSTOM_PALETTEMODEL_H #ifndef DEFT_PALETTEMODEL_H
#define KATECUSTOM_PALETTEMODEL_H #define DEFT_PALETTEMODEL_H
#include "fuzzyranker.h" #include "fuzzyranker.h"
@ -21,7 +21,7 @@
#include <QVariant> #include <QVariant>
#include <QList> #include <QList>
namespace katecustom namespace deft
{ {
/*! One selectable entry in the palette. */ /*! One selectable entry in the palette. */
@ -86,6 +86,6 @@ private:
QString m_query; QString m_query;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -16,7 +16,7 @@
#include <QPainter> #include <QPainter>
#include <QPoint> #include <QPoint>
namespace katecustom namespace deft
{ {
namespace namespace
@ -241,4 +241,4 @@ bool PaletteWidget::eventFilter(QObject *obj, QEvent *event)
return QFrame::eventFilter(obj, event); return QFrame::eventFilter(obj, event);
} }
} // namespace katecustom } // namespace deft

View File

@ -12,8 +12,8 @@
* The widget owns a PaletteModel. Feed it items with setItems(); listen to * The widget owns a PaletteModel. Feed it items with setItems(); listen to
* activated(id) for the chosen command. * activated(id) for the chosen command.
*/ */
#ifndef KATECUSTOM_PALETTEWIDGET_H #ifndef DEFT_PALETTEWIDGET_H
#define KATECUSTOM_PALETTEWIDGET_H #define DEFT_PALETTEWIDGET_H
#include "palettemodel.h" #include "palettemodel.h"
@ -25,7 +25,7 @@ class QLineEdit;
class QListView; class QListView;
class QTimer; class QTimer;
namespace katecustom namespace deft
{ {
class PaletteWidget : public QFrame class PaletteWidget : public QFrame
@ -64,6 +64,6 @@ private:
QString m_pendingQuery; QString m_pendingQuery;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -10,7 +10,7 @@
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -7,7 +7,7 @@
#include <QPoint> #include <QPoint>
#include <QSignalSpy> #include <QSignalSpy>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -60,14 +60,14 @@ if(NOT OLLIE_WAYLAND)
list(APPEND OLLIE_PLUGIN_SOURCES waylandcursorwarp_stub.cpp) list(APPEND OLLIE_PLUGIN_SOURCES waylandcursorwarp_stub.cpp)
endif() endif()
kcoreaddons_add_plugin(olliepalette kcoreaddons_add_plugin(deft
SOURCES ${OLLIE_PLUGIN_SOURCES} SOURCES ${OLLIE_PLUGIN_SOURCES}
INSTALL_NAMESPACE "kf6/ktexteditor" 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 palette
radial radial
olliecommands_lib olliecommands_lib
@ -82,9 +82,9 @@ target_link_libraries(olliepalette PRIVATE
) )
if(OLLIE_WAYLAND) if(OLLIE_WAYLAND)
target_compile_definitions(olliepalette PRIVATE OLLIE_WAYLAND=1) target_compile_definitions(deft PRIVATE OLLIE_WAYLAND=1)
target_include_directories(olliepalette PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS}) target_include_directories(deft PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS})
target_link_libraries(olliepalette PRIVATE target_link_libraries(deft PRIVATE
ollie_wayland_proto ollie_wayland_proto
Qt6::GuiPrivate Qt6::GuiPrivate
${WAYLAND_CLIENT_LIBRARIES}) ${WAYLAND_CLIENT_LIBRARIES})

View File

@ -51,7 +51,7 @@
#include <QWidget> #include <QWidget>
#include <QWindow> #include <QWindow>
namespace katecustom namespace deft
{ {
namespace namespace
@ -1784,11 +1784,11 @@ void OllieView::acmeEraseWord()
} }
} }
} // namespace katecustom } // namespace deft
// K_PLUGIN_FACTORY generates the factory and the moc-level registration. The // K_PLUGIN_FACTORY generates the factory and the moc-level registration. The
// matching .moc include is required in this translation unit. // matching .moc include is required in this translation unit.
K_PLUGIN_FACTORY_WITH_JSON(OlliePluginFactory, "ollieplugin.json", K_PLUGIN_FACTORY_WITH_JSON(OlliePluginFactory, "ollieplugin.json",
registerPlugin<katecustom::OlliePlugin>();) registerPlugin<deft::OlliePlugin>();)
#include "ollieplugin.moc" #include "ollieplugin.moc"

View File

@ -8,8 +8,8 @@
* (Alt+X) and, when triggered, gathers every QAction currently exposed by the * (Alt+X) and, when triggered, gathers every QAction currently exposed by the
* window's GUI clients into a PaletteWidget for orderless fuzzy selection. * window's GUI clients into a PaletteWidget for orderless fuzzy selection.
*/ */
#ifndef KATECUSTOM_OLLIEPLUGIN_H #ifndef DEFT_OLLIEPLUGIN_H
#define KATECUSTOM_OLLIEPLUGIN_H #define DEFT_OLLIEPLUGIN_H
#include <KTextEditor/Plugin> #include <KTextEditor/Plugin>
@ -36,7 +36,7 @@ class View;
class Document; class Document;
} }
namespace katecustom namespace deft
{ {
class PaletteWidget; class PaletteWidget;
@ -182,6 +182,6 @@ private:
QWidget *m_samToolView = nullptr; // the dockable container from createToolView QWidget *m_samToolView = nullptr; // the dockable container from createToolView
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -5,10 +5,10 @@
"Name": "Levi Neely" "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", "Icon": "code-context",
"License": "LGPL-2.0-or-later", "License": "LGPL-2.0-or-later",
"Name": "Ollie Command Palette", "Name": "Deft",
"Version": "0.1.0" "Version": "0.1.0"
} }
} }

View File

@ -14,7 +14,7 @@
#include <QTextEdit> #include <QTextEdit>
#include <QVBoxLayout> #include <QVBoxLayout>
namespace katecustom namespace deft
{ {
// A small QPlainTextEdit that fires a signal on Ctrl+Return so the user can run // 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(); m_output->clear();
} }
} // namespace katecustom } // namespace deft

View File

@ -8,8 +8,8 @@
* the program text; OllieView does the document work (snapshot, engine, apply * the program text; OllieView does the document work (snapshot, engine, apply
* in an EditingTransaction) and calls showOutput()/showError() to report back. * in an EditingTransaction) and calls showOutput()/showError() to report back.
*/ */
#ifndef KATECUSTOM_SAMPANEL_H #ifndef DEFT_SAMPANEL_H
#define KATECUSTOM_SAMPANEL_H #define DEFT_SAMPANEL_H
#include <QWidget> #include <QWidget>
@ -17,7 +17,7 @@ class QPlainTextEdit;
class QPushButton; class QPushButton;
class QTextEdit; class QTextEdit;
namespace katecustom namespace deft
{ {
class SamPanel : public QWidget class SamPanel : public QWidget
@ -47,6 +47,6 @@ private:
QTextEdit *m_output = nullptr; QTextEdit *m_output = nullptr;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -13,7 +13,7 @@
#include <wayland-client.h> #include <wayland-client.h>
#include "wayland-pointer-constraints-unstable-v1-client-protocol.h" #include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
namespace katecustom namespace deft
{ {
namespace namespace
@ -153,4 +153,4 @@ bool WaylandCursorWarp::warp(QWindow *window, const QPointF &surfaceLocalPos)
return true; return true;
} }
} // namespace katecustom } // namespace deft

View File

@ -22,8 +22,8 @@
* if the compositor lacks the global, or the surface/pointer is unavailable, * if the compositor lacks the global, or the surface/pointer is unavailable,
* warp() returns false and the caller falls back (or no-ops). * warp() returns false and the caller falls back (or no-ops).
*/ */
#ifndef KATECUSTOM_WAYLANDCURSORWARP_H #ifndef DEFT_WAYLANDCURSORWARP_H
#define KATECUSTOM_WAYLANDCURSORWARP_H #define DEFT_WAYLANDCURSORWARP_H
#include <QObject> #include <QObject>
#include <QPointF> #include <QPointF>
@ -33,7 +33,7 @@ class QWindow;
struct wl_registry; struct wl_registry;
struct zwp_pointer_constraints_v1; struct zwp_pointer_constraints_v1;
namespace katecustom namespace deft
{ {
class WaylandCursorWarp : public QObject class WaylandCursorWarp : public QObject
@ -65,6 +65,6 @@ private:
bool m_triedBind = false; bool m_triedBind = false;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -10,7 +10,7 @@
#include <QGuiApplication> #include <QGuiApplication>
namespace katecustom namespace deft
{ {
WaylandCursorWarp::WaylandCursorWarp(QObject *parent) WaylandCursorWarp::WaylandCursorWarp(QObject *parent)
@ -39,4 +39,4 @@ bool WaylandCursorWarp::warp(QWindow *, const QPointF &)
return false; // no Wayland support compiled in return false; // no Wayland support compiled in
} }
} // namespace katecustom } // namespace deft

View File

@ -5,7 +5,7 @@
#include <QLocalSocket> #include <QLocalSocket>
namespace katecustom namespace deft
{ {
// 9P2000 message type codes (plan9port fcall.h). // 9P2000 message type codes (plan9port fcall.h).
@ -477,4 +477,4 @@ bool NineP::clunk(uint32_t fid)
return true; return true;
} }
} // namespace katecustom } // namespace deft

View File

@ -12,8 +12,8 @@
* The plumb socket lives at $NAMESPACE/plumb and speaks raw 9P2000, exactly as * The plumb socket lives at $NAMESPACE/plumb and speaks raw 9P2000, exactly as
* lib9pclient reaches it via nsmount("plumb") -> dial("unix!$ns/plumb"). * lib9pclient reaches it via nsmount("plumb") -> dial("unix!$ns/plumb").
*/ */
#ifndef KATECUSTOM_NINEP_H #ifndef DEFT_NINEP_H
#define KATECUSTOM_NINEP_H #define DEFT_NINEP_H
#include <QByteArray> #include <QByteArray>
#include <QString> #include <QString>
@ -21,7 +21,7 @@
class QLocalSocket; class QLocalSocket;
namespace katecustom namespace deft
{ {
/*! /*!
@ -126,6 +126,6 @@ private:
QString m_error; QString m_error;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -11,7 +11,7 @@
#include <unistd.h> #include <unistd.h>
namespace katecustom namespace deft
{ {
// Canonicalise the X11 display the way plan9 getns() does: "xxx:0.0" -> "xxx:0" // Canonicalise the X11 display the way plan9 getns() does: "xxx:0.0" -> "xxx:0"
@ -233,6 +233,6 @@ void Plumber::startReader()
m_reader->start(); m_reader->start();
} }
} // namespace katecustom } // namespace deft
#include "plumber.moc" #include "plumber.moc"

View File

@ -15,15 +15,15 @@
* The namespace socket is $NAMESPACE/plumb, or /tmp/ns.$USER.$DISPLAY/plumb * The namespace socket is $NAMESPACE/plumb, or /tmp/ns.$USER.$DISPLAY/plumb
* when $NAMESPACE is unset — the same resolution plan9's getns() performs. * when $NAMESPACE is unset — the same resolution plan9's getns() performs.
*/ */
#ifndef KATECUSTOM_PLUMBER_H #ifndef DEFT_PLUMBER_H
#define KATECUSTOM_PLUMBER_H #define DEFT_PLUMBER_H
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include "plumbmsg.h" #include "plumbmsg.h"
namespace katecustom namespace deft
{ {
class PlumbReader; // reader living on its own thread class PlumbReader; // reader living on its own thread
@ -75,6 +75,6 @@ private:
QString m_error; QString m_error;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -3,7 +3,7 @@
*/ */
#include "plumbmsg.h" #include "plumbmsg.h"
namespace katecustom namespace deft
{ {
QString PlumbMsg::lookup(const QString &name) const QString PlumbMsg::lookup(const QString &name) const
@ -194,4 +194,4 @@ bool PlumbMsg::unpack(const QByteArray &buf, PlumbMsg *out)
return true; return true;
} }
} // namespace katecustom } // namespace deft

View File

@ -21,14 +21,14 @@
* This header is pure (QString/QByteArray only) so pack/unpack can be unit * 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. * tested against the bytes captured from a live plumber on the edit port.
*/ */
#ifndef KATECUSTOM_PLUMBMSG_H #ifndef DEFT_PLUMBMSG_H
#define KATECUSTOM_PLUMBMSG_H #define DEFT_PLUMBMSG_H
#include <QByteArray> #include <QByteArray>
#include <QList> #include <QList>
#include <QString> #include <QString>
namespace katecustom namespace deft
{ {
/*! One plumb attribute (name=value). */ /*! One plumb attribute (name=value). */
@ -77,6 +77,6 @@ QByteArray packPlumbAttr(const QList<PlumbAttr> &attr);
/*! Parse a packed attribute line back into a list (exposed for tests). */ /*! Parse a packed attribute line back into a list (exposed for tests). */
QList<PlumbAttr> unpackPlumbAttr(const QByteArray &line); QList<PlumbAttr> unpackPlumbAttr(const QByteArray &line);
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -3,7 +3,7 @@
*/ */
#include "plumbresolve.h" #include "plumbresolve.h"
namespace katecustom namespace deft
{ {
PlumbAddr parsePlumbAddr(const QString &addr) PlumbAddr parsePlumbAddr(const QString &addr)
@ -46,4 +46,4 @@ PlumbAddr parsePlumbAddr(const QString &addr)
return out; return out;
} }
} // namespace katecustom } // namespace deft

View File

@ -12,12 +12,12 @@
* - selectionToData() picks what text to plumb: an explicit selection wins, * - selectionToData() picks what text to plumb: an explicit selection wins,
* otherwise the word under the caret. * otherwise the word under the caret.
*/ */
#ifndef KATECUSTOM_PLUMBRESOLVE_H #ifndef DEFT_PLUMBRESOLVE_H
#define KATECUSTOM_PLUMBRESOLVE_H #define DEFT_PLUMBRESOLVE_H
#include <QString> #include <QString>
namespace katecustom namespace deft
{ {
/*! Zero-based editor position parsed from a plumb addr attribute. */ /*! Zero-based editor position parsed from a plumb addr attribute. */
@ -36,6 +36,6 @@ struct PlumbAddr {
*/ */
PlumbAddr parsePlumbAddr(const QString &addr); PlumbAddr parsePlumbAddr(const QString &addr);
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -19,7 +19,7 @@
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestPlumbLive : public QObject class TestPlumbLive : public QObject
{ {

View File

@ -10,7 +10,7 @@
#include <QObject> #include <QObject>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestPlumbMsg : public QObject class TestPlumbMsg : public QObject
{ {

View File

@ -6,7 +6,7 @@
#include <QObject> #include <QObject>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestPlumbResolve : public QObject class TestPlumbResolve : public QObject
{ {

View File

@ -33,7 +33,7 @@
#include <cstdio> #include <cstdio>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -6,7 +6,7 @@
#include <QMetaMethod> #include <QMetaMethod>
#include <QMetaObject> #include <QMetaObject>
namespace katecustom namespace deft
{ {
KateProjectBridge::KateProjectBridge(QObject *parent) KateProjectBridge::KateProjectBridge(QObject *parent)
@ -80,4 +80,4 @@ QStringList KateProjectBridge::files() const
return m_view->property("projectFiles").toStringList(); return m_view->property("projectFiles").toStringList();
} }
} // namespace katecustom } // namespace deft

View File

@ -14,15 +14,15 @@
* disabled, not yet created, or a different Kate build) every accessor returns * disabled, not yet created, or a different Kate build) every accessor returns
* an empty value and callers fall back to our own ProjectIndex. * an empty value and callers fall back to our own ProjectIndex.
*/ */
#ifndef KATECUSTOM_KATEPROJECTBRIDGE_H #ifndef DEFT_KATEPROJECTBRIDGE_H
#define KATECUSTOM_KATEPROJECTBRIDGE_H #define DEFT_KATEPROJECTBRIDGE_H
#include <QObject> #include <QObject>
#include <QPointer> #include <QPointer>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
namespace katecustom namespace deft
{ {
class KateProjectBridge : public QObject class KateProjectBridge : public QObject
@ -58,6 +58,6 @@ private:
QPointer<QObject> m_view; QPointer<QObject> m_view;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -8,7 +8,7 @@
#include <QProcess> #include <QProcess>
#include <QSet> #include <QSet>
namespace katecustom namespace deft
{ {
QStringList ProjectIndex::rootMarkers() QStringList ProjectIndex::rootMarkers()
@ -185,4 +185,4 @@ QStringList ProjectIndex::listFiles(const QString &root)
return walkDirectory(root, ignoredDirs()); return walkDirectory(root, ignoredDirs());
} }
} // namespace katecustom } // namespace deft

View File

@ -15,13 +15,13 @@
* The matching/ranking of the returned list is left to FuzzyRanker / * The matching/ranking of the returned list is left to FuzzyRanker /
* PaletteWidget; this class only produces the candidate set. * PaletteWidget; this class only produces the candidate set.
*/ */
#ifndef KATECUSTOM_PROJECTINDEX_H #ifndef DEFT_PROJECTINDEX_H
#define KATECUSTOM_PROJECTINDEX_H #define DEFT_PROJECTINDEX_H
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
namespace katecustom namespace deft
{ {
class ProjectIndex class ProjectIndex
@ -85,6 +85,6 @@ private:
static QStringList gitListFiles(const QString &root); static QStringList gitListFiles(const QString &root);
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -9,7 +9,7 @@
#include <QPair> #include <QPair>
#include <QtConcurrent/QtConcurrentRun> #include <QtConcurrent/QtConcurrentRun>
namespace katecustom namespace deft
{ {
ProjectIndexer::ProjectIndexer(QObject *parent) ProjectIndexer::ProjectIndexer(QObject *parent)
@ -17,8 +17,8 @@ ProjectIndexer::ProjectIndexer(QObject *parent)
{ {
// Needed so QList<Symbol> can travel through QVariant / queued signals and // Needed so QList<Symbol> can travel through QVariant / queued signals and
// be captured by QSignalSpy in tests. // be captured by QSignalSpy in tests.
qRegisterMetaType<Symbol>("katecustom::Symbol"); qRegisterMetaType<Symbol>("deft::Symbol");
qRegisterMetaType<QList<Symbol>>("QList<katecustom::Symbol>"); qRegisterMetaType<QList<Symbol>>("QList<deft::Symbol>");
} }
ProjectIndexer::~ProjectIndexer() ProjectIndexer::~ProjectIndexer()
@ -163,4 +163,4 @@ void ProjectIndexer::requestSymbols(const QString &root)
})); }));
} }
} // namespace katecustom } // namespace deft

View File

@ -14,8 +14,8 @@
* dependency. A per-root generation counter drops results from superseded or * dependency. A per-root generation counter drops results from superseded or
* invalidated requests. * invalidated requests.
*/ */
#ifndef KATECUSTOM_PROJECTINDEXER_H #ifndef DEFT_PROJECTINDEXER_H
#define KATECUSTOM_PROJECTINDEXER_H #define DEFT_PROJECTINDEXER_H
#include "symbolindex.h" #include "symbolindex.h"
@ -26,7 +26,7 @@
template<typename T> class QFutureWatcher; template<typename T> class QFutureWatcher;
namespace katecustom namespace deft
{ {
class ProjectIndexer : public QObject class ProjectIndexer : public QObject
@ -87,6 +87,6 @@ private:
quint64 m_symbolsJobGen = 0; quint64 m_symbolsJobGen = 0;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -6,7 +6,7 @@
#include <QProcess> #include <QProcess>
#include <QStandardPaths> #include <QStandardPaths>
namespace katecustom namespace deft
{ {
QString SymbolIndex::ctagsBinary() QString SymbolIndex::ctagsBinary()
@ -128,4 +128,4 @@ QList<Symbol> SymbolIndex::listSymbols(const QString &root, const QStringList &f
return parseTags(out); return parseTags(out);
} }
} // namespace katecustom } // namespace deft

View File

@ -12,15 +12,15 @@
* *
* The parsing (parseTags) is pure and unit-tested; listSymbols runs the process. * The parsing (parseTags) is pure and unit-tested; listSymbols runs the process.
*/ */
#ifndef KATECUSTOM_SYMBOLINDEX_H #ifndef DEFT_SYMBOLINDEX_H
#define KATECUSTOM_SYMBOLINDEX_H #define DEFT_SYMBOLINDEX_H
#include <QList> #include <QList>
#include <QMetaType> #include <QMetaType>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
namespace katecustom namespace deft
{ {
/*! One symbol located in the project. */ /*! 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 class SymbolIndex
@ -73,6 +73,6 @@ public:
static QList<Symbol> listSymbols(const QString &root, const QStringList &files); static QList<Symbol> listSymbols(const QString &root, const QStringList &files);
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -10,7 +10,7 @@
#include <QSignalSpy> #include <QSignalSpy>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
// Stand-in with the same Q_PROPERTY names and one change signal as the real // Stand-in with the same Q_PROPERTY names and one change signal as the real
// KateProjectPluginView. // KateProjectPluginView.

View File

@ -13,7 +13,7 @@
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -13,7 +13,7 @@
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -12,7 +12,7 @@
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestSymbolIndex : public QObject class TestSymbolIndex : public QObject
{ {

View File

@ -13,7 +13,7 @@
#include <QFile> #include <QFile>
#include <QStandardPaths> #include <QStandardPaths>
namespace katecustom namespace deft
{ {
namespace namespace
@ -204,4 +204,4 @@ QList<RadialDef> RadialConfig::builtinDefault()
return {edit, window}; return {edit, window};
} }
} // namespace katecustom } // namespace deft

View File

@ -25,8 +25,8 @@
* *
* Pure parsing/data — no widget or plugin dependency, so it is unit testable. * Pure parsing/data — no widget or plugin dependency, so it is unit testable.
*/ */
#ifndef KATECUSTOM_RADIALCONFIG_H #ifndef DEFT_RADIALCONFIG_H
#define KATECUSTOM_RADIALCONFIG_H #define DEFT_RADIALCONFIG_H
#include "radialmodel.h" #include "radialmodel.h"
@ -35,7 +35,7 @@
class QJsonObject; class QJsonObject;
namespace katecustom namespace deft
{ {
struct RadialDef { struct RadialDef {
@ -72,6 +72,6 @@ public:
static QList<RadialDef> builtinDefault(); static QList<RadialDef> builtinDefault();
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -12,7 +12,7 @@
#include <QScreen> #include <QScreen>
#include <QtMath> #include <QtMath>
namespace katecustom namespace deft
{ {
RadialMenu::RadialMenu(QWidget *parent) RadialMenu::RadialMenu(QWidget *parent)
@ -266,4 +266,4 @@ void RadialMenu::finishCancelled()
Q_EMIT cancelled(); Q_EMIT cancelled();
} }
} // namespace katecustom } // namespace deft

View File

@ -12,8 +12,8 @@
* outside the ring cancels, the central hub goes back one level or cancels. * outside the ring cancels, the central hub goes back one level or cancels.
* Esc ascends one level, or cancels at the root. * Esc ascends one level, or cancels at the root.
*/ */
#ifndef KATECUSTOM_RADIALMENU_H #ifndef DEFT_RADIALMENU_H
#define KATECUSTOM_RADIALMENU_H #define DEFT_RADIALMENU_H
#include "radialmodel.h" #include "radialmodel.h"
@ -21,7 +21,7 @@
#include <memory> #include <memory>
namespace katecustom namespace deft
{ {
class RadialMenu : public QWidget class RadialMenu : public QWidget
@ -77,6 +77,6 @@ private:
double m_outerRadius = 130.0; double m_outerRadius = 130.0;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -5,7 +5,7 @@
#include <QtMath> #include <QtMath>
namespace katecustom namespace deft
{ {
RadialModel::RadialModel(RadialNode root) RadialModel::RadialModel(RadialNode root)
@ -116,4 +116,4 @@ RadialModel::Hit RadialModel::resolve(int index, QString &outActionId) const
return Hit::Activate; return Hit::Activate;
} }
} // namespace katecustom } // namespace deft

View File

@ -13,8 +13,8 @@
* Angle convention: 0 radians points up (12 o'clock); angles increase * Angle convention: 0 radians points up (12 o'clock); angles increase
* clockwise. Slices are distributed evenly starting at the top. * clockwise. Slices are distributed evenly starting at the top.
*/ */
#ifndef KATECUSTOM_RADIALMODEL_H #ifndef DEFT_RADIALMODEL_H
#define KATECUSTOM_RADIALMODEL_H #define DEFT_RADIALMODEL_H
#include <QString> #include <QString>
#include <QList> #include <QList>
@ -22,7 +22,7 @@
#include <memory> #include <memory>
namespace katecustom namespace deft
{ {
struct RadialNode { struct RadialNode {
@ -94,6 +94,6 @@ private:
const RadialNode &nodeAtPath() const; const RadialNode &nodeAtPath() const;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -8,7 +8,7 @@
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestRadialConfig : public QObject class TestRadialConfig : public QObject
{ {

View File

@ -5,7 +5,7 @@
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
namespace namespace
{ {

View File

@ -23,7 +23,7 @@
#include <QProcess> #include <QProcess>
#include <algorithm> #include <algorithm>
namespace katecustom namespace deft
{ {
namespace namespace
@ -1286,4 +1286,4 @@ SamEngine::FileLoop SamEngine::peelFileLoop(const QString &program)
return fl; return fl;
} }
} // namespace katecustom } // namespace deft

View File

@ -28,13 +28,13 @@
* - Multi-file features (b B n D X Y, "re" file-addressing) and external file * - 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. * I/O (e r w f) are out of scope: Kate manages files and views.
*/ */
#ifndef KATECUSTOM_SAMENGINE_H #ifndef DEFT_SAMENGINE_H
#define KATECUSTOM_SAMENGINE_H #define DEFT_SAMENGINE_H
#include <QList> #include <QList>
#include <QString> #include <QString>
namespace katecustom namespace deft
{ {
/*! One edit against the ORIGINAL snapshot: replace [start,end) with text. */ /*! One edit against the ORIGINAL snapshot: replace [start,end) with text. */
@ -89,6 +89,6 @@ public:
static FileLoop peelFileLoop(const QString &program); static FileLoop peelFileLoop(const QString &program);
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -6,7 +6,7 @@
*/ */
#include "samregex.h" #include "samregex.h"
namespace katecustom namespace deft
{ {
// Action codes (regexp.c). A literal rune uses its own code point as `type` // Action codes (regexp.c). A literal rune uses its own code point as `type`
@ -629,4 +629,4 @@ std::optional<SamMatch> SamRegex::match(const QString &text, int from, int bound
return best; return best;
} }
} // namespace katecustom } // namespace deft

View File

@ -24,15 +24,15 @@
* Only the forward machine is ported; backward search is done by the caller * Only the forward machine is ported; backward search is done by the caller
* scanning forward and keeping the last qualifying match. * scanning forward and keeping the last qualifying match.
*/ */
#ifndef KATECUSTOM_SAMREGEX_H #ifndef DEFT_SAMREGEX_H
#define KATECUSTOM_SAMREGEX_H #define DEFT_SAMREGEX_H
#include <QList> #include <QList>
#include <QString> #include <QString>
#include <QVector> #include <QVector>
#include <optional> #include <optional>
namespace katecustom namespace deft
{ {
/*! A match: half-open character ranges. caps[0] is the whole match; caps[1..9] /*! A match: half-open character ranges. caps[0] is the whole match; caps[1..9]
@ -109,6 +109,6 @@ private:
friend class SamRegexCompiler; friend class SamRegexCompiler;
}; };
} // namespace katecustom } // namespace deft
#endif #endif

View File

@ -10,7 +10,7 @@
#include <QObject> #include <QObject>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestSamEngine : public QObject class TestSamEngine : public QObject
{ {

View File

@ -11,7 +11,7 @@
#include <QObject> #include <QObject>
#include <QTest> #include <QTest>
using namespace katecustom; using namespace deft;
class TestSamRegex : public QObject class TestSamRegex : public QObject
{ {