dde-dock/plugins/tray/fashiontray/containers/attentioncontainer.cpp
范朋程 4b0166f59b chore: 清除编译警告
清除编译警告和cppcheck检查出的警告信息

Log:
Influence: 无
Task: https://pms.uniontech.com/zentao/task-view-96546.html
Change-Id: I8b32b02c9d3a284029a39826516ab7b41132f236
2022-01-05 09:21:48 +08:00

41 lines
843 B
C++

#include "attentioncontainer.h"
AttentionContainer::AttentionContainer(TrayPlugin *trayPlugin, QWidget *parent)
: AbstractContainer(trayPlugin, parent)
{
}
FashionTrayWidgetWrapper *AttentionContainer::takeAttentionWrapper()
{
if (isEmpty()) {
return nullptr;
}
return takeWrapper(wrapperList().first());
}
bool AttentionContainer::acceptWrapper(FashionTrayWidgetWrapper *wrapper)
{
Q_UNUSED(wrapper);
return true;
}
void AttentionContainer::refreshVisible()
{
// AbstractContainer::refreshVisible();
setContentsMargins(0, 0, 0 ,0);
setVisible(!isEmpty());
}
void AttentionContainer::addWrapper(FashionTrayWidgetWrapper *wrapper)
{
if (!isEmpty()) {
qDebug() << "Reject! Already contains a attention wrapper!";
return;
}
AbstractContainer::addWrapper(wrapper);
}