diff options
Diffstat (limited to 'tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp')
-rw-r--r-- | tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp index da24429b9e..535d2f756b 100644 --- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp +++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp @@ -115,6 +115,16 @@ public slots: return obj.m_complexProp; } + bool interactiveAuthorization() + { + if (message().isInteractiveAuthorizationAllowed()) + return true; + + sendErrorReply(QStringLiteral("org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"), + QStringLiteral("Interactive authentication required.")); + return false; + } + void quit() { qApp->quit(); |