Skip to content

Commit ce66216

Browse files
committed
fix(cli): register QDBusObjectPath meta type explicitly
Work around Qt 6 D-Bus bug where unregistered meta types cause runtime failures. This issue affects various distributions shipping affected Qt 6 versions (e.g., Ubuntu 24.04). Link: https://qt-project.atlassian.net/browse/QTBUG-108822 Signed-off-by: ComixHe <ComixHe1895@outlook.com>
1 parent b6cfbb7 commit ce66216

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/ll-cli/src/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
#include <CLI/CLI.hpp>
2525
#include <sys/file.h>
2626

27+
#include <QDBusMetaType>
28+
#include <QDBusObjectPath>
2729
#include <QJsonDocument>
2830
#include <QJsonObject>
2931
#include <QtGlobal>
3032

3133
#include <algorithm>
32-
#include <cstddef>
3334
#include <functional>
3435
#include <memory>
3536
#include <string_view>
@@ -891,6 +892,8 @@ You can report bugs to the linyaps team under this project: https://github.com/O
891892

892893
int main(int argc, char **argv)
893894
{
895+
qDBusRegisterMetaType<QDBusObjectPath>();
896+
894897
// bind text domain
895898
bindtextdomain(PACKAGE_LOCALE_DOMAIN, PACKAGE_LOCALE_DIR);
896899
// text domain

0 commit comments

Comments
 (0)