Advance Wayland and KDE package bring-up
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
|
||||
|
||||
include(ECMMarkAsTest)
|
||||
|
||||
macro(KDBUSADDONS_TESTS)
|
||||
foreach(_testname ${ARGN})
|
||||
add_executable(${_testname} ${_testname}.cpp)
|
||||
ecm_mark_as_test(${_testname})
|
||||
target_link_libraries(${_testname} KF6::DBusAddons)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
kdbusaddons_tests(
|
||||
dbuscalltest
|
||||
syncdbusenvtest
|
||||
)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusReply>
|
||||
#include <QDebug>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
if (!QDBusConnection::sessionBus().isConnected() || !QDBusConnection::sessionBus().interface()) {
|
||||
qCritical() << "Session bus not found";
|
||||
return 125;
|
||||
}
|
||||
|
||||
qDebug() << "sending reparseConfiguration to object Konqueror in konqueror";
|
||||
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/Konqueror"), //
|
||||
QStringLiteral("org.kde.Konqueror"),
|
||||
QStringLiteral("reparseConfiguration"));
|
||||
if (!QDBusConnection::sessionBus().send(message)) {
|
||||
qDebug() << "void expected, " << QDBusConnection::sessionBus().lastError().name() << " returned";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <kupdatelaunchenvironmentjob.h>
|
||||
|
||||
// This test syncs the current environment of the spawned process to systemd/whatever
|
||||
// akin to dbus-update-activation-environment
|
||||
// it can then be compared with "systemd-run --user -P env" or watched with dbus-monitor
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
QEventLoop e;
|
||||
auto job = new KUpdateLaunchEnvironmentJob(QProcessEnvironment::systemEnvironment());
|
||||
QObject::connect(job, &KUpdateLaunchEnvironmentJob::finished, &e, &QEventLoop::quit);
|
||||
return e.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user