kplato compile problem on windows

Pierre Stirnweiss pstirnweiss at googlemail.com
Mon Jan 24 09:30:09 GMT 2011


But then, would it be possible to instantiate an AppointmentIntervalList
from outside?

Pierre

On Mon, Jan 24, 2011 at 10:28 AM, Pierre Stirnweiss <
pstirnweiss at googlemail.com> wrote:

> I can try the nepomuk solution (using KPLATO_EXPORT on each methods of the
> class instead of on the class itself) this evening. This would probably be
> the minimal impact solution.
> Just so I am clear, it seems that in nepomuk they have only specified
> NEPOMUK_EXPORT on some of the methods. My assumption is that they exported
> only the methods which were really used outside? Otherwise I don't really
> understand why isFileDataObject would get the EXPORT and not isFolder for
> example.
>
> PierreSt
>
>
> On Mon, Jan 24, 2011 at 10:23 AM, Dag Andersen <danders at get2net.dk> wrote:
>
>> Mandag 24 januar 2011 09:52:23 skrev Jan Hambrecht:
>> > On 24.01.2011 08:57, Pierre Stirnweiss wrote:
>> > > As some of may know, I am trying to get Calligra to compile on Windows
>> > > MSVC2010. I have encountered a couple of problems, which were easy
>> > > enough to solve (with the help of SaroEngels).
>> > > The one I am facing now is apparently way more complicated:
>> > >
>> > > in kplato/libs/kernel/kpappointment.h we have the following:
>> > >
>> > > class KPLATO_EXPORT AppointmentInterval {}
>> > > class KPLATO_EXPORT AppointmentIntervalList: public QMultiMap<QDate,
>> > > AppointmentInterval> {}
>> > >
>> > > This construct yields the error C2487:
>> > > 'identifier' : member of dll interface class may not be declared with
>> > > dll interface
>> > > You can declare a whole class, or certain members of a non-DLL
>> interface
>> > > class, with DLL interface. You cannot declare a class with DLL
>> interface
>> > > and then declare a member of that class with DLL interface.
>> > >
>> > >
>> > > According to SaroEngels, both QDate and AppointmentInterval are
>> > > problematic here. A solution he proposed to this is to have the
>> > > following:
>> > >
>> > > class KPLATO_EXPORT AppointmentInterval;
>> > >
>> > > class AppointmentIntervalBase : public QMultiMap<QDate,
>> > > AppointmentInterval>
>> > >
>> > > class KPLATO_EXPORT AppointmentIntervalList : public
>> > > AppointmentIntervalBase
>> > >
>> > >
>> > > Any further thought on this?
>> >
>> > I would try to change the class from <Is a QMultimap> to <Has a
>> > QMultimap>. If I remember correctly from a short look yesterday, nowhere
>> > in the code are the QMultimap methods of AppointmentIntervalList used,
>> > beside within the implementation of AppointmentIntervalList itself.
>> Not quite true, but refactoring is not a *big* thing, it's mostly
>> lowerBound(), upperbound().
>> So if this is the cleanest way, I can do that.
>> > So maybe using the follwing construct will work:
>> >
>> > class AppointmentIntervalBase
>> > {
>> > // all your existing methods go here
>> > private:
>> >      QMultiMap<QDate, AppointmentInterval> m_data;
>> > };
>> >
>> > Ciao Jan
>> > _______________________________________________
>> > calligra-devel mailing list
>> > calligra-devel at kde.org
>> > https://mail.kde.org/mailman/listinfo/calligra-devel
>>
>> --
>> Mvh.
>> Dag Andersen
>> _______________________________________________
>> calligra-devel mailing list
>> calligra-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/calligra-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110124/90954d71/attachment.htm>


More information about the calligra-devel mailing list