1. 27 Aug, 2014 1 commit
  2. 18 Aug, 2014 2 commits
    • Raphael Kubo da Costa's avatar
      Merge branch '1.13' · c093494f
      Raphael Kubo da Costa authored
      * 1.13:
        Do not enter the test/ directories if AKONADI_BUILD_TESTS is off.
      c093494f
    • Raphael Kubo da Costa's avatar
      Do not enter the test/ directories if AKONADI_BUILD_TESTS is off. · 21465191
      Raphael Kubo da Costa authored
      enable_testing() only determines whether a "test" target and the related
      CTest files will be created. And in Akonadi's case it is actually
      invoked regardless of the value of the AKONADI_BUILD_TESTS option
      because Akonadi includes the CTest module, which calls enable_testing()
      based on the value of another variable, BUILD_TESTING.
      
      In any case, whether the executables and libraries that compose
      Akonadi's unit tests will be built has nothing to do with
      enable_testing(). To make AKONADI_BUILD_TESTS really disable the build
      of the unit tests we now avoid entering the tests/ directories at all
      when it is off, so that neither tests nor targets they depend on get
      built.
      
      REVIEW: 119776
      21465191
  3. 13 Aug, 2014 2 commits
    • Raphael Kubo da Costa's avatar
      Merge branch '1.13' · 4ae3a768
      Raphael Kubo da Costa authored
      * 1.13:
        FindSqlite: Use CMAKE_FLAGS the right way in try_compile().
      4ae3a768
    • Raphael Kubo da Costa's avatar
      FindSqlite: Use CMAKE_FLAGS the right way in try_compile(). · b60702e0
      Raphael Kubo da Costa authored
      This fixes f90774f1 ("Check whether Sqlite is compiled with
      SQLITE_ENABLE_UNLOCK_NOTIFY"), so that SQLITE_INCLUDE_DIR is really
      passed to the try_compile() call. So far, it was just a NOP and the
      compilation only worked if sqlite3.h was in a directory the compiler
      uses automatically.
      
      try_compile()'s syntax is a bit complicated, and CMAKE_FLAGS expects a
      series of arguments as if they had been passed to the command line, so
      instead of "CMAKE_FLAGS INCLUDE_DIRECTORIES /some/dir" one needs to use
      "CMAKE_FLAGS -DINCLUDE_DIRECTORIES:PATH=/some/dir".
      
      REVIEW: 119762
      b60702e0
  4. 10 Aug, 2014 2 commits
  5. 07 Aug, 2014 3 commits
  6. 06 Aug, 2014 3 commits
  7. 05 Aug, 2014 3 commits
    • Daniel Vrátil's avatar
      LIST: Fix ancestor retrieval · 949ee86e
      Daniel Vrátil authored
      My previous fix has introduced a regression that has broken ancestor retrieval,
      this commit fixes that.
      949ee86e
    • Daniel Vrátil's avatar
      Fix LIST handler listing irrelevant collections in mimetype filter · 14876289
      Daniel Vrátil authored
      The hasChildCollections check would include every collection with at least
      one children, regardless whether it passes the mimetype filter or not. This
      patch changes child collection check to only evalute to true if at least one
      collection in the subtree matches the mimetype filter.
      14876289
    • Christian Mollekopf's avatar
      LIST: Non-recursive listing · 0d4568e9
      Christian Mollekopf authored
      Instead of recursively query for children,
      we query for a list of all collections we're interested in,
      and then assemble a tree.
      
      This potentially results in a small overhead with few collections,
      but should scale much better when we have many collections while most
      are getting filtered by the initial query (i.e. disabled collections).
      
      Additionally this patch ensures enabled collections that are nested in
      a disabled collection are correctly found.
      
      REVIEW: 119418
      0d4568e9
  8. 04 Aug, 2014 2 commits
  9. 01 Aug, 2014 2 commits
  10. 31 Jul, 2014 2 commits
  11. 29 Jul, 2014 1 commit
  12. 28 Jul, 2014 3 commits
  13. 26 Jul, 2014 7 commits
    • Daniel Vrátil's avatar
      Disable QVariant::Bool support in Qt 5 builds of QSQLITE3 driver · 3561a2d2
      Daniel Vrátil authored
      Apparently there has been some behavior change in QtSql in Qt 5 that breaks
      our use of boolean in SQLite. Problem with SQLite is that it allows you to
      store 1 or 'true' into BOOL column as valid values, but when querying them,
      WHERE val = 1 will return different results than WHERE val = 'true'.
      
      In Qt 4 the value is always correctly converted to 'true' and 'false' in both
      INSERTS and SELECTs, but in Qt 5 it is not.
      
      This needs a global fix in Akonadi to make sure that we always use the string
      values everywhere. Until then, I disabled the Boolean support in the SQLite driver
      in Qt 4 to make sure at least Qt 4 build of Akonadi works correctly with QSQLITE3.
      
      The problem can be reproduced with the native QSQLITE driver in Qt 5 too.
      3561a2d2
    • Daniel Vrátil's avatar
      Fix AkAppendHandlerTest timezone handling · acc69c85
      Daniel Vrátil authored
      The QSQLITE3 driver now natively supports QDateTime and QTime, so the timezone is
      expected to be Qt::LocalTime instead of Qt::UTC. The unit-test was assuming UTC
      for PimItem atime and mtime, but we never specified UTC in AkAppend handler in the
      first place. This was working, because QtSql would force UTC, while all other drivers
      just use LocalTime (default value).
      acc69c85
    • Daniel Vrátil's avatar
      Use QMap instead of QHash to store data in DataDescription schema type · d9afe34f
      Daniel Vrátil authored
      When iterating over QHash, the order of entries is not guarenteed, so the
      DbInitializerTest (which relies on columns being always returned in the same
      order) started failing in Qt 5, probably because of implementation change in
      QHash.
      
      This change replaces QHash with QMap, which guarantees ordering when iterating
      over it. There is no reason to use QHash in the first place, since we never do
      lookup, only iteration (and the data set is very very small)
      
      Also adapts DbInitializerTest test data to the new behavior which ensures that
      values are INSERTed into DB in alphabetical order of column names.
      
      This change makes DbInitializerTest pass in Qt 5 build.
      d9afe34f
    • Daniel Vrátil's avatar
      Don't call CREATE DATABASE in FakeAkonadiServer · cac03fe7
      Daniel Vrátil authored
      Unit-tests always use SQLite, which does not support CREATE DATABASE. This
      for some reason fails silently in Qt 4, but produces (a valid) error in Qt 5.
      cac03fe7
    • Daniel Vrátil's avatar
      Enable the fork of qsqlite driver in Qt 5 builds · b1fb176b
      Daniel Vrátil authored
      This ports the fork of qsqlite driver to build with both Qt 4 and Qt 5.
      It adds features from Qt 5 driver to the Qt 4 driver and uses a couple
      of #ifdefs to make sure the single codebase compiles against both Qts.
      b1fb176b
    • Daniel Vrátil's avatar
      Merge branch '1.13' · b34daf78
      Daniel Vrátil authored
      b34daf78
    • Daniel Vrátil's avatar
      TagFetchHelper: Fix SQL query for fetching tag RIDs · 53621057
      Daniel Vrátil authored
      The original query was wrong and was returning a single tag multiple
      times, if it had multiple remote IDs.
      53621057
  14. 25 Jul, 2014 2 commits
  15. 24 Jul, 2014 2 commits
  16. 23 Jul, 2014 3 commits