Run grantleeheaderstyletest without kdepim-addons and without pre installat messagelib.
ClosedPublic

Authored by knauss on May 28 2019, 10:10 AM.

Diff Detail

Repository
R94 PIM: Message Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
knauss created this revision.May 28 2019, 10:10 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 28 2019, 10:10 AM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
knauss requested review of this revision.May 28 2019, 10:10 AM
dvratil added inline comments.
messageviewer/src/antispam/antispamconfig.cpp
65

Won't this affect the regular code, though?

knauss added inline comments.Jun 20 2019, 4:41 PM
messageviewer/src/antispam/antispamconfig.cpp
65

Yes, I think so and I'm unsure what is the outcome of such a change. Can I check if we are in TestMode and disable this only when on testMode?

dfaure added inline comments.Jun 22 2019, 7:59 AM
messageviewer/src/antispam/antispamconfig.cpp
65

qputenv in the test and qgetenv here.
Or make the test set an extern bool to true. See e.g. kio_resolve_local_urls in kio.

Or make the test closer to the regular case ;-)
In fact I'm wondering why this says setReadDefaults(true), i.e. ignore user settings. That's usually for "Revert to defaults" buttons.

knauss added inline comments.
messageviewer/src/antispam/antispamconfig.cpp
65

qputenv in the test and qgetenv here.
Or make the test set an extern bool to true. See e.g. kio_resolve_local_urls in kio.

thx for the tips.

Or make the test closer to the regular case ;-)

Well I want the tests to be working without installation and as non root I can't write to /usr/share. So I would need to control the default location and I don't see a way to achieve this.

In fact I'm wondering why this says setReadDefaults(true), i.e. ignore user settings. That's usually for "Revert to defaults" buttons.

This I'm wondering, too. I tracked this line of code exists from the beginning of the git history and this file was added 2004 and that line was never touched since then. The commit message is:
"Add optional graphical spam status to fancy headers. Based on patch by Patrick Audley." commited by @ikloecker. But I expect Ingo also don't know why this line is needed.

I would suggest to remove this line as it seems to me, that it breaks stuff (e.g. our tests) and I can't imagine what we gain if we keep this line intact. With removing the line we gain the possibility for users to change the "kmail.antispamrc" for their needs.

Yep, remove the line.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 22 2019, 10:37 PM
This revision was automatically updated to reflect the committed changes.