Commit 011ae606 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 57b21790
......@@ -60,20 +60,20 @@ uint AccessPortal::AccessDialog(const QDBusObjectPath &handle,
accessDialog->setTitle(title);
accessDialog->setSubtitle(subtitle);
if (options.contains(QLatin1String("modal"))) {
accessDialog->setModal(options.value(QLatin1String("modal")).toBool());
if (options.contains(QStringLiteral("modal"))) {
accessDialog->setModal(options.value(QStringLiteral("modal")).toBool());
}
if (options.contains(QLatin1String("deny_label"))) {
accessDialog->setRejectLabel(options.value(QLatin1String("deny_label")).toString());
if (options.contains(QStringLiteral("deny_label"))) {
accessDialog->setRejectLabel(options.value(QStringLiteral("deny_label")).toString());
}
if (options.contains(QLatin1String("grant_label"))) {
accessDialog->setAcceptLabel(options.value(QLatin1String("grant_label")).toString());
if (options.contains(QStringLiteral("grant_label"))) {
accessDialog->setAcceptLabel(options.value(QStringLiteral("grant_label")).toString());
}
if (options.contains(QLatin1String("icon"))) {
accessDialog->setIcon(options.value(QLatin1String("icon")).toString());
if (options.contains(QStringLiteral("icon"))) {
accessDialog->setIcon(options.value(QStringLiteral("icon")).toString());
}
// TODO choices
......
......@@ -37,7 +37,7 @@ AccessDialog::AccessDialog(QDialog *parent, Qt::WindowFlags flags)
connect(m_dialog->buttonBox, &QDialogButtonBox::accepted, this, &AccessDialog::accept);
connect(m_dialog->buttonBox, &QDialogButtonBox::rejected, this, &AccessDialog::reject);
m_dialog->iconLabel->setPixmap(QIcon::fromTheme(QLatin1String("dialog-question")).pixmap(QSize(64, 64)));
m_dialog->iconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-question")).pixmap(QSize(64, 64)));
setWindowTitle(i18n("Request device access"));
}
......
......@@ -52,18 +52,18 @@ uint AppChooserPortal::ChooseApplication(const QDBusObjectPath &handle,
QString latestChoice;
if (options.contains(QLatin1String("last_choice"))) {
latestChoice = options.value(QLatin1String("last_choice")).toString();
if (options.contains(QStringLiteral("last_choice"))) {
latestChoice = options.value(QStringLiteral("last_choice")).toString();
}
AppChooserDialog *appDialog = new AppChooserDialog(choices, latestChoice, options.value(QLatin1String("filename")).toString());
AppChooserDialog *appDialog = new AppChooserDialog(choices, latestChoice, options.value(QStringLiteral("filename")).toString());
m_appChooserDialogs.insert(handle.path(), appDialog);
Utils::setParentWindow(appDialog, parent_window);
int result = appDialog->exec();
if (result) {
results.insert(QLatin1String("choice"), appDialog->selectedApplication());
results.insert(QStringLiteral("choice"), appDialog->selectedApplication());
}
m_appChooserDialogs.remove(handle.path());
......
......@@ -32,7 +32,7 @@ AppChooserDialogItem::AppChooserDialogItem(const QString &applicationName, const
{
setAutoRaise(true);
setAutoExclusive(true);
setStyleSheet(QLatin1String("text-align: center"));
setStyleSheet(QStringLiteral("text-align: center"));
setIcon(QIcon::fromTheme(icon));
setIconSize(QSize(64, 64));
setCheckable(true);
......
......@@ -46,14 +46,14 @@ uint EmailPortal::ComposeEmail(const QDBusObjectPath &handle, const QString &app
qCDebug(XdgDesktopPortalKdeEmail) << " options: " << options;
QString attachmentString;
const QStringList attachments = options.value(QLatin1String("attachments")).toStringList();
const QStringList attachments = options.value(QStringLiteral("attachments")).toStringList();
for (const QString &attachment : attachments) {
attachmentString += QStringLiteral("&attachment=%1").arg(attachment);
}
const QString mailtoUrl = QStringLiteral("mailto:%1?subject=%2&body=%3%4").arg(options.value(QLatin1String("address")).toString())
.arg(options.value(QLatin1String("subject")).toString())
.arg(options.value(QLatin1String("body")).toString())
const QString mailtoUrl = QStringLiteral("mailto:%1?subject=%2&body=%3%4").arg(options.value(QStringLiteral("address")).toString())
.arg(options.value(QStringLiteral("subject")).toString())
.arg(options.value(QStringLiteral("body")).toString())
.arg(attachmentString);
return QDesktopServices::openUrl(QUrl(mailtoUrl));
}
......
......@@ -92,11 +92,11 @@ FileDialog::FileDialog(QDialog *parent, Qt::WindowFlags flags)
m_buttons = new QDialogButtonBox(this);
m_buttons->addButton(m_fileWidget->okButton(), QDialogButtonBox::AcceptRole);
m_buttons->addButton(m_fileWidget->cancelButton(), QDialogButtonBox::RejectRole);
connect(m_buttons, SIGNAL(rejected()), m_fileWidget, SLOT(slotCancel()));
connect(m_fileWidget->okButton(), SIGNAL(clicked(bool)), m_fileWidget, SLOT(slotOk()));
connect(m_fileWidget, SIGNAL(accepted()), m_fileWidget, SLOT(accept()));
connect(m_fileWidget, SIGNAL(accepted()), SLOT(accept()));
connect(m_fileWidget->cancelButton(), SIGNAL(clicked(bool)), SLOT(reject()));
connect(m_buttons, &QDialogButtonBox::rejected, m_fileWidget, &KFileWidget::slotCancel);
connect(m_fileWidget->okButton(), &QAbstractButton::clicked, m_fileWidget, &KFileWidget::slotOk);
connect(m_fileWidget, &KFileWidget::accepted, m_fileWidget, &KFileWidget::accept);
connect(m_fileWidget, &KFileWidget::accepted, this, &QDialog::accept);
connect(m_fileWidget->cancelButton(), &QAbstractButton::clicked, this, &QDialog::reject);
layout()->addWidget(m_buttons);
}
......@@ -150,20 +150,20 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
* Example: [('encoding', 'Encoding', [('utf8', 'Unicode (UTF-8)'), ('latin15', 'Western')], 'latin15'), ('reencode', 'Reencode', [], 'false')]
*/
if (options.contains(QLatin1String("accept_label"))) {
acceptLabel = options.value(QLatin1String("accept_label")).toString();
if (options.contains(QStringLiteral("accept_label"))) {
acceptLabel = options.value(QStringLiteral("accept_label")).toString();
}
if (options.contains(QLatin1String("modal"))) {
modalDialog = options.value(QLatin1String("modal")).toBool();
if (options.contains(QStringLiteral("modal"))) {
modalDialog = options.value(QStringLiteral("modal")).toBool();
}
if (options.contains(QLatin1String("multiple"))) {
multipleFiles = options.value(QLatin1String("multiple")).toBool();
if (options.contains(QStringLiteral("multiple"))) {
multipleFiles = options.value(QStringLiteral("multiple")).toBool();
}
if (options.contains(QLatin1String("filters"))) {
FilterListList filterListList = qdbus_cast<FilterListList>(options.value(QLatin1String("filters")));
if (options.contains(QStringLiteral("filters"))) {
FilterListList filterListList = qdbus_cast<FilterListList>(options.value(QStringLiteral("filters")));
for (const FilterList &filterList : filterListList) {
QStringList filterStrings;
for (const Filter &filterStruct : filterList.filters) {
......@@ -201,7 +201,7 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
QUrl url = QUrl::fromLocalFile(filename);
files << url.toDisplayString();
}
results.insert(QLatin1String("uris"), files);
results.insert(QStringLiteral("uris"), files);
return 0;
}
......@@ -233,28 +233,28 @@ uint FileChooserPortal::SaveFile(const QDBusObjectPath &handle,
// TODO parse options - choices
if (options.contains(QLatin1String("modal"))) {
modalDialog = options.value(QLatin1String("modal")).toBool();
if (options.contains(QStringLiteral("modal"))) {
modalDialog = options.value(QStringLiteral("modal")).toBool();
}
if (options.contains(QLatin1String("accept_label"))) {
acceptLabel = options.value(QLatin1String("accept_label")).toString();
if (options.contains(QStringLiteral("accept_label"))) {
acceptLabel = options.value(QStringLiteral("accept_label")).toString();
}
if (options.contains(QLatin1String("current_name"))) {
currentName = options.value(QLatin1String("current_name")).toString();
if (options.contains(QStringLiteral("current_name"))) {
currentName = options.value(QStringLiteral("current_name")).toString();
}
if (options.contains(QLatin1String("current_folder"))) {
currentFolder = QString::fromUtf8(options.value(QLatin1String("current_folder")).toByteArray());
if (options.contains(QStringLiteral("current_folder"))) {
currentFolder = QString::fromUtf8(options.value(QStringLiteral("current_folder")).toByteArray());
}
if (options.contains(QLatin1String("current_file"))) {
currentFile = QString::fromUtf8(options.value(QLatin1String("current_file")).toByteArray());
if (options.contains(QStringLiteral("current_file"))) {
currentFile = QString::fromUtf8(options.value(QStringLiteral("current_file")).toByteArray());
}
if (options.contains(QLatin1String("filters"))) {
FilterListList filterListList = qdbus_cast<FilterListList>(options.value(QLatin1String("filters")));
if (options.contains(QStringLiteral("filters"))) {
FilterListList filterListList = qdbus_cast<FilterListList>(options.value(QStringLiteral("filters")));
for (const FilterList &filterList : filterListList) {
QStringList filterStrings;
for (const Filter &filterStruct : filterList.filters) {
......@@ -306,7 +306,7 @@ uint FileChooserPortal::SaveFile(const QDBusObjectPath &handle,
QStringList files;
QUrl url = QUrl::fromLocalFile(fileDialog->m_fileWidget->selectedFile());
files << url.toDisplayString();
results.insert(QLatin1String("uris"), files);
results.insert(QStringLiteral("uris"), files);
return 0;
}
......
......@@ -49,12 +49,12 @@ void InhibitPortal::Inhibit(const QDBusObjectPath &handle, const QString &app_id
qCDebug(XdgDesktopPortalKdeInhibit) << " flags: " << flags;
qCDebug(XdgDesktopPortalKdeInhibit) << " options: " << options;
QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.kde.Solid.PowerManagement"),
QLatin1String("/org/kde/Solid/PowerManagement/PolicyAgent"),
QLatin1String("org.kde.Solid.PowerManagement.PolicyAgent"),
QLatin1String("AddInhibition"));
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.Solid.PowerManagement"),
QStringLiteral("/org/kde/Solid/PowerManagement/PolicyAgent"),
QStringLiteral("org.kde.Solid.PowerManagement.PolicyAgent"),
QStringLiteral("AddInhibition"));
// interrupt session (1)
message << (uint)1 << app_id << options.value(QLatin1String("reason")).toString();
message << (uint)1 << app_id << options.value(QStringLiteral("reason")).toString();
QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall);
......@@ -64,7 +64,7 @@ void InhibitPortal::Inhibit(const QDBusObjectPath &handle, const QString &app_id
qCDebug(XdgDesktopPortalKdeInhibit) << "Inhibition error: " << reply.error().message();
} else {
QDBusConnection sessionBus = QDBusConnection::sessionBus();
Request *request = new Request(this, QLatin1String("org.freedesktop.impl.portal.Inhibit"), QVariant(reply.value()));
Request *request = new Request(this, QStringLiteral("org.freedesktop.impl.portal.Inhibit"), QVariant(reply.value()));
if (sessionBus.registerVirtualObject(handle.path(), request, QDBusConnection::VirtualObjectRegisterOption::SubPath)) {
connect(request, &Request::closeRequested, [request, handle] () {
QDBusConnection::sessionBus().unregisterObject(handle.path());
......
......@@ -65,15 +65,15 @@ void NotificationPortal::AddNotification(const QString &app_id,
qCDebug(XdgDesktopPortalKdeNotification) << " notification: " << notification;
// We have to use "notification" as an ID because any other ID will not be configured
KNotification *notify = new KNotification(QLatin1String("notification"), KNotification::CloseOnTimeout | KNotification::DefaultEvent, this);
if (notification.contains(QLatin1String("title"))) {
notify->setTitle(notification.value(QLatin1String("title")).toString());
KNotification *notify = new KNotification(QStringLiteral("notification"), KNotification::CloseOnTimeout | KNotification::DefaultEvent, this);
if (notification.contains(QStringLiteral("title"))) {
notify->setTitle(notification.value(QStringLiteral("title")).toString());
}
if (notification.contains(QLatin1String("body"))) {
notify->setText(notification.value(QLatin1String("body")).toString());
if (notification.contains(QStringLiteral("body"))) {
notify->setText(notification.value(QStringLiteral("body")).toString());
}
if (notification.contains(QLatin1String("icon"))) {
QVariant iconVariant = notification.value(QLatin1String("icon"));
if (notification.contains(QStringLiteral("icon"))) {
QVariant iconVariant = notification.value(QStringLiteral("icon"));
if (iconVariant.type() == QVariant::String) {
notify->setIconName(iconVariant.toString());
} else {
......@@ -90,25 +90,25 @@ void NotificationPortal::AddNotification(const QString &app_id,
}
}
}
if (notification.contains(QLatin1String("priority"))) {
if (notification.contains(QStringLiteral("priority"))) {
// TODO KNotification has no option for priority
}
if (notification.contains(QLatin1String("default-action"))) {
if (notification.contains(QStringLiteral("default-action"))) {
// TODO KNotification has no option for default action
}
if (notification.contains(QLatin1String("default-action-target"))) {
if (notification.contains(QStringLiteral("default-action-target"))) {
// TODO KNotification has no option for default action
}
if (notification.contains(QLatin1String("buttons"))) {
if (notification.contains(QStringLiteral("buttons"))) {
QList<QVariantMap> buttons;
QDBusArgument dbusArgument = notification.value(QLatin1String("buttons")).value<QDBusArgument>();
QDBusArgument dbusArgument = notification.value(QStringLiteral("buttons")).value<QDBusArgument>();
while (!dbusArgument.atEnd()) {
dbusArgument >> buttons;
}
QStringList actions;
for (const QVariantMap &button : buttons) {
actions << button.value(QLatin1String("label")).toString();
actions << button.value(QStringLiteral("label")).toString();
}
if (!actions.isEmpty()) {
......@@ -141,9 +141,9 @@ void NotificationPortal::notificationActivated(uint action)
qCDebug(XdgDesktopPortalKdeNotification) << " id: " << id;
qCDebug(XdgDesktopPortalKdeNotification) << " action: " << action;
QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/org/freedesktop/portal/desktop"),
QLatin1String("org.freedesktop.impl.portal.Notification"),
QLatin1String("ActionInvoked"));
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/org/freedesktop/portal/desktop"),
QStringLiteral("org.freedesktop.impl.portal.Notification"),
QStringLiteral("ActionInvoked"));
message << appId << id << QString::number(action) << QVariantList();
QDBusConnection::sessionBus().send(message);
}
......
This diff is collapsed.
......@@ -86,8 +86,8 @@ uint RemoteDesktopPortal::SelectDevices(const QDBusObjectPath &handle,
return 2;
}
if (options.contains(QLatin1String("types"))) {
types = (DeviceTypes)(options.value(QLatin1String("types")).toUInt());
if (options.contains(QStringLiteral("types"))) {
types = (DeviceTypes)(options.value(QStringLiteral("types")).toUInt());
}
session->setDeviceTypes(types);
......@@ -139,10 +139,10 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
return 2;
}
results.insert(QLatin1String("streams"), streams);
results.insert(QStringLiteral("streams"), streams);
}
results.insert(QLatin1String("types"), QVariant::fromValue<uint>(remoteDesktopDialog->deviceTypes()));
results.insert(QStringLiteral("types"), QVariant::fromValue<uint>(remoteDesktopDialog->deviceTypes()));
return 0;
}
......
......@@ -58,11 +58,11 @@ RemoteDesktopDialog::RemoteDesktopDialog(const QString &appName, RemoteDesktopPo
const QStringList desktopFileLocations = QStandardPaths::locateAll(QStandardPaths::ApplicationsLocation, desktopFile, QStandardPaths::LocateFile);
for (const QString &location : desktopFileLocations) {
QSettings settings(location, QSettings::IniFormat);
settings.beginGroup(QLatin1String("Desktop Entry"));
if (settings.contains(QLatin1String("X-GNOME-FullName"))) {
applicationName = settings.value(QLatin1String("X-GNOME-FullName")).toString();
settings.beginGroup(QStringLiteral("Desktop Entry"));
if (settings.contains(QStringLiteral("X-GNOME-FullName"))) {
applicationName = settings.value(QStringLiteral("X-GNOME-FullName")).toString();
} else {
applicationName = settings.value(QLatin1String("Name")).toString();
applicationName = settings.value(QStringLiteral("Name")).toString();
}
if (!applicationName.isEmpty()) {
......
......@@ -58,10 +58,10 @@ bool Request::handleMessage(const QDBusMessage &message, const QDBusConnection &
if (message.interface() == QLatin1String("org.freedesktop.impl.portal.Request")) {
if (message.member() == QLatin1String("Close")) {
if (m_portalName == QLatin1String("org.freedesktop.impl.portal.Inhibit")) {
QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.kde.Solid.PowerManagement"),
QLatin1String("/org/kde/Solid/PowerManagement/PolicyAgent"),
QLatin1String("org.kde.Solid.PowerManagement.PolicyAgent"),
QLatin1String("ReleaseInhibition"));
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.Solid.PowerManagement"),
QStringLiteral("/org/kde/Solid/PowerManagement/PolicyAgent"),
QStringLiteral("org.kde.Solid.PowerManagement.PolicyAgent"),
QStringLiteral("ReleaseInhibition"));
message << m_data.toUInt();
......
......@@ -87,12 +87,12 @@ uint ScreenCastPortal::SelectSources(const QDBusObjectPath &handle,
return 2;
}
if (options.contains(QLatin1String("multiple"))) {
session->setMultipleSources(options.value(QLatin1String("multiple")).toBool());
if (options.contains(QStringLiteral("multiple"))) {
session->setMultipleSources(options.value(QStringLiteral("multiple")).toBool());
}
if (options.contains(QLatin1String("types"))) {
types = (SourceType)(options.value(QLatin1String("types")).toUInt());
if (options.contains(QStringLiteral("types"))) {
types = (SourceType)(options.value(QStringLiteral("types")).toUInt());
}
if (types == Window) {
......@@ -161,7 +161,7 @@ uint ScreenCastPortal::Start(const QDBusObjectPath &handle,
return 2;
}
results.insert(QLatin1String("streams"), streams);
results.insert(QStringLiteral("streams"), streams);
return 0;
}
......
......@@ -47,11 +47,11 @@ ScreenChooserDialog::ScreenChooserDialog(const QString &appName, bool multiple,
const QStringList desktopFileLocations = QStandardPaths::locateAll(QStandardPaths::ApplicationsLocation, desktopFile, QStandardPaths::LocateFile);
for (const QString &location : desktopFileLocations) {
QSettings settings(location, QSettings::IniFormat);
settings.beginGroup(QLatin1String("Desktop Entry"));
if (settings.contains(QLatin1String("X-GNOME-FullName"))) {
applicationName = settings.value(QLatin1String("X-GNOME-FullName")).toString();
settings.beginGroup(QStringLiteral("Desktop Entry"));
if (settings.contains(QStringLiteral("X-GNOME-FullName"))) {
applicationName = settings.value(QStringLiteral("X-GNOME-FullName")).toString();
} else {
applicationName = settings.value(QLatin1String("Name")).toString();
applicationName = settings.value(QStringLiteral("Name")).toString();
}
if (!applicationName.isEmpty()) {
......
......@@ -102,10 +102,10 @@ uint ScreenshotPortal::Screenshot(const QDBusObjectPath &handle,
QPointer<ScreenshotDialog> screenshotDialog = new ScreenshotDialog;
Utils::setParentWindow(screenshotDialog, parent_window);
const bool modal = options.value(QLatin1String("modal"), false).toBool();
const bool modal = options.value(QStringLiteral("modal"), false).toBool();
screenshotDialog->setModal(modal);
const bool interactive = options.value(QLatin1String("interactive"), false).toBool();
const bool interactive = options.value(QStringLiteral("interactive"), false).toBool();
if (!interactive) {
screenshotDialog->takeScreenshot();
}
......@@ -121,14 +121,14 @@ uint ScreenshotPortal::Screenshot(const QDBusObjectPath &handle,
}
const QString filename = QStringLiteral("%1/Screenshot_%2.png").arg(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation))
.arg(QDateTime::currentDateTime().toString(QLatin1String("yyyyMMdd_hhmmss")));
.arg(QDateTime::currentDateTime().toString(QStringLiteral("yyyyMMdd_hhmmss")));
if (!screenshot.save(filename, "PNG")) {
return 1;
}
const QString resultFileName = QStringLiteral("file://") + filename;
results.insert(QLatin1String("uri"), resultFileName);
results.insert(QStringLiteral("uri"), resultFileName);
return 0;
}
......@@ -157,7 +157,7 @@ uint ScreenshotPortal::PickColor(const QDBusObjectPath &handle,
color.green = selectedColor.greenF();
color.blue = selectedColor.blueF();
results.insert(QLatin1String("color"), QVariant::fromValue<ScreenshotPortal::ColorRGB>(color));
results.insert(QStringLiteral("color"), QVariant::fromValue<ScreenshotPortal::ColorRGB>(color));
return 0;
}
......
......@@ -107,11 +107,11 @@ void ScreenshotDialog::takeScreenshot()
return;
}
QDBusInterface interface(QLatin1String("org.kde.KWin"), QLatin1String("/Screenshot"), QLatin1String("org.kde.kwin.Screenshot"));
QDBusInterface interface(QStringLiteral("org.kde.KWin"), QStringLiteral("/Screenshot"), QStringLiteral("org.kde.kwin.Screenshot"));
if (m_dialog->areaComboBox->currentIndex() < 2) {
interface.asyncCall(m_dialog->areaComboBox->currentIndex() ? QLatin1String("screenshotScreen") : QLatin1String("screenshotFullscreen"), QVariant::fromValue(QDBusUnixFileDescriptor(pipeFds[1])), m_dialog->includeCursorCheckbox->isChecked());
interface.asyncCall(m_dialog->areaComboBox->currentIndex() ? QStringLiteral("screenshotScreen") : QStringLiteral("screenshotFullscreen"), QVariant::fromValue(QDBusUnixFileDescriptor(pipeFds[1])), m_dialog->includeCursorCheckbox->isChecked());
} else {
interface.asyncCall(QLatin1String("interactive"), QVariant::fromValue(QDBusUnixFileDescriptor(pipeFds[1])), mask());
interface.asyncCall(QStringLiteral("interactive"), QVariant::fromValue(QDBusUnixFileDescriptor(pipeFds[1])), mask());
}
QFutureWatcher<QImage> *watcher = new QFutureWatcher<QImage>(this);
......
......@@ -111,7 +111,7 @@ QString Session::introspect(const QString &path) const
bool Session::close()
{
QDBusMessage reply = QDBusMessage::createSignal(m_path, QLatin1String("org.freedesktop.impl.portal.Session"), QLatin1String("Closed"));
QDBusMessage reply = QDBusMessage::createSignal(m_path, QStringLiteral("org.freedesktop.impl.portal.Session"), QStringLiteral("Closed"));
return QDBusConnection::sessionBus().send(reply);
}
......
......@@ -33,9 +33,9 @@ int main(int argc, char *argv[])
QDBusConnection sessionBus = QDBusConnection::sessionBus();
if (sessionBus.registerService(QLatin1String("org.freedesktop.impl.portal.desktop.kde"))) {
if (sessionBus.registerService(QStringLiteral("org.freedesktop.impl.portal.desktop.kde"))) {
DesktopPortal *desktopPortal = new DesktopPortal(&a);
if (sessionBus.registerObject(QLatin1String("/org/freedesktop/portal/desktop"), desktopPortal, QDBusConnection::ExportAdaptors)) {
if (sessionBus.registerObject(QStringLiteral("/org/freedesktop/portal/desktop"), desktopPortal, QDBusConnection::ExportAdaptors)) {
qCDebug(XdgDesktopPortalKde) << "Desktop portal registered successfully";
} else {
qCDebug(XdgDesktopPortalKde) << "Failed to register desktop portal";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment