[Development] QLatin1Constant and QtContacts / QtOrganizer

Todd.Rose at nokia.com Todd.Rose at nokia.com
Wed Dec 14 03:01:17 CET 2011


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?

Maybe something like:

#include "../QtContacts/qtlatin1constant.h"

rather than the include-path-sensitive:

#include <qlatin1constant.h>

BR,
-Todd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111214/d43826a6/attachment.html>


More information about the Development mailing list