PolkitQt-1
8 #include "polkitqt1-details.h"
10 #include <QStringList>
12 #include <polkit/polkit.h>
17 class Q_DECL_HIDDEN Details::Data :
public QSharedData
21 Data(
const Data &other)
23 , polkitDetails(other.polkitDetails)
25 if (polkitDetails !=
nullptr) {
26 g_object_ref(polkitDetails);
31 if (polkitDetails !=
nullptr) {
32 g_object_unref(polkitDetails);
36 PolkitDetails *polkitDetails;
42 d->polkitDetails = polkit_details_new();
48 d->polkitDetails = pkDetails;
50 if (d->polkitDetails !=
nullptr) {
51 g_object_ref(d->polkitDetails);
69 const gchar *result = polkit_details_lookup(d->polkitDetails, key.
toUtf8().
data());
70 if (result !=
nullptr) {
84 gchar **result = polkit_details_get_keys(d->polkitDetails);
86 int len = g_strv_length(result);
87 for (
int i = 0; i < len; i++) {
void append(const T &value)
QString fromUtf8(const char *str, int size)
void insert(const QString &key, const QString &value)
Inserts key key with value value.
QString lookup(const QString &key) const
Get the value for key.
Details()
Creates a new Details object.
QByteArray toUtf8() const const
QStringList keys() const
Gets a list of all keys.
Class used for passing details around.
Namespace wrapping Polkit-Qt classes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Jun 26 2022 04:06:09 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.