-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add appruntimeitem plugin #756
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wjyrich The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bcc77b7
to
746e365
Compare
@wjyrich: The
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
9178c2d
to
77a36df
Compare
82a8515
to
b6e0ef0
Compare
deepin pr auto reviewdiff --git a/panels/dock/appruntimeitem/x11utils.cpp b/panels/dock/appruntimeitem/x11utils.cpp |
95da17c
to
8b3b75d
Compare
panels/dock/appruntimeitem/translations/org.deepin.ds.dock.appruntimeitem.ts
Outdated
Show resolved
Hide resolved
Add a plugin to count application running time and manage application running. Log: Add a plugin to count application running time and manage application running.
target_link_libraries(dock-appruntimeitem PRIVATE | ||
dde-shell-frame | ||
${XCB_LIBRARIES} | ||
) | ||
target_link_libraries(dock-appruntimeitem PRIVATE | ||
dde-shell-frame | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里有重复的link
void AppRuntimeItem::setVisible(bool visible) | ||
{ | ||
if (m_Visible != visible) { | ||
m_Visible = visible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一般成员变量下划线后面的第一个字母都是小写。
|
||
Timer { | ||
id: timer | ||
interval: 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个timer太频繁了,没必要这么频繁地更新数据。
connect(this, &XcbGetInfo::windowEnterChanged, this, &XcbGetInfo::handleEnterEvent); | ||
connect(this, &XcbGetInfo::windowLeaveChanged, this, &XcbGetInfo::handleLeaveEvent); | ||
connect(this, &XcbGetInfo::windowPropertyChanged, this, &XcbGetInfo::handlePropertyNotifyEvent); | ||
connect(this, &XcbGetInfo::windowPropertyChanged, this, &XcbGetInfo::handlePropertyNotifyEvent); | ||
|
||
connect(this, &XcbGetInfo::eventFilterWindowCreated, this, &XcbGetInfo::handleCreateNotifyEvent); | ||
connect(this, &XcbGetInfo::eventFilterWindowDestroyed, this, &XcbGetInfo::handleDestroyNotifyEvent); | ||
connect(this, &XcbGetInfo::windowEnterChangedActive, this, [this](xcb_window_t window, const QString name) { | ||
Q_EMIT windowLeaveChangedInactiveName(window, name); | ||
}); | ||
connect(this, &XcbGetInfo::windowEnterChangedActive, this, [this](xcb_window_t window, const QString name) { | ||
Q_EMIT windowEnterChangedActiveName(window, name); | ||
}); | ||
|
||
connect(this, &XcbGetInfo::windowCreatedForeground, this, [this](xcb_window_t window, const QString name) { | ||
Q_EMIT windowInfoChangedForeground(name, window); | ||
}); | ||
connect(this, &XcbGetInfo::windowCreated, this, [this](xcb_window_t window, const QString name) { | ||
Q_EMIT windowInfoChanged(name, window); | ||
}); | ||
connect(this, &XcbGetInfo::windowDestroyed, this, [this](xcb_window_t window) { | ||
Q_EMIT windowDestroyChanged(window); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没必要自己连自己的信号去处理事情,应该自己处理完事情之后发出必要暴露给别人的信号。
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
if (BUILD_WITH_X11) | ||
find_package(XCB REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用IMPORTED_TARGET
include_directories(${CMAKE_SOURCE_DIR}/panels/dock) | ||
include_directories(${CMAKE_SOURCE_DIR}/panels/dock/taskmanager) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要使用include_directories,使用target_include_directories
Add a plugin to count application running time and manage application running.
Log: Add a plugin to count application running time and manage application running.