Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
425
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
bece856e
Commit
bece856e
authored
8 months ago
by
Fatih Uzunoğlu
Committed by
Steve Lhomme
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
contrib: qtdeclarative: fix for QQuickAsyncImageProvider causes crash without Qt Network
parent
d07639aa
No related branches found
No related tags found
1 merge request
!5627
contrib: qtdeclarative: fix for QQuickAsyncImageProvider causes crash without Qt Network
Pipeline
#486121
passed with stages
in 23 minutes and 23 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/src/qtdeclarative/0001-Take-care-of-asyncResponses-when-qml_network-is-disa.patch
+89
-0
89 additions, 0 deletions
...ake-care-of-asyncResponses-when-qml_network-is-disa.patch
contrib/src/qtdeclarative/rules.mak
+1
-0
1 addition, 0 deletions
contrib/src/qtdeclarative/rules.mak
with
90 additions
and
0 deletions
contrib/src/qtdeclarative/0001-Take-care-of-asyncResponses-when-qml_network-is-disa.patch
0 → 100644
+
89
−
0
View file @
bece856e
From c3390f17d4c86a6c817f37a273c2d44d5f57ded9 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Mon, 24 Jun 2024 17:19:20 +0300
Subject: [PATCH] Take care of `asyncResponses` when `qml_network` is disabled
in qquickpixmapcache.cpp
---
src/quick/util/qquickpixmapcache.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 8de79f2009..5efd2ef3e2 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -606,20 +606,18 @@
QQuickPixmapReader::~QQuickPixmapReader()
delete reply;
}
jobs.clear();
-#if QT_CONFIG(qml_network)
const auto cancelJob = [this](QQuickPixmapReply *reply) {
if (reply->loading) {
cancelledJobs.append(reply);
reply->data = nullptr;
}
};
-
+#if QT_CONFIG(qml_network)
for (auto *reply : std::as_const(networkJobs))
cancelJob(reply);
-
+#endif
for (auto *reply : std::as_const(asyncResponses))
cancelJob(reply);
-#endif
#if !QT_CONFIG(quick_pixmap_cache_threaded_download)
// In this case we won't be waiting, but we are on the correct thread already, so we can
// perform housekeeping synchronously now.
@@ -640,7 +638,6 @@
QQuickPixmapReader::~QQuickPixmapReader()
wait();
#endif
-#if QT_CONFIG(qml_network)
// While we've been waiting, the other thread may have added
// more replies. No one will care about them anymore.
@@ -649,16 +646,17 @@
QQuickPixmapReader::~QQuickPixmapReader()
reply->data->reply = nullptr;
delete reply;
};
-
+#if QT_CONFIG(qml_network)
for (QQuickPixmapReply *reply : std::as_const(networkJobs))
deleteReply(reply);
-
+#endif
for (QQuickPixmapReply *reply : std::as_const(asyncResponses))
deleteReply(reply);
+#if QT_CONFIG(qml_network)
networkJobs.clear();
- asyncResponses.clear();
#endif
+ asyncResponses.clear();
}
#if QT_CONFIG(qml_network)
@@ -803,7 +801,10 @@
void QQuickPixmapReader::processJobs()
// cancel any jobs already started
reply->close();
}
- } else {
+ }
+ else
+#endif
+ {
QQuickImageResponse *asyncResponse = asyncResponses.key(job);
if (asyncResponse) {
asyncResponses.remove(asyncResponse);
@@ -811,7 +812,6 @@
void QQuickPixmapReader::processJobs()
}
}
PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(job->url));
-#endif
// deleteLater, since not owned by this thread
job->deleteLater();
}
--
2.45.2
This diff is collapsed.
Click to expand it.
contrib/src/qtdeclarative/rules.mak
+
1
−
0
View file @
bece856e
...
...
@@ -36,6 +36,7 @@ qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum
$(
UNPACK
)
$(
APPLY
)
$(
SRC
)
/qtdeclarative/0001-Fix-incorrect-library-inclusion.patch
$(
APPLY
)
$(
SRC
)
/qtdeclarative/0002-Fix-build-with-no-feature-network.patch
$(
APPLY
)
$(
SRC
)
/qtdeclarative/0001-Take-care-of-asyncResponses-when-qml_network-is-disa.patch
# disable unused CLI tools: qml, qmleasing, qmldom, qmlformat, qmltc
sed
-i
.orig
-e
's,add_subdirectory(qml),#add_subdirectory(qml),'
$(
UNPACK_DIR
)
/tools/CMakeLists.txt
sed
-i
.orig
-e
's,add_subdirectory(qmleasing),#add_subdirectory(qmleasing),'
$(
UNPACK_DIR
)
/tools/CMakeLists.txt
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment