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:
parent
16ebd64789
commit
04c076b6d9
@ -5,10 +5,21 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QDBusMetaType>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void registerComplexDbusType()
|
||||||
|
{
|
||||||
|
qDBusRegisterMetaType<QDBusObjectPath>();
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
|
|
||||||
|
registerComplexDbusType();
|
||||||
|
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
int ret{0};
|
int ret{0};
|
||||||
QTimer::singleShot(0, &app, [&ret] {
|
QTimer::singleShot(0, &app, [&ret] {
|
||||||
|
Loading…
Reference in New Issue
Block a user