1. 26 Mar, 2020 1 commit
    • Daniel Vrátil's avatar
      FakeAkonadiServer: fix flushing notifications before test ends · 89fe563b
      Daniel Vrátil authored
      The flush is asynchronous so just calling dispatchNotifications() and terminating
      the event loop is not good enough, we need to call it before the event loop is
      terminated and we must wait for the notifications to be delivered otherwise we
      just can't be sure that they also reached the test code.
      89fe563b
  2. 04 Jan, 2020 4 commits
  3. 02 Jan, 2020 2 commits
  4. 15 Apr, 2019 1 commit
  5. 14 Apr, 2019 1 commit
  6. 07 Apr, 2019 1 commit
  7. 14 Jul, 2018 2 commits
    • Daniel Vrátil's avatar
      Simplify NotificationCollector · ac5a8b8b
      Daniel Vrátil authored
      It's no longer a QObject and it's strictly owned by DataStore.
      ac5a8b8b
    • Daniel Vrátil's avatar
      Create (fake-able) DataStoreFactory · c6e334c4
      Daniel Vrátil authored
      Instead of "racing" whether a new thread in unit-tests calls
      FakeDataStore::self() or DataStore::self() first, we create a
      factory class that can be replaced by a fake factory during test
      initialization, avoiding any race conditions.
      c6e334c4
  8. 22 Jan, 2018 2 commits
    • Daniel Vrátil's avatar
      Remove XdgBaseDirs · 278a85f8
      Daniel Vrátil authored
      The codebase now uses QStandardPaths everywhere. This ensures that there
      will be no difference between how Akonadi sees default paths and how other
      parts of the stack (especially those parts that use Frameworks) see them,
      as they are all using the same method to look up the paths. This is
      especially important on Windows where XDG_* environment variables don't
      exist and are not honored by QStandardPaths. XdgBaseDirs still tried to
      simulate XDG-like directory structure even on Windows, which caused
      QStandardPaths-based code (like KConfig) to not find the correct config
      files.
      278a85f8
    • Daniel Vrátil's avatar
      Port Akonadi::StandardDirs away from XdgBaseDirs · b7988b3e
      Daniel Vrátil authored
      We can do with QStandardPaths internally. It will behave identically on Linux as
      it did before and it will behave consistently with other Frameworks and Qt modules
      on Windows (unlike XdgBaseDirs).
      b7988b3e
  9. 07 Dec, 2017 2 commits
  10. 06 Dec, 2017 1 commit
  11. 12 Oct, 2017 1 commit
  12. 09 Oct, 2017 1 commit
  13. 17 Sep, 2017 1 commit
  14. 23 Apr, 2017 1 commit
    • Daniel Vrátil's avatar
      Generate Protocol from an XML specification (ABI break) · 5535d6e5
      Daniel Vrátil authored
      Instead of maintaining 12k lines of hand-written protocol code, we
      specify the protocol in an XML and use a custom-written generator
      that generates the code for us.
      
      It's not only much easier to modify the protocol - we only need to
      change a single thing in the XML instead of touching several places
      of the implementation - but it's also much safer, as there's less
      risk of accidentally introducing a bug in the code.
      
      The major difference between the original hand-written code and the
      generated code is that we no longer use QSharedDataPointer and virtual
      methods in the Private classes, but instead all members are directly
      in the command clas with most getters and setters inlined. This means
      that copying commands is quite costly, so we pass them around as
      QSharedPointers or const references. This should give us a tiny little
      bit more performance.
      5535d6e5
  15. 12 Feb, 2017 1 commit
  16. 02 Jan, 2017 1 commit
  17. 01 Jan, 2017 1 commit
  18. 02 Oct, 2016 1 commit
  19. 30 Sep, 2016 1 commit
    • Daniel Vrátil's avatar
      Introduce concept of database generation · d263b936
      Daniel Vrátil authored
      Generation is an integer which is guaranteed to never change as long as
      the database backend is not removed and re-created. If that happens it
      is guaranteed that the new generation identifier will be higher than
      the previous one.
      
      Client applications can access it via ServerManager::generation(). The
      purpose of the generation number is to make it possible for applications
      to detect when the database was recreated and some of their configuration
      must be invalidated (e.g. collection IDs stored in config files).
      d263b936
  20. 07 Sep, 2016 2 commits
  21. 04 Sep, 2016 1 commit
  22. 16 Aug, 2016 1 commit
  23. 15 Aug, 2016 2 commits
    • Daniel Vrátil's avatar
      Create a per-type ChangeNotification Protocol command · 040ce64b
      Daniel Vrátil authored
      Different entity types have different data, so sharing a single
      structure to describe changes in all entities is limiting. Having
      a single structure made sense when we only had Items and Collections
      which share most of the attributes and it was also easier to expose
      this via DBus.
      
      Now we are no longer limited by DBus so we can afford having a
      different Protocol command for each notification type. This will be
      most important when we introduce SubscriberChangeNotification, as
      subscriber changes would otherwise be hard to map onto the legacy
      ChangeNotification and is also the first step towards Notification
      Payloads.
      040ce64b
    • Daniel Vrátil's avatar
      Make AkonadiServer QObject, manage multiple QLocalServers for different purposes · 0e478e2b
      Daniel Vrátil authored
      This creates so called CommandServer and NotificationServer, both
      QLocalServer listening using named pipes (this is a move away from
      a socket file to avoid having multiple files).
      
      Each new connection on CommandServer makes AkonadiServer to instantiate
      new Connection object as normally. For NotificationServer each new
      connection is handed over to NotificationManager, which will deal with
      it.
      0e478e2b
  24. 17 Dec, 2015 1 commit
  25. 13 Dec, 2015 2 commits
  26. 06 Dec, 2015 1 commit
    • Daniel Vrátil's avatar
      Rework the thread management and shutdown · d9fb479d
      Daniel Vrátil authored
      This uses the proper approach to threads in Qt (moveToThread() instead
      of subclassing QThread), and it makes it possible to do final cleanup
      in the object's thread instead of the thread from which the destructor
      was called.
      d9fb479d
  27. 08 Nov, 2015 1 commit
  28. 05 Sep, 2015 1 commit
  29. 28 Aug, 2015 1 commit
    • Daniel Vrátil's avatar
      Fix incorrect license of some files · 79758c93
      Daniel Vrátil authored
      The license should be LGPLv2.1+ everywhere, but some file were accidentally
      licensed under GPLv2. This patch relicenses those files to he under LGPLv2.1+
      too. All contributors agreed to the change.
      
      BUG: 351747
      FIXED-IN: 15.08.1
      79758c93
  30. 21 Aug, 2015 1 commit
    • Daniel Vrátil's avatar
      Move AkStandardDirs to KF5AkonadiPrivate · 8265998a
      Daniel Vrátil authored
      Akonadi::StandarDirs provides instance-aware access to Akonadi config files
      unlike XdgBaseDirs::akonadi*ConfigFile() which always point to the global
      files regardless of current instance settings. The plan is to port clients
      to use Akonadi::StandardDirs instead and remove the broken functions from
      XdgBaseDirs.
      8265998a