diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example_8_server/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/example_8_server/main.cpp b/examples/example_8_server/main.cpp index b5e8cc44..3b22aea4 100644 --- a/examples/example_8_server/main.cpp +++ b/examples/example_8_server/main.cpp @@ -33,9 +33,12 @@ class passwordChecker : public QXmppPasswordChecker { /// Checks that the given credentials are valid. - bool checkPassword(const QString &username, const QString &password) + QXmppPasswordChecker::Error checkPassword(const QString &username, const QString &password) { - return (username == USERNAME && password == PASSWORD); + if (username == USERNAME && password == PASSWORD) + return QXmppPasswordChecker::NoError; + else + return QXmppPasswordChecker::AuthorizationError; }; /// Retrieves the password for the given username. |
