fix: get rid of some more warnings (#5672)
This commit is contained in:
@@ -2204,8 +2204,8 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
this->isDoubleClick_ = false;
|
||||
// Was actually not a wanted triple-click
|
||||
if (fabsf(distanceBetweenPoints(this->lastDoubleClickPosition_,
|
||||
event->screenPos())) > 10.F)
|
||||
if (std::abs(distanceBetweenPoints(this->lastDoubleClickPosition_,
|
||||
event->screenPos())) > 10.F)
|
||||
{
|
||||
this->clickTimer_.stop();
|
||||
return;
|
||||
@@ -2215,16 +2215,16 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
this->isLeftMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastLeftPressPosition_,
|
||||
event->screenPos())) > 15.F)
|
||||
if (std::abs(distanceBetweenPoints(this->lastLeftPressPosition_,
|
||||
event->screenPos())) > 15.F)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Triple-clicking a message selects the whole message
|
||||
if (foundElement && this->clickTimer_.isActive() &&
|
||||
(fabsf(distanceBetweenPoints(this->lastDoubleClickPosition_,
|
||||
event->screenPos())) < 10.F))
|
||||
(std::abs(distanceBetweenPoints(this->lastDoubleClickPosition_,
|
||||
event->screenPos())) < 10.F))
|
||||
{
|
||||
this->selectWholeMessage(layout.get(), messageIndex);
|
||||
return;
|
||||
@@ -2241,8 +2241,8 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
this->isRightMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastRightPressPosition_,
|
||||
event->screenPos())) > 15.F)
|
||||
if (std::abs(distanceBetweenPoints(this->lastRightPressPosition_,
|
||||
event->screenPos())) > 15.F)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,10 +241,8 @@ LimitedQueueSnapshot<MessagePtr> SearchPopup::buildSnapshot()
|
||||
const LimitedQueueSnapshot<MessagePtr> &snapshot =
|
||||
sharedView.channel()->getMessageSnapshot();
|
||||
|
||||
// TODO: implement iterator on LimitedQueueSnapshot?
|
||||
for (auto i = 0; i < snapshot.size(); ++i)
|
||||
for (const auto &message : snapshot)
|
||||
{
|
||||
const MessagePtr &message = snapshot[i];
|
||||
if (filterSet && !filterSet->filter(message, sharedView.channel()))
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user