Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusabstractinterface_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the public API. This header file may
10// change from version to version without notice, or even be
11// removed.
12//
13// We mean it.
14//
15//
16
17#ifndef QDBUSABSTRACTINTERFACE_P_H
18#define QDBUSABSTRACTINTERFACE_P_H
19
20#include <QtDBus/private/qtdbusglobal_p.h>
22#include <qdbusconnection.h>
23#include <qdbuserror.h>
24#include "qdbusconnection_p.h"
25#include "private/qobject_p.h"
26
27#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
28
29#ifndef QT_NO_DBUS
30
32
34{
35public:
36 Q_DECLARE_PUBLIC(QDBusAbstractInterface)
37
38 mutable QDBusConnection connection; // mutable because we want to make calls from const functions
46
47 // this is set during creation and never changed
48 // it can't be const because QDBusInterfacePrivate has one more check
49 bool isValid;
50
52 const QString &iface, const QDBusConnection& con, bool dynamic);
54 void initOwnerTracking();
55 bool canMakeCalls() const;
56
57 // these functions do not check if the property is valid
58 bool property(const QMetaProperty &mp, void *returnValuePtr) const;
59 bool setProperty(const QMetaProperty &mp, const QVariant &value);
60
61 // return conn's d pointer
64
65 void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
66
67 static void finishDisconnectNotify(QDBusAbstractInterface *iface, int signalId);
68};
69
71
72#endif // QT_NO_DBUS
73#endif
static void finishDisconnectNotify(QDBusAbstractInterface *iface, int signalId)
QDBusConnectionPrivate * connectionPrivate() const
void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
static QDBusConnectionPrivate * d(const QDBusConnection &q)
\inmodule QtDBus
\inmodule QtDBus
Definition qdbuserror.h:21
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLbitfield GLuint64 timeout
[4]
GLuint name
GLsizei const GLchar *const * path
GLfloat GLfloat p
[1]
const char property[13]
Definition qwizard.cpp:101
args<< 1<< 2;QJSValue threeAgain=fun.call(args);QString fileName="helloworld.qs";QFile scriptFile(fileName);if(!scriptFile.open(QIODevice::ReadOnly)) QTextStream stream(&scriptFile);QString contents=stream.readAll();scriptFile.close();myEngine.evaluate(contents, fileName);myEngine.globalObject().setProperty("myNumber", 123);...QJSValue myNumberPlusOne=myEngine.evaluate("myNumber + 1");QJSValue result=myEngine.evaluate(...);if(result.isError()) qDebug()<< "Uncaught exception at line"<< result.property("lineNumber").toInt()<< ":"<< result.toString();QPushButton *button=new QPushButton;QJSValue scriptButton=myEngine.newQObject(button);myEngine.globalObject().setProperty("button", scriptButton);myEngine.evaluate("button.checkable = true");qDebug()<< scriptButton.property("checkable").toBool();scriptButton.property("show").call();QJSEngine engine;QObject *myQObject=new QObject();myQObject- setProperty)("dynamicProperty", 3)