• Linus Jahn's avatar
    Use new ClientThread for XMPP-connection; Make offline usable · 5c513623
    Linus Jahn authored
    This rewrites the full back-end <-> front-end communication, moves the
    connection logic to the back-end and makes the XMPP client connection
    independant of the user interface (they will run parallel). However, the
    database still runs on the main, GUI thread, so this will still block GUI
    rendering (will be done in one of the next commits).
    
    Now, Kaidan is able to handle different DisconnectionReason, so it can
    distinguish if the authentication failed or there's just no connection to the
    server available. So this will finally make Kaidan offline useable! But it
    currently won't reconenct after losing the connection once.
    
    The bug that Kaidan always crashed, when logging in after logging out has also
    been fixed with this.
    
    The LogInPage was simplified: now, the button only shows "Connecting..." (when
    pressed) or "Connect". The trivial state of "retry" has been removed.
    
    `branding.h` was renamed to `Globals.h`. The new `Enums` namespace is used to
    register enums as a QMetaEnum, to make them printable and accessible in QML. The
    new `Q_ENUM_NS` macro is used for that.
    
    Coding style: I started to use doxygen-compatible inline documentation for the
    most functions, classes, enums and other elements. I don't want to really use
    doxygen (we're not a library), but it should definitely make it easier for new
    developers to understand the code. So from now on new code should be documented
    like this.
    
    Closes #107 - Make Kaidan offline usable.
    5c513623
MessageHandler.cpp 8.28 KB