[calligra] kplato/libs/kernel/tests: Add unit tests for kptcommand, calendar commands.
Cyrille Berger Skott
cberger at cberger.net
Sun Mar 27 19:06:23 BST 2011
On Sunday 27 March 2011, Pierre Stirnweiss wrote:
> Actually it does not seem so, and it compiles fine here (on windows).
>
> I don't really understand what the problem is here.
>
Ah I think I have figured it out:
on l457: of your unit test:
CalendarModifyDateCmd *cmd1 = new CalendarModifyDateCmd(calendar1, day1,
QDate(2011,3,26));
But the function signature:
CalendarModifyDateCmd( Calendar *cal, CalendarDay *day, QDate &value, const
QString& name = QString() );
And if you look carefully at the third argument it is a "QDate &", and it is
not allowed in C++ (at least until c++0/1x, and then you would need some extra
characters) to pass a temporary to a reference. However I am guessing that
there is a missing "const" in the constructor of CalendarModifyDateCmd and
that would solve the problem.
--
Cyrille Berger Skott
More information about the calligra-devel
mailing list