1. 01 Mar, 2020 1 commit
    • Igor Poboiko's avatar
      [resources/maildir] Don't save "file:" schema to the config · 93ecfacf
      Igor Poboiko authored
      Summary:
      `ConfigWidget` uses `KConfig` underneath, and utilizes `KUrlRequester` custom
      widget. The `USER` property of this widget (which is used by `KConfig`) is of
      type `QUrl`, and thus when dialog is accepted, the `path` config property
      gets overriden with `QUrl::toString()` value, which prepends `file:` schema
      (this is basically because `KCoreConfigSkeleton::ItemPath` is inherited from
      `ItemString`, and when someone calls `ItemString::setProperty`, it gets
      casted as `QVariant::toString`).
      
      Inside the `ConfigWidget::save` the code calls `setPath` method on
      `url.toLocalFile`, which drops the scheme. Because of that, the `pathItem`
      and `path` property of `mSettings` have different values, first has schema
      and the second hasn't. Eventually, the value stored by `pathItem` wins, and
      `mSettings->path()` returns URL with schema. However, `Maildir` doesn't expect
      it and misinterprets it as the relative path to current WORKDIR (which is home
      directory), thus creating `/home/user/file:/home/user/...` file structure.
      
      The proposed solution is to simply call `mSettings->save()`, which overrides
      `pathItem` value and drops schema from it.
      
      It also fixes the `AkoNotes` resource, which uses the same `ConfigWidget`.
      Funny enough, `Contacts` resource, which is somewhat similar, is not affected
      as it has the same `Settings->save()` call.
      
      Alternative approaches include:
      1) Teach `Maildir` to drop the schema (if it's there).
      2) Teach `KCoreConfigSkeleton::ItemPath` to work with `QUrl` and don't append
      schema (it makes sense, because `ItemPath` corresponds to local file. Although
      it's not documented that it shouldn't have schema, it seems from the tests that
      it was the original intent). This could save the headache of having such issue
      in the future, but it could mess up with other programs in funny ways (as
      currently `file:` sometimes gets prepended, and some code might implicitly rely
      on it)
      
      Additional note:
      There are `ui.kcfg_Path->url().isLocalFile()` checks around, which doesn't make
      sense to me, as `KUrlRequester` is used for local files and it seems like it
      always returns `QUrl` pointing to local file (i.e. have the `file:` schema).
      
      BUG: 408354
      BUG: 411269
      BUG: 413588
      
      Test Plan:
      1) Open `akonadiconsole -> Local Folders` properties, change the folder, save
      2) `cat ~/.config/akonadi_maildir_resource_0rc`. `file:` schema gets prepended
      2.1) `akonadictl restart`. `file:` folder gets created inside homedir
      3) Apply patch, repeat (1)-(2.1). `file:` schema is dropped.
      
      Reviewers: dvratil, mlaurent
      
      Reviewed By: dvratil
      
      Subscribers: kde-pim
      
      Tags: #kde_pim
      
      Differential Revision: https://phabricator.kde.org/D27722
      93ecfacf
  2. 02 Dec, 2019 1 commit
  3. 20 Jun, 2019 1 commit
  4. 19 Aug, 2018 1 commit
  5. 04 Nov, 2017 1 commit
  6. 28 Aug, 2016 2 commits
  7. 12 Sep, 2015 1 commit
  8. 01 Sep, 2015 1 commit
  9. 13 Mar, 2015 1 commit
  10. 01 Feb, 2015 1 commit
  11. 14 Dec, 2014 1 commit
  12. 06 Aug, 2014 1 commit
  13. 28 Jul, 2014 1 commit
  14. 23 Jul, 2014 1 commit
  15. 20 Jul, 2014 1 commit
  16. 03 Jul, 2014 1 commit
  17. 11 Feb, 2014 1 commit
  18. 15 Nov, 2013 1 commit
  19. 05 Nov, 2013 1 commit
    • Stephen Kelly's avatar
      Remove moc includes · 1b6df637
      Stephen Kelly authored
      The CMAKE_AUTOMOC feature is strict about the name of moc includes,
      and these ones do not match what they should. They are also unnecessary.
      CMAKE_AUTOMOC creates a separate file concatenating the moc files
      per-target.
      1b6df637
  20. 28 Mar, 2013 1 commit
  21. 09 May, 2012 1 commit
  22. 11 Feb, 2012 3 commits
  23. 04 Nov, 2011 1 commit
  24. 31 Oct, 2011 1 commit
    • Milian Wolff's avatar
      fix linking with gnu gold · b5d88a1f
      Milian Wolff authored
      without this fix I get linking errors like this:
      /home/milian/.bin/ld: CMakeFiles/akonadi_kalarm_resource.dir/__/__/ical/shared/icalresourcebase.o: in function non-virtual thunk to
      Akonadi::SingleFileResourceBase::~SingleFileResourceBase():icalresourcebase.cpp(.text._ZN7Akonadi22SingleFileResourceBaseD1Ev+0x5): warning: relocation refers to
      discarded section
      /home/milian/.bin/ld: error: treating warnings as errors
      b5d88a1f
  25. 20 Dec, 2010 1 commit
  26. 26 Nov, 2010 1 commit
  27. 24 Nov, 2010 1 commit
  28. 12 Jul, 2010 1 commit
  29. 15 May, 2010 1 commit
  30. 22 Apr, 2010 1 commit
  31. 14 Jan, 2010 1 commit
    • Laurent Montel's avatar
      Add caption · 9edaf107
      Laurent Montel authored
      svn path=/trunk/KDE/kdepim/runtime/; revision=1074598
      9edaf107
  32. 11 Dec, 2009 2 commits
  33. 10 Dec, 2009 1 commit
  34. 06 Nov, 2009 1 commit
    • Laurent Montel's avatar
      Add focus · bc4f247e
      Laurent Montel authored
      svn path=/branches/work/akonadi-ports/kdepim/akonadi/; revision=1045710
      bc4f247e
  35. 11 Aug, 2009 1 commit
  36. 16 Jun, 2009 1 commit