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:
parent
019fed6db4
commit
d96cb63baf
12
README.md
12
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
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <QProcess>
|
||||
#include <QStringList>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
* pipe <shell> replace the selection with the output of `sh -c <shell>`,
|
||||
* feeding the selection on stdin
|
||||
*/
|
||||
#ifndef KATECUSTOM_OLLIECOMMANDS_H
|
||||
#define KATECUSTOM_OLLIECOMMANDS_H
|
||||
#ifndef DEFT_OLLIECOMMANDS_H
|
||||
#define DEFT_OLLIECOMMANDS_H
|
||||
|
||||
#include <KTextEditor/Command>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class OllieCommands : public KTextEditor::Command
|
||||
|
|
@ -46,6 +46,6 @@ private:
|
|||
static QStringList supportedCmds();
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestOllieCommandsLive : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestOllieRegistration : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
#include <QTest>
|
||||
#include <QRegularExpression>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace katecustom::texttransforms;
|
||||
using namespace deft;
|
||||
using namespace deft::texttransforms;
|
||||
|
||||
class TestTextTransforms : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
namespace texttransforms
|
||||
{
|
||||
|
|
@ -170,4 +170,4 @@ QString uuid()
|
|||
}
|
||||
|
||||
} // namespace texttransforms
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <QString>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QString>
|
||||
#include <QList>
|
||||
#include <vector>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <QJsonValue>
|
||||
#include <QSaveFile>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QHash>
|
||||
#include <QString>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class FrecencyStore
|
||||
|
|
@ -67,6 +67,6 @@ private:
|
|||
QHash<QString, Entry> m_entries;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
namespace
|
||||
|
|
@ -220,4 +220,4 @@ QVariant PaletteModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <QVariant>
|
||||
#include <QList>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
/*! One selectable entry in the palette. */
|
||||
|
|
@ -86,6 +86,6 @@ private:
|
|||
QString m_query;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <QTemporaryDir>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <QPoint>
|
||||
#include <QSignalSpy>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
|
||||
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<katecustom::OlliePlugin>();)
|
||||
registerPlugin<deft::OlliePlugin>();)
|
||||
|
||||
#include "ollieplugin.moc"
|
||||
|
|
|
|||
|
|
@ -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 <KTextEditor/Plugin>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <QTextEdit>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QWidget>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <wayland-client.h>
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -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 <QObject>
|
||||
#include <QPointF>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <QGuiApplication>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <QLocalSocket>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QByteArray>
|
||||
#include <QString>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
class QLocalSocket;
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
/*!
|
||||
|
|
@ -126,6 +126,6 @@ private:
|
|||
QString m_error;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -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 <QObject>
|
||||
#include <QString>
|
||||
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <QByteArray>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
/*! 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). */
|
||||
QList<PlumbAttr> unpackPlumbAttr(const QByteArray &line);
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <QString>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <QTemporaryFile>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestPlumbLive : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <QObject>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestPlumbMsg : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <QObject>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestPlumbResolve : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <cstdio>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <QMetaMethod>
|
||||
#include <QMetaObject>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QObject>
|
||||
#include <QPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class KateProjectBridge : public QObject
|
||||
|
|
@ -58,6 +58,6 @@ private:
|
|||
QPointer<QObject> m_view;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <QProcess>
|
||||
#include <QSet>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QString>
|
||||
#include <QStringList>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class ProjectIndex
|
||||
|
|
@ -85,6 +85,6 @@ private:
|
|||
static QStringList gitListFiles(const QString &root);
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <QPair>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
ProjectIndexer::ProjectIndexer(QObject *parent)
|
||||
|
|
@ -17,8 +17,8 @@ ProjectIndexer::ProjectIndexer(QObject *parent)
|
|||
{
|
||||
// Needed so QList<Symbol> can travel through QVariant / queued signals and
|
||||
// be captured by QSignalSpy in tests.
|
||||
qRegisterMetaType<Symbol>("katecustom::Symbol");
|
||||
qRegisterMetaType<QList<Symbol>>("QList<katecustom::Symbol>");
|
||||
qRegisterMetaType<Symbol>("deft::Symbol");
|
||||
qRegisterMetaType<QList<Symbol>>("QList<deft::Symbol>");
|
||||
}
|
||||
|
||||
ProjectIndexer::~ProjectIndexer()
|
||||
|
|
@ -163,4 +163,4 @@ void ProjectIndexer::requestSymbols(const QString &root)
|
|||
}));
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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<typename T> class QFutureWatcher;
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class ProjectIndexer : public QObject
|
||||
|
|
@ -87,6 +87,6 @@ private:
|
|||
quint64 m_symbolsJobGen = 0;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <QProcess>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
QString SymbolIndex::ctagsBinary()
|
||||
|
|
@ -128,4 +128,4 @@ QList<Symbol> SymbolIndex::listSymbols(const QString &root, const QStringList &f
|
|||
return parseTags(out);
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <QList>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
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<Symbol> listSymbols(const QString &root, const QStringList &files);
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <QSignalSpy>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
// Stand-in with the same Q_PROPERTY names and one change signal as the real
|
||||
// KateProjectPluginView.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <QTemporaryDir>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <QTemporaryDir>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <QTemporaryDir>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestSymbolIndex : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
namespace
|
||||
|
|
@ -204,4 +204,4 @@ QList<RadialDef> RadialConfig::builtinDefault()
|
|||
return {edit, window};
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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<RadialDef> builtinDefault();
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <QScreen>
|
||||
#include <QtMath>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
RadialMenu::RadialMenu(QWidget *parent)
|
||||
|
|
@ -266,4 +266,4 @@ void RadialMenu::finishCancelled()
|
|||
Q_EMIT cancelled();
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <memory>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
class RadialMenu : public QWidget
|
||||
|
|
@ -77,6 +77,6 @@ private:
|
|||
double m_outerRadius = 130.0;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <QtMath>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <QString>
|
||||
#include <QList>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
struct RadialNode {
|
||||
|
|
@ -94,6 +94,6 @@ private:
|
|||
const RadialNode &nodeAtPath() const;
|
||||
};
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <QTemporaryDir>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestRadialConfig : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <QProcess>
|
||||
#include <algorithm>
|
||||
|
||||
namespace katecustom
|
||||
namespace deft
|
||||
{
|
||||
|
||||
namespace
|
||||
|
|
@ -1286,4 +1286,4 @@ SamEngine::FileLoop SamEngine::peelFileLoop(const QString &program)
|
|||
return fl;
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <QList>
|
||||
#include <QString>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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<SamMatch> SamRegex::match(const QString &text, int from, int bound
|
|||
return best;
|
||||
}
|
||||
|
||||
} // namespace katecustom
|
||||
} // namespace deft
|
||||
|
|
|
|||
|
|
@ -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 <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <optional>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <QObject>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestSamEngine : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <QObject>
|
||||
#include <QTest>
|
||||
|
||||
using namespace katecustom;
|
||||
using namespace deft;
|
||||
|
||||
class TestSamRegex : public QObject
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue