Can perform user sign in.

This commit is contained in:
Pierre HUBERT
2018-11-28 21:33:27 +01:00
parent 9f568d5ef6
commit 99724f845c
20 changed files with 787 additions and 40 deletions

16
utils/accountutils.cpp Normal file
View File

@ -0,0 +1,16 @@
#include <QRegularExpression>
#include "accountutils.h"
AccountUtils::AccountUtils()
{
}
bool AccountUtils::CheckEmailAddress(const QString &email)
{
QRegExp regex("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b");
regex.setCaseSensitivity(Qt::CaseInsensitive);
regex.setPatternSyntax(QRegExp::RegExp);
return regex.exactMatch(email);
}

26
utils/accountutils.h Normal file
View File

@ -0,0 +1,26 @@
/**
* Account utilities
*
* @author Pierre HUBERT
*/
#ifndef ACCOUNTUTILS_H
#define ACCOUNTUTILS_H
#include <QObject>
class AccountUtils
{
public:
AccountUtils();
/**
* Determine whether an email address is valid or not
*
* @param email The email address to check
* @return TRUE if the email is valid / FALSE else
*/
bool static CheckEmailAddress(const QString &email);
};
#endif // ACCOUNTUTILS_H

6
utils/jsonutils.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "jsonutils.h"
JSONUtils::JSONUtils()
{
}

17
utils/jsonutils.h Normal file
View File

@ -0,0 +1,17 @@
/**
* JSON utilities
*
* @author Pierre HUBERT
*/
#ifndef JSONUTILS_H
#define JSONUTILS_H
class JSONUtils
{
public:
JSONUtils();
};
#endif // JSONUTILS_H