mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-06-29 23:15:54 +00:00
refactor: split formatters and matchers into separated singleton classes (#166)
* split formatter into separated singleton classes * split data engine matchers to classes * nodiscard attribute for formatter methods * small refactoring in matchers * fix codefactor warnings * fix test building
This commit is contained in:
@ -121,7 +121,7 @@ queueLimit=0
|
||||
swapTooltip=true
|
||||
swapTooltipColor=#ffff00
|
||||
tempUnits=Celsius
|
||||
text="<body bgcolor=\"#000000\">\n<p align=\"justify\">Uptime: $cuptime<br>\nRAM: $mem $bar5<br>\nSwap: $swap $bar6<br>\nCPU: $cpu $bar7<br>\nCPU Temp: $temp0°C<br>\nDown: $down$downunits $downtot<br>\n$bar8<br>\nUp: $up$upunits $uptot<br>\n$bar9<br></p>\n</body>\n"
|
||||
text="<body bgcolor=\"#000000\">\n<p align=\"justify\">Uptime: $uptime<br>\nRAM: $mem $bar5<br>\nSwap: $swap $bar6<br>\nCPU: $cpu $bar7<br>\nCPU Temp: $temp0°C<br>\nDown: $down$downunits $downtot<br>\n$bar8<br>\nUp: $up$upunits $uptot<br>\n$bar9<br></p>\n</body>\n"
|
||||
textAlign=center
|
||||
tooltipBackground=#ffffff
|
||||
tooltipNumber=100
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
auto found = std::find_if(m_items.cbegin(), m_items.cend(),
|
||||
[&_tag, &_type](auto item) { return item->tag(_type) == _tag; });
|
||||
|
||||
if (found == std::end(m_items)) {
|
||||
if (found == m_items.cend()) {
|
||||
qCWarning(LOG_LIB) << "Could not find item by tag" << _tag;
|
||||
return nullptr;
|
||||
}
|
||||
@ -99,7 +99,7 @@ public:
|
||||
auto found = std::find_if(m_items.cbegin(), m_items.cend(),
|
||||
[_number](auto item) { return item->number() == _number; });
|
||||
|
||||
if (found == std::end(m_items)) {
|
||||
if (found == m_items.cend()) {
|
||||
qCWarning(LOG_LIB) << "Could not find item by number" << _number;
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user