summaryrefslogtreecommitdiffstats
path: root/src/LoginPage.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-11-25 00:21:45 +0100
committerGitHub <noreply@github.com>2020-11-25 00:21:45 +0100
commitd13a1c64942ffbf87719dff62080b4fdfb5a47b2 (patch)
tree2378e0d379fc8fa98f6851c3259c0b3bbc3d4b1a /src/LoginPage.cpp
parentebe0cd79d7393dea1886aca8207ff5bb633f464a (diff)
Apply suggestions from code review
Diffstat (limited to 'src/LoginPage.cpp')
-rw-r--r--src/LoginPage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp
index 6d040c53..ac625db1 100644
--- a/src/LoginPage.cpp
+++ b/src/LoginPage.cpp
@@ -193,7 +193,7 @@ LoginPage::loginError(const QString &msg)
auto rect = QFontMetrics(font()).boundingRect(msg);
int width = rect.width();
int height = rect.height();
- error_label_->setFixedHeight(qCeil(width / 200 * height));
+ error_label_->setFixedHeight(qCeil(width / 200) * height);
error_label_->setText(msg);
}
@@ -211,7 +211,7 @@ LoginPage::isMatrixIdValid()
QRegularExpressionValidator v(QRegularExpression("@.+?:.{3,}"), this);
QString s = matrixid_input_->text();
int pos = 0;
- return v.validate(s, pos);
+ return v.validate(s, pos) == QValidator::Acceptable;
}
void