kcm_flatpak/0003-Port-from-NULL-to-nullptr.patch
Christophe Marin 71a78e011c Accepting request 1068360 from home:Vogtinator:plasma5.27
- Apply important fixes from the 5.27 branch:
  * 0001-Expose-FlatpakReferencesModel-to-QML.patch
  * 0002-Avoid-duplicating-connections-between-ref-and-its-re.patch
  * 0003-Port-from-NULL-to-nullptr.patch
  * 0004-Fix-GLib-memory-management-issue.patch

OBS-URL: https://build.opensuse.org/request/show/1068360
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcm_flatpak?expand=0&rev=9
2023-03-01 10:36:31 +00:00

42 lines
2.5 KiB
Diff

From b4ea85ce701b3cac3f9e997d9cb391a34ff4d4bc Mon Sep 17 00:00:00 2001
From: ivan tkachenko <me@ratijas.tk>
Date: Mon, 13 Feb 2023 23:38:13 +0300
Subject: [PATCH 3/4] Port from NULL to nullptr
(cherry picked from commit 6363d6fca26b357ac4c988fcfb0eda5069093926)
---
flatpakreference.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/flatpakreference.cpp b/flatpakreference.cpp
index d95f496..884a12f 100644
--- a/flatpakreference.cpp
+++ b/flatpakreference.cpp
@@ -131,10 +131,10 @@ bool FlatpakReference::isDefaults() const
FlatpakReferencesModel::FlatpakReferencesModel(QObject *parent)
: QAbstractListModel(parent)
{
- g_autoptr(FlatpakInstallation) installation = flatpak_installation_new_system(NULL, NULL);
- g_autoptr(GPtrArray) installedApps = flatpak_installation_list_installed_refs_by_kind(installation, FLATPAK_REF_KIND_APP, NULL, NULL);
- g_autoptr(FlatpakInstallation) userInstallation = flatpak_installation_new_user(NULL, NULL);
- g_autoptr(GPtrArray) installedUserApps = flatpak_installation_list_installed_refs_by_kind(userInstallation, FLATPAK_REF_KIND_APP, NULL, NULL);
+ g_autoptr(FlatpakInstallation) installation = flatpak_installation_new_system(nullptr, nullptr);
+ g_autoptr(GPtrArray) installedApps = flatpak_installation_list_installed_refs_by_kind(installation, FLATPAK_REF_KIND_APP, nullptr, nullptr);
+ g_autoptr(FlatpakInstallation) userInstallation = flatpak_installation_new_user(nullptr, nullptr);
+ g_autoptr(GPtrArray) installedUserApps = flatpak_installation_list_installed_refs_by_kind(userInstallation, FLATPAK_REF_KIND_APP, nullptr, nullptr);
g_ptr_array_extend_and_steal(installedApps, installedUserApps);
QString path = FlatpakHelper::permDataFilePath();
@@ -147,7 +147,7 @@ FlatpakReferencesModel::FlatpakReferencesModel(QObject *parent)
}
QString appBasePath = QString::fromUtf8(flatpak_installed_ref_get_deploy_dir(FLATPAK_INSTALLED_REF(g_ptr_array_index(installedApps, i))));
QString icon = FlatpakHelper::iconPath(name, id, appBasePath);
- g_autoptr(GBytes) data = flatpak_installed_ref_load_metadata(FLATPAK_INSTALLED_REF(g_ptr_array_index(installedApps, i)), NULL, NULL);
+ g_autoptr(GBytes) data = flatpak_installed_ref_load_metadata(FLATPAK_INSTALLED_REF(g_ptr_array_index(installedApps, i)), nullptr, nullptr);
gsize len = 0;
auto buff = g_bytes_get_data(data, &len);
const QByteArray metadata((const char *)buff, len);
--
2.39.2