Keep code to load/write old vacation scripts.
ClosedPublic

Authored by knauss on Oct 23 2015, 5:02 PM.

Details

Summary

it is not a joke, that you can delete the code after June 2016!

We only need the code to read once the old vacation script,
afterwards we can delete it.

If you try to load the old script with the new script extractor, you loose only
react on spam, excluded domain and start/end date. So not every information is lost.

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 1044.Oct 23 2015, 5:02 PM
knauss retitled this revision from to Keep code to load/write old vacation scripts..
knauss updated this object.
knauss added reviewers: vkrause, mlaurent.
knauss added a project: KDE PIM.
mlaurent added inline comments.Oct 25 2015, 1:52 PM
libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h
19

Remove all these TODO
We can't remove it in 06.2016 we are not sure that all user will switch to kf5 at this date.
(see debian which used kdepim < kdepim-akonadi from age.

knauss added inline comments.Oct 25 2015, 2:19 PM
libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h
19
  1. if we would wait for the distros until to delete this, we would need to wait ~6 years. Next debian release will be in 3 years. Not talking about REHL lifetime at all. I would argue, that distros have to patch this in, if they are that slow.
  2. the downside of not having this oldscript parsing is, that you loose some informations about your vacations (start/end date, handle spam and an excluded Domain). IMO that is not a big deal to lose this things, if distros won't patch it.

See vacationutils:222

if (vacation.sendForSpam && vacation.excludeDomain.isEmpty() && !vacation.startDate.isValid() && !vacation.endDate.isValid()) { 	
   const auto vac = parseScriptLegacy(script);
mlaurent edited edge metadata.Oct 25 2015, 2:34 PM

it's not a big problem to keep it until kdepim 6 ? no ?
is it critical to keep it after 06-2016 ?
There is a dead line ?

No there is no dealine or anything in 06-2016, we can leave the code for ever.

The point I was discussing with @vkrause, that it would be nice to remove dead code as fast as possible and also make it clear in the code, that this code is only a temporary needed. Without an explicit message, we will forget to delete this. If you have a better solution, how to mark such code...

And 8 month came from, that we have at least two KDE Applications in between.

For me it's not a dead code it's a "migrate" code and I know some guy as David Faure for example which didn't switch to kf5 yet (for kdepim).
And his wife will wait more time.
So I don't know what is a problem to keep it until kf6.

knauss updated this revision to Diff 1067.Oct 27 2015, 12:53 PM
knauss edited edge metadata.

remove delete todo

mlaurent added inline comments.Oct 30 2015, 6:15 AM
libksieve/src/ksieveui/vacation/legacy/README
4

to new one

knauss marked an inline comment as done.Nov 2 2015, 11:14 AM

fixed typo

/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h:297:25: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]

void blockStart(int lineNumber) Q_DECL_OVERRIDE {}
                    ^

/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h:298:23: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]

void blockEnd(int lineNumber) Q_DECL_OVERRIDE {}
                  ^

In file included from /stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.cpp:18:0:
/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h:297:25: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]

void blockStart(int lineNumber) Q_DECL_OVERRIDE {}
                    ^

/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.h:298:23: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]

void blockEnd(int lineNumber) Q_DECL_OVERRIDE {}
                  ^

/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.cpp:34:91: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]
void KSieveUi::Legacy::VacationDataExtractor::commandStart(const QString &identifier, int lineNumber)

           ^

/stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/legacy/vacationscriptextractor.cpp:44:62: warning: unused parameter ‘lineNumber’ [-Wunused-parameter]
void KSieveUi::Legacy::VacationDataExtractor::commandEnd(int lineNumber)

^

I installed all patch D444->D448
But:
ASSERT: "mServerName == serverName" in file /stockage/kde5/kdepim/libksieve/src/ksieveui/vacation/vacationpagewidget.cpp, line 109

  • KMail got signal 6 (Exiting)
  • Dead letters dumped.

I have 2 kolabs accounts.
So I can't use it in kmail.

knauss updated this revision to Diff 1170.Nov 4 2015, 6:19 PM

fixed warnings

knauss added a comment.Nov 4 2015, 6:23 PM

I have 2 kolabs accounts.
So I can't use it in kmail.

never tests with 2 accounts :P replaces the ASSERT with a if clause to deside to to further or not. see D446

mlaurent accepted this revision.Nov 6 2015, 6:06 AM
mlaurent edited edge metadata.

Seems ok now

This revision is now accepted and ready to land.Nov 6 2015, 6:06 AM
This revision was automatically updated to reflect the committed changes.