1. 26 Jun, 2019 1 commit
    • Linus Jahn's avatar
      Rewrite database models to not block the GUI · e8750bad
      Linus Jahn authored
      This rewrites parts of the main database class. All classes working on
      the database have been moved to the new database thread, so inserting
      records into the database isn't blocking the user interface anymore.
      What also improved the performance *massively* is the use of SQLite
      transactions, when inserting multiple records. So inserting is so fast
      now that it actually wouldn't necessarily require another thread, but
      with this we're safe in the future.
      The message model and the roster model have been splitted up into a
      database manager and the list model that is used to present cached data
      to the user. The XMPP managers are connected to both the model and the
      db classes, so both are updated in parallel.
      There are also two new classes for the RosterItem and the Message,
      because we need to cache those in the models in a vector. The Message
      class inherits from QXmppMessage, so we can now use the same class for
      sending messages and inserting messages into the database.
      Closes #273.
  2. 06 Feb, 2019 1 commit
  3. 05 Feb, 2019 1 commit
  4. 22 Jan, 2019 1 commit
  5. 24 Nov, 2018 2 commits
  6. 15 Sep, 2018 5 commits
  7. 09 May, 2018 1 commit
  8. 02 Mar, 2018 1 commit
    • LNJ's avatar
      Fix lag when changing chat (#205) · bc071e8c
      LNJ authored
      This also does some clean up and restructuring of the deployment of the
      `chatPartner` property to the ClientThread (MessageHandler) and MessageModel.
      Before, a thread-safe function of the ClientThread was used, so the mutex of it
      blocked the GUI, when the client thread was busy in this moment.
  9. 24 Feb, 2018 1 commit
    • LNJ's avatar
      Use new ClientThread for XMPP-connection; Make offline usable · 5c513623
      LNJ 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.
  10. 13 Jan, 2018 1 commit
    • LNJ's avatar
      Bump copyright to 2018 · 14b7183a
      LNJ authored
      This updates all copyright headers in the source files to 2018. Also,
      there are not all contributors listed with a seperate copyright line,
      only one line for all Kaidan developers and contributors with a 'link'
      to a full list of contributors in the LICENSE file.
      It would be very hard to maintain the old strategy and adding each
      contributor to each file. Also the copyright lines were get too long then.
      All Kaidan headings are uniform, now. I replaced 'A cross platform XMPP
      client' with 'A user-friendly XMPP client for every device!'.
  11. 01 Aug, 2017 1 commit
  12. 30 Jul, 2017 2 commits
  13. 19 Jun, 2017 1 commit
    • LNJ's avatar
      Fix message insertion bug · 0a6e43bd
      LNJ authored
      There was still an, now unused, variable/pointer in the MessageController class. It
      wasn't set so it was a nullptr, when the MessageModel was trying to add it to the db.
  14. 12 Jun, 2017 1 commit
  15. 07 Jun, 2017 1 commit
    • LNJ's avatar
      Clean up Message/RosterController · 5fdf2e7a
      LNJ authored
      I separated them again, so the RosterController will also connect to the
      Message received event, and will upsate the unread message counter on its
      I also removed many `emit xxxModelChanged`. They are unnecessary and I don't
      know why I added them at all (in these cases).
      There were also some unused #includes, that I have removed.
      But the QML API has also changed through this and sendMessage and chatPartner
      are now on the top level of `kaidan`.
  16. 05 Jun, 2017 1 commit
  17. 14 Mar, 2017 1 commit
    • LNJ's avatar
      Roster: Sort using last exchanged · 51c48b80
      LNJ authored
      The new `lastExchanged` coloumn in the RosterModel contains
      a ISODate string with the time when the last message has
      arrived or has been sent. The roster is now sorted using this
      The message controller is now able to communicate with the roster
      controller directly and updates the lastExchanged whenever a
      message arrives/is been sent.
      To preserve the lastExchanged property, the roster is now only
      'updated' instead of being replaced every login. It looks up
      which JIDs have been removed and added, adds/removes them
      and updates the name of all the others (lastExchanged keeps the
      same). Roster Versioning would be the better solution here and
      also generally ...
  18. 12 Mar, 2017 2 commits
  19. 05 Mar, 2017 2 commits
  20. 18 Feb, 2017 1 commit
    • LNJ's avatar
      Add SQLite database for messages and roster caching · 3b366c75
      LNJ authored
      The new SQLite3 database is saved (on Linux) under:
      ~/.local/share/KaidanIM/kaidan/messages.sqlite3 (This is the AppData
      location from Qt)
      It currently has two tables one for the roster and one for messages.
      The roster table has two coloumns: jid and name. The message table
      has six: author, author_resource, recipient, recipient_resource,
      timestamp and message. 'recipient' and 'author' contain a bare JID
      (a JID without the resource) and the resource saved in
      author/recipent_resource, if available. The resource is not really
      necessary, but I thought it might be cool to add e.g. some stats for
      this, later.
      In the Kaidan.cpp/h, I moved the handleMessageReceived part into the
      MessageController, later we should also move the handle Presence
      Received into a PresenceController or something as this.
      I also removed the 'import harbour.kaidan 1.0' in QML, because, now
      we don't have any new QML-types from Kaidan -> you can't import it.
      The Chat-GUI is still very ugly, we/I should definitely imporve it
      in a later commit.
      Closes #55.