Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
61359cec76
!15 [sync] PR-14: add setCancel method and modify URL
From: @openeuler-sync-bot 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2022-07-29 05:52:49 +00:00
loong_C
beb453508a add setCancel method and modify URL
(cherry picked from commit 0642075e4790ae1e66f7877df022eb7d24e7f3c7)
2022-07-21 15:10:32 +08:00
openeuler-ci-bot
43e79ac3d9
!13 add yaml file
From: @tanyulong2021 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2022-04-26 06:19:34 +00:00
tanyulong2021
2f1151b4d4 add yaml file 2022-04-21 16:55:04 +08:00
openeuler-ci-bot
c486bd7daf
!7 update to upstream version 0.114.0
Merge pull request !7 from pei-jiankang/master
2022-01-14 01:43:04 +00:00
pei-jiankang
7baea88f2e update to upstream version 0.114.0 2022-01-13 16:33:32 +08:00
openeuler-ci-bot
5953b1a680 !6 remove %{?dist}
Merge pull request !6 from 华亚东/master
2021-12-13 09:42:35 +00:00
huayadong
50f1af9257 remove %{?dist} 2021-12-13 10:53:19 +08:00
openeuler-ci-bot
74e6f6a6e3 !1 initial release
Merge pull request !1 from yangzhao_kl/initial_release
2020-07-23 14:48:31 +08:00
yangzhao_kl
4e023b748a initial release 2020-07-23 11:25:28 +08:00
4 changed files with 148 additions and 0 deletions

View File

@ -0,0 +1,46 @@
From a029a2c04e6bb51c1e9591ddcc44ce736ac969b0 Mon Sep 17 00:00:00 2001
From: loong_C <loong_c@yeah.net>
Date: Thu, 21 Jul 2022 10:31:44 +0800
Subject: [PATCH] add setCancel method
---
agent/polkitqt1-agent-session.cpp | 6 ++++++
agent/polkitqt1-agent-session.h | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/agent/polkitqt1-agent-session.cpp b/agent/polkitqt1-agent-session.cpp
index e70ace0..6092fa4 100644
--- a/agent/polkitqt1-agent-session.cpp
+++ b/agent/polkitqt1-agent-session.cpp
@@ -150,6 +150,12 @@ void AsyncResult::setCompleted()
d->result = nullptr;
}
+void AsyncResult::setCancel(const QString &text)
+{
+ Q_ASSERT(d->result);
+ g_simple_async_result_set_error(d->result, POLKIT_ERROR, POLKIT_ERROR_CANCELLED, "%s", text.toUtf8().data());
+}
+
void AsyncResult::setError(const QString &text)
{
Q_ASSERT(d->result);
diff --git a/agent/polkitqt1-agent-session.h b/agent/polkitqt1-agent-session.h
index 42b30e8..d0ff89c 100644
--- a/agent/polkitqt1-agent-session.h
+++ b/agent/polkitqt1-agent-session.h
@@ -44,6 +44,11 @@ public:
*/
void setCompleted();
+ /**
+ * \brief Mark the action that is tied to this result as cancelled.
+ */
+ void setCancel(const QString &text);
+
/**
* \brief Sets an error for the asynchronous result.
* Method complete() must be called anyway.
--
2.20.1

BIN
polkit-qt-1-0.114.0.tar.xz Normal file

Binary file not shown.

97
polkit-qt-1.spec Normal file
View File

@ -0,0 +1,97 @@
Name: polkit-qt-1
Version: 0.114.0
Release: 2
Summary: Qt bindings for PolicyKit
License: GPLv2+
URL: https://invent.kde.org/libraries/polkit-qt-1
Source0: http://download.kde.org/stable/%{name}/polkit-qt-1-%{version}.tar.xz
Patch0: 0001-add-setCancel-method.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(polkit-agent-1) pkgconfig(polkit-gobject-1)
BuildRequires: pkgconfig(Qt5DBus) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets)
%description
Polkit-qt is a library that lets developers use the PolicyKit API
through a nice Qt-styled API.
%package doc
Summary: Doxygen documentation for the PolkitQt API
Obsoletes: polkit-qt-doc < %{version}-%{release}
Provides: polkit-qt-doc = %{version}-%{release}
BuildArch: noarch
%description doc
%{summary}.
%package -n polkit-qt5-1
Summary: PolicyKit Qt5 bindings
Obsoletes: polkit-qt5 < 0.112.0-3
Provides: polkit-qt5 = %{version}-%{release}
%description -n polkit-qt5-1
Polkit-qt is a library that lets developers use the PolicyKit API
through a nice Qt-styled API.
%package -n polkit-qt5-1-devel
Summary: Development files for PolicyKit Qt5 bindings
Obsoletes: polkit-qt5-devel < 0.112.0-3
Provides: polkit-qt5-devel = %{version}-%{release}
Requires: polkit-qt5-1%{?_isa} = %{version}-%{release}
%description -n polkit-qt5-1-devel
%{summary}.
%prep
%autosetup -n %{name}-%{version} -p1
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake} .. \
-DBUILD_EXAMPLES:BOOL=OFF
popd
%make_build -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%ldconfig_scriptlets -n polkit-qt5-1
%files -n polkit-qt5-1
%doc AUTHORS README
%license LICENSES/*
%{_libdir}/libpolkit-qt5-core-1.so.1*
%{_libdir}/libpolkit-qt5-gui-1.so.1*
%{_libdir}/libpolkit-qt5-agent-1.so.1*
%files -n polkit-qt5-1-devel
%{_includedir}/polkit-qt5-1/
%{_libdir}/libpolkit-qt5-core-1.so
%{_libdir}/libpolkit-qt5-gui-1.so
%{_libdir}/libpolkit-qt5-agent-1.so
%{_libdir}/pkgconfig/polkit-qt5-1.pc
%{_libdir}/pkgconfig/polkit-qt5-core-1.pc
%{_libdir}/pkgconfig/polkit-qt5-gui-1.pc
%{_libdir}/pkgconfig/polkit-qt5-agent-1.pc
%{_libdir}/cmake/PolkitQt5-1/
%changelog
* Thu Jul 21 2022 loong_C <loong_c@yeah.net> - 0.114.0-2
- add setCancel method and modify URL
* Thu Jan 13 2022 pei-jiankang <peijiankang@kylinos.cn> - 0.114.0-1
- update to upstream version 0.114.0
* Mon Dec 13 2021 huayadong <huayadong@kylinos.cn> - 0.113.0-2
- remove %{?dist}
* Thu Jul 23 2020 Zhao Yang <yangzhao1@kylinos.cn> - 0.113.0-1
- Initial release for OpenEuler

5
polkit-qt-1.yaml Normal file
View File

@ -0,0 +1,5 @@
version_control: github
src_repo: KDE/polkit-qt-1
tag_prefix: "^v"
separator: "."