mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-04 16:25:27 +08:00
qt 6.5.1 original
This commit is contained in:
16
tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt
Normal file
16
tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## server Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(server
|
||||
GUI
|
||||
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
|
||||
SOURCES
|
||||
../serverobject.h
|
||||
server.cpp
|
||||
LIBRARIES
|
||||
Qt::DBus
|
||||
)
|
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