mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-29 03:05:05 +00:00
cleanup(plugin): remove dependency on unstable moc functions
This commit is contained in:
2 files changed
+11
-9
No files matched your search
@@ -3,9 +3,6 @@
|
||||
|
||||
#include <qvector.h> // NOLINT (what??)
|
||||
|
||||
// defined by moc. see below comment.
|
||||
void qml_register_types_QuickShell(); // NOLINT
|
||||
|
||||
static QVector<QuickshellPlugin*> plugins; // NOLINT
|
||||
|
||||
void QuickshellPlugin::registerPlugin(QuickshellPlugin& plugin) { plugins.push_back(&plugin); }
|
||||
@@ -24,11 +21,6 @@ void QuickshellPlugin::initPlugins() {
|
||||
plugin->init();
|
||||
}
|
||||
|
||||
// This seems incredibly stupid but it appears qt will not register the module types
|
||||
// if types are already defined for the module, meaning qmlRegisterType does not work
|
||||
// unless the module types are already registered.
|
||||
qml_register_types_QuickShell();
|
||||
|
||||
for (QuickshellPlugin* plugin: plugins) {
|
||||
plugin->registerTypes();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user