[Development] QLatin1Constant and QtContacts / QtOrganizer

lars.knoll at nokia.com lars.knoll at nokia.com
Mon Dec 19 20:18:12 CET 2011


On 12/14/11 11:01 AM, "ext Todd.Rose at nokia.com" <Todd.Rose at nokia.com>
wrote:

>I'm in the early stages of trying to port a Qt4.7 app that uses
>qt-mobility to Qt5.  Today I noticed compile errors caused by the
>duplication of qlatin1constant.h in both of these
> modules.  
>
>The problem shows when you write an app that uses both the QtContacts and
>the QtOrganizer modules.   Headers within the QtContacts module will
>sometimes include the QtOrganizer version of qlatin1constant.h (or
>vice-versa depending on the app's include path
> ordering).  The use of namespaces in these headers is what leads to the
>errors.
>
>There's several solutions, and I guess it'd be best if the
>QLatin1Constant functionality was moved to a core library, but until then
>can we at least have the headers *within* the Contacts and Organizer
>modules include qlatin1constant.h in an unambiguous manner?

I'm actually wondering whether this class still makes sense in Qt 5. We've
done some changes to QLatin1String to make it more suitable and have
QStringLiteral in addition. That should make the need for this class
mostly go away IMO.

Cheers,
Lars




More information about the Development mailing list