Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
dde-dock的一个编码bug?
Experiences and Insight
335
views ·
3
replies ·
To
floor
Go
花心胡萝卜
deepin
2020-10-24 00:04
Author
在对dde-dock魔改的过程中, 发现,
frame/item/components/previewcontainer.cpp 中的 setWindowInfos 函数
if (m_snapshots.isEmpty())
emit requestCancelPreviewWindow();
emit requestHidePopup();
Copy the Code
从代码格式上来说, 两个emit应该是属于 if 语句的
但是if并没有大括号, 所以从代码上来说, 第二个emit无论if条件是不是成立都会被执行.
那么,,,, 这到底是一个编码上的bug呢, 还是本来就应该无论什么时候都执行呢....
这个我没深入研究, 我加上大括号, 和现在的dock表现也没什么区别... 或者说有 我没看出来...
https://bbs.deepin.org/user/48640
让开发研究一下?
Reply
Like 0
Favorite
View the author
All Replies
juteman
deepin
2020-10-24 01:40
#1
https://bbs.deepin.org/user/232539
Reply
Like 0
View the author
花心胡萝卜
deepin
2020-10-24 01:44
#2
https://bbs.deepin.org/post/204272
@xmulitech
看来我得记住你俩, 你俩是开发组的!
Reply
Like 0
View the author
owen1759
deepin
2020-10-24 01:58
#3
没看代码,从方法名来看,应该是“取消预览窗口”和“隐藏popup”。从这段逻辑看应该是属于if里面的。
如果确实如此,那么BUG症状将会是“无论snapshot是否是空的,popup都被隐藏不显示”。
那么如果你观察不到区别,可能是本来就没有显示popup
至于这个popup指的是什么东西,我不太清楚,不知道是指预览窗口的显示窗口名的那个tips,还是指预览窗口的那个气泡
Reply
Like 0
View the author
Please
sign
in first
Recommended
Change
Deepin System Updates (2022.6.15)
New Thread
Rankings
7 days
30 days
90 days
1
阿尼樱奈奈
128 posts
2
buyike
119 posts
3
jjcui8595
99 posts
4
晚秋(lateautumn)
67 posts
5
神末shenmo
60 posts
6
geepin废话大王
53 posts
Popular Events
More
frame/item/components/previewcontainer.cpp 中的 setWindowInfos 函数
从代码格式上来说, 两个emit应该是属于 if 语句的
但是if并没有大括号, 所以从代码上来说, 第二个emit无论if条件是不是成立都会被执行.
那么,,,, 这到底是一个编码上的bug呢, 还是本来就应该无论什么时候都执行呢....
这个我没深入研究, 我加上大括号, 和现在的dock表现也没什么区别... 或者说有 我没看出来...
https://bbs.deepin.org/user/48640 让开发研究一下?