내가 여기에 하나 개의 필드를 검증되어 현재 코드의 두 필드는 텍스트 입력이 확인 거라고 궁금 해요 그래서 나는 C++ 장면에 새로운 종류의이야확인이 경우 consts 비어 있습니다
void App::requestLogin(const QString &email, const QString &password) {
if (m_active)
return;
//how can I do both password and email here????
const QStringList list = email.split(QRegExp("\\s+"), QString::SkipEmptyParts);
if (list.isEmpty()) {
m_errorMessage = "please complete both fields";
m_error = true;
emit statusChanged();
return;
}
}
이 라인을 따라
정확히 무엇을 달성하고 싶습니까? "둘 다 비어있는 경우"또는 "둘 중 하나가 비어있는 경우"? –
둘 다 비어 있으면 – Curtis