mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 08:45:25 +08:00
qt 6.5.1 original
This commit is contained in:
27
tests/benchmarks/dbus/qdbusperformance/server/server.cpp
Normal file
27
tests/benchmarks/dbus/qdbusperformance/server/server.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <QtCore/QtCore>
|
||||
|
||||
|
||||
#include "../serverobject.h"
|
||||
|
||||
static const char serviceName[] = "org.qtproject.autotests.performance";
|
||||
static const char objectPath[] = "/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
QDBusConnection con = QDBusConnection::sessionBus();
|
||||
if (!con.isConnected())
|
||||
exit(1);
|
||||
|
||||
if (!con.registerService(serviceName))
|
||||
exit(2);
|
||||
|
||||
ServerObject obj(objectPath, con);
|
||||
printf("ready.\n");
|
||||
fflush(stdout);
|
||||
return app.exec();
|
||||
}
|
||||
|
Reference in New Issue
Block a user