diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-10-04 14:44:26 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-10-04 14:44:26 +0000 |
| commit | e847b181ed507b5e3ce71155a385b67a5dcb91f9 (patch) | |
| tree | 01c754cae7dcc85e1676280c23fcae97adb7287a /examples/GuiClient/utils.cpp | |
| parent | 9b834c408bf49ddc1a5a0423dc80c7909befdb8f (diff) | |
| download | qxmpp-e847b181ed507b5e3ce71155a385b67a5dcb91f9.tar.gz | |
add bareJid check
Diffstat (limited to 'examples/GuiClient/utils.cpp')
| -rw-r--r-- | examples/GuiClient/utils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/GuiClient/utils.cpp b/examples/GuiClient/utils.cpp index cea1c48a..9b115d6d 100644 --- a/examples/GuiClient/utils.cpp +++ b/examples/GuiClient/utils.cpp @@ -149,3 +149,9 @@ QString getImageType1(const QByteArray& image) return "image/unknown"; } + +bool isValidBareJid(const QString& bareJid) +{ + QRegExp re("^[^@]+@[^@]+$"); + return re.exactMatch(bareJid); +} |
