[Qt-interest] [ANN] ODB C++ ORM adds support for Qt

Boris Kolpackov boris at codesynthesis.com
Fri Apr 29 11:23:07 CEST 2011


Hi Konstantin,

Konstantin Tokarev <annulen at yandex.ru> writes:

> Actually, they are - all their declarations are wrapped into macros
> QT_BEGIN_NAMESPACE and QT_END_NAMESPACE, namespace name
> is configurable.

I saw those and was wondering if this is in preparation to move to
namespace'd Qt. Are there plans to turn them on by default in some
future release?


> Also, nothing prevents you from using your own namespace for your code
> even when Qt is compiled without namespace support.

Agree. Our goal with lazy pointers was to "blend in" as much as
possible with the default Qt configuration. But perhaps we should
also add QT_BEGIN_NAMESPACE and QT_END_NAMESPACE. Or perhaps even
do something like this to allow the user to put lazy pointers to a
different namespace:

if defined(ODB_QT_BEGIN_NAMESPACE)
ODB_QT_BEGIN_NAMESPACE
elif defined(QT_BEGIN_NAMESPACE)
QT_BEGIN_NAMESPACE
endif

// Lazy pointer code.

if defined(ODB_QT_END_NAMESPACE)
ODB_QT_END_NAMESPACE
elif defined(QT_END_NAMESPACE)
QT_END_NAMESPACE
endif

Boris




More information about the Qt-interest-old mailing list