fix: register QDBusObjectPath in ut

qt 6.4 will failed to connect to signal if we do not register this type.

Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
black-desk 2023-08-30 11:28:41 +08:00 committed by Comix
parent 16ebd64789
commit 04c076b6d9

View File

@ -5,10 +5,21 @@
#include <QCoreApplication>
#include <gtest/gtest.h>
#include <QTimer>
#include <QDBusMetaType>
namespace {
void registerComplexDbusType()
{
qDBusRegisterMetaType<QDBusObjectPath>();
}
} // namespace
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
registerComplexDbusType();
::testing::InitGoogleTest(&argc, argv);
int ret{0};
QTimer::singleShot(0, &app, [&ret] {