simplify logic and cleanup comments
ClosedPublic

Authored by knauss on Feb 1 2016, 1:22 PM.

Diff Detail

Repository
R43 KDE PIM
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
knauss updated this revision to Diff 2159.Feb 1 2016, 1:22 PM
knauss retitled this revision from to simplify logic and cleanup comments.
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added a reviewer: mlaurent.
Restricted Application added a project: KDE PIM. · View Herald TranscriptFeb 1 2016, 1:22 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
knauss added inline comments.Feb 1 2016, 1:28 PM
kmail/editor/kmcomposewin.cpp
1512

it breaks the logic of slotIdentityChanged if we update mId directly.

1526

no sticky identities anymore -> so update the comments

1533

this todo doesn't makes sense anymore, or at least I do not understand what block should be moved

mlaurent added inline comments.Feb 3 2016, 5:50 AM
kmail/editor/kmcomposewin.cpp
1508–1509

don't use auto for uint please (for each simple type).
We will have a lot of "auto" in source code and it's not easy after that to read it

knauss updated this revision to Diff 2187.Feb 4 2016, 1:06 PM
knauss marked an inline comment as done.

replace auto -> uint

mlaurent added inline comments.Feb 6 2016, 8:31 AM
kmail/editor/kmcomposewin.cpp
1512

Do you have a test case for it ?

knauss added inline comments.Feb 6 2016, 9:11 AM
kmail/editor/kmcomposewin.cpp
1512

Nope.

The testcase in D892 is actuatually using the X-KMail-Identity header to give the information what identity should be used to kmcomposewin. But kmcomposerwin is initalized with the default identity. And with that a slotIdentityChanged is executed (see line 1555/1545 old/new). That's why I looked inside slotIdentityChanged and see that this function compare what different settings the old and new identitiy have. And only triggers something if there is a difference. So if we set mId before the diff is not available.

-> so there is a test case that scrates the sureface of slotIdentityChanged.

mlaurent added inline comments.Feb 9 2016, 11:58 AM
kmail/editor/kmcomposewin.cpp
1512

So you need to move it in 891
It's not same patch as cleanup

knauss updated this revision to Diff 2248.Feb 9 2016, 1:52 PM
knauss marked an inline comment as done.

split the logic change out of cleanup.

mlaurent accepted this revision.Feb 10 2016, 12:13 PM
mlaurent edited edge metadata.
This revision is now accepted and ready to land.Feb 10 2016, 12:13 PM
This revision was automatically updated to reflect the committed changes.