1 Star 0 Fork 19

Yukizhu001/qt5-qtbase

forked from src-anolis-os/qt5-qtbase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Avoid_adding_null-objects_to_the_icon_cache.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-10-13 02:47 . !8 feature: add patchs for DDE
Author: Fan Ruijie <fanruijie@uniontech.com>
Date: Fri May 7 20:08:57 2021 +0800
Subject: Avoid adding null-objects to the icon cache
Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/343396/10/src/gui/image/qicon.cpp#1328
---
Index: qtbase-opensource-src/src/gui/image/qicon.cpp
===================================================================
--- qtbase-opensource-src.orig/src/gui/image/qicon.cpp
+++ qtbase-opensource-src/src/gui/image/qicon.cpp
@@ -1266,9 +1266,9 @@ QIcon QIcon::fromTheme(const QString &na
bool hasUserTheme = QIconLoader::instance()->hasUserTheme();
QIconEngine * const engine = (platformTheme && !hasUserTheme) ? platformTheme->createIconEngine(name)
: new QIconLoaderEngine(name);
- QIcon *cachedIcon = new QIcon(engine);
- icon = *cachedIcon;
- qtIconCache()->insert(name, cachedIcon);
+ icon = QIcon(engine);
+ if (!icon.isNull())
+ qtIconCache()->insert(name, new QIcon(icon));
}
return icon;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhuzhustu/qt5-qtbase.git
git@gitee.com:zhuzhustu/qt5-qtbase.git
zhuzhustu
qt5-qtbase
qt5-qtbase
a8

搜索帮助