[kf5xmlgui] fix loading resources when building statically (#20346)

* [kf5xmlgui] fix loading resources when built statically

* [kf5xmlgui] update versions
This commit is contained in:
Dawid Wróbel 2021-09-28 06:51:35 +03:00 committed by GitHub
parent 39b1392eed
commit 56f6ec6c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff --git a/src/kxmlguiclient.cpp b/src/kxmlguiclient.cpp
index a830ad0fa6b962654a0d1ebb161761a3afafb479..b2c9d0d21dce5f5d9ae4941ae4a909dfa9531155 100644
--- a/src/kxmlguiclient.cpp
+++ b/src/kxmlguiclient.cpp
@@ -70,6 +70,8 @@ KXMLGUIClient::KXMLGUIClient()
KXMLGUIClient::KXMLGUIClient(KXMLGUIClient *parent)
: d(new KXMLGUIClientPrivate)
{
+ Q_INIT_RESOURCE(kxmlgui);
+
parent->insertChildClient(this);
}
diff --git a/src/kxmlguifactory.cpp b/src/kxmlguifactory.cpp
index fc453cb2598dd36f8212cbccb3d4e777ffca4480..5c8dbda2b5700144e9aaf96f877615f874292640 100644
--- a/src/kxmlguifactory.cpp
+++ b/src/kxmlguifactory.cpp
@@ -172,6 +172,8 @@ KXMLGUIFactory::KXMLGUIFactory(KXMLGUIBuilder *builder, QObject *parent)
: QObject(parent)
, d(new KXMLGUIFactoryPrivate)
{
+ Q_INIT_RESOURCE(kxmlgui);
+
d->builder = builder;
d->guiClient = nullptr;
if (d->builder) {

View File

@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
remove_explicit_shared_argument.patch # https://invent.kde.org/frameworks/kxmlgui/-/commit/d12e8f6266188ce7e221dc014a56071b8a5ef706
add_support_for_static_builds.patch # https://invent.kde.org/frameworks/kxmlgui/-/commit/2f1b948ad690942d4ec208c5676c11218f29181a
fix_static_resources.diff # https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/77
)
vcpkg_check_features(

View File

@ -1,6 +1,7 @@
{
"name": "kf5xmlgui",
"version": "5.84.0",
"port-version": 1,
"description": "Framework for managing menu and toolbar actions",
"homepage": "https://api.kde.org/frameworks/kxmlgui/html/index.html",
"dependencies": [

View File

@ -3086,7 +3086,7 @@
},
"kf5xmlgui": {
"baseline": "5.84.0",
"port-version": 0
"port-version": 1
},
"kfr": {
"baseline": "4.2.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4fa462d8e9f3592a9ded89bb25ea21de65932112",
"version": "5.84.0",
"port-version": 1
},
{
"git-tree": "5cecdc03d8c8a9d399ef6aae83e26a9cd32d2f28",
"version": "5.84.0",