MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / customEvent

Method customEvent

source/ui/MsgViewUi.cpp:146–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 if (count > max_row)
145 {
146 for (size_t i = 0; i < 3; i++)
147 {
148 size_t type = MsgViewInfo::_msg;
149 if (i == 1) type = MsgViewInfo::_war;
150 else if (i == 2) type = MsgViewInfo::_err;
151 infos.remove_of_find([&count, count_new, type](const MsgViewInfo& info, bool& _break) {
152 if (count > count_new)
153 {
154 if (info.level == type)
155 {
156 count--;
157 return true;
158 }
159 }
160 else _break = true;
161 return false;
162 });
163 if (count <= count_new) break;
164 }
165 }
166 for (const auto& i : infos) append(i, true);
167}
168
169void MsgViewUi::customEvent(QEvent* e)
170{
171 MsgViewEvent* event = reinterpret_cast<MsgViewEvent*>(e);
172 if (e->type() == MsgViewEvent::Type::setText)
173 {

Callers

nothing calls this directly

Calls 4

infoMethod · 0.80
typeMethod · 0.45
appendMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected