mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 14:15:35 +08:00
refs #288, improved validation in some value objects
This commit is contained in:
committed by
Roland Winklmeier
parent
5ff28cb3a1
commit
d1d02d6c3c
@@ -15,6 +15,7 @@
|
||||
#include "avcallsign.h"
|
||||
#include "avairporticao.h"
|
||||
#include "propertyindex.h"
|
||||
#include "statusmessagelist.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -60,7 +61,7 @@ namespace BlackMisc
|
||||
QString getRealName() const { return m_realname; }
|
||||
|
||||
//! setRealName
|
||||
void setRealName(const QString &realname) { m_realname = realname.trimmed(); }
|
||||
void setRealName(const QString &realname) { m_realname = realname.trimmed().simplified(); }
|
||||
|
||||
//! Get password
|
||||
QString getPassword() const { return m_password; }
|
||||
@@ -83,6 +84,9 @@ namespace BlackMisc
|
||||
//! Has associated callsign?
|
||||
bool hasValidCallsign() const { return !m_callsign.isEmpty(); }
|
||||
|
||||
//! Validate, provide details about issues
|
||||
BlackMisc::CStatusMessageList validate() const;
|
||||
|
||||
//! Get email.
|
||||
QString getEmail() const { return m_email; }
|
||||
|
||||
@@ -125,6 +129,9 @@ namespace BlackMisc
|
||||
*/
|
||||
void syncronizeData(CUser &otherUser);
|
||||
|
||||
//! Valid VATSIM id
|
||||
static bool isValidVatsimId(const QString &id);
|
||||
|
||||
protected:
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const override;
|
||||
|
||||
Reference in New Issue
Block a user