Changeset View
Changeset View
Standalone View
Standalone View
src/accountinfo.cpp
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Line(s) | 348 | { | |||
---|---|---|---|---|---|
356 | m_info->email->setCursorPosition(pos); | 356 | m_info->email->setCursorPosition(pos); | ||
357 | 357 | | |||
358 | return email; | 358 | return email; | ||
359 | } | 359 | } | ||
360 | 360 | | |||
361 | bool AccountInfo::validateEmail(const QString& email) const | 361 | bool AccountInfo::validateEmail(const QString& email) const | ||
362 | { | 362 | { | ||
363 | if (email.isEmpty()) { | 363 | if (email.isEmpty()) { | ||
364 | return false; | 364 | return true; | ||
ngraham: This seems like the only part of the patch that's actually about fixing the issue. The rest… | |||||
meven: Yes, will do that separately... | |||||
365 | } | 365 | } | ||
366 | 366 | | |||
367 | QString strPatt = QStringLiteral("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,63}\\b"); | 367 | QString strPatt = QStringLiteral("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,63}\\b"); | ||
368 | QRegExp rx(strPatt); | 368 | QRegExp rx(strPatt); | ||
369 | rx.setCaseSensitivity(Qt::CaseInsensitive); | 369 | rx.setCaseSensitivity(Qt::CaseInsensitive); | ||
370 | rx.setPatternSyntax(QRegExp::RegExp); | 370 | rx.setPatternSyntax(QRegExp::RegExp); | ||
371 | if (!rx.exactMatch(email)) { | 371 | if (!rx.exactMatch(email)) { | ||
372 | m_info->emailValidation->setPixmap(m_negative); | 372 | m_info->emailValidation->setPixmap(m_negative); | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |
This seems like the only part of the patch that's actually about fixing the issue. The rest seems to be unrelated code cleanup that should be probably be done separately.