clang-format

This commit is contained in:
trilene 2020-11-13 09:06:38 -05:00
parent 8c037f83c5
commit ee543254e8
3 changed files with 5 additions and 5 deletions

View file

@ -435,8 +435,8 @@ send_key_request_for(mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> e,
e.content.session_id); e.content.session_id);
mtx::events::msg::KeyRequest request; mtx::events::msg::KeyRequest request;
request.action = !cancel ? mtx::events::msg::RequestAction::Request request.action = !cancel ? mtx::events::msg::RequestAction::Request
: mtx::events::msg::RequestAction::Cancellation; : mtx::events::msg::RequestAction::Cancellation;
request.algorithm = MEGOLM_ALGO; request.algorithm = MEGOLM_ALGO;
request.room_id = e.room_id; request.room_id = e.room_id;
request.sender_key = e.content.sender_key; request.sender_key = e.content.sender_key;

View file

@ -453,8 +453,8 @@ FilteredTextEdit::completerRect()
auto item_height = completer_->popup()->sizeHintForRow(0); auto item_height = completer_->popup()->sizeHintForRow(0);
auto max_height = item_height * completer_->maxVisibleItems(); auto max_height = item_height * completer_->maxVisibleItems();
auto height = (completer_->completionCount() > completer_->maxVisibleItems()) auto height = (completer_->completionCount() > completer_->maxVisibleItems())
? max_height ? max_height
: completer_->completionCount() * item_height; : completer_->completionCount() * item_height;
rect.setWidth(completer_->popup()->sizeHintForColumn(0)); rect.setWidth(completer_->popup()->sizeHintForColumn(0));
rect.moveBottom(-height); rect.moveBottom(-height);
return rect; return rect;

View file

@ -638,7 +638,7 @@ utils::luminance(const QColor &col)
qreal lumRgb[3]; qreal lumRgb[3];
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
qreal v = colRgb[i] / 255.0; qreal v = colRgb[i] / 255.0;
v <= 0.03928 ? lumRgb[i] = v / 12.92 : lumRgb[i] = qPow((v + 0.055) / 1.055, 2.4); v <= 0.03928 ? lumRgb[i] = v / 12.92 : lumRgb[i] = qPow((v + 0.055) / 1.055, 2.4);
} }