[odb-users] bug with Qt 5.2.0-beta

abbas ali chezgi chezgi at yahoo.com
Mon Nov 25 04:14:39 EST 2013


thanks for quick reply Boris
i used prebuild odb: odb-2.3.0-1.i686.rpm
and compiled libodb-qt with Qt5.2.0-beta

odb command:
//-------------------------------------------------------------------------------------------
odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore -d sqlite --generate-query --generate-schema -p qt Config.h
//-------------------------------------------------------------------------------------------

sample header file:
//-------------------------------------------------------------------------------------------

#ifndef CONFIG_H
#define CONFIG_H

#include <QObject>
#include <QString>
#include  <QVariant> 

#pragma db object
class User
{
public:
    #pragma db id auto
    unsigned long id_;
    QString name;
    int sid;
};

#endif // CONFIG_H
//-------------------------------------------------------------------------------------------

thanks again.




On Monday, November 25, 2013 10:06 AM, Boris Kolpackov <boris at codesynthesis.com> wrote:
 
Hi,

abbas ali chezgi <chezgi at yahoo.com> writes:


> odb compiler dos'nt work with Qt5.2.0.
> 
> it's first error comes from qvariant.h:
> #if QT_DEPRECATED_SINCE(5, 0)

It looks like QT_DEPRECATED_SINCE is not defined for some reason
when compiling a Qt header with the ODB compiler.

I found only one mentioning of something similar but I don't see
how this can be related:

http://qt-project.org/forums/viewthread/28482

Have you tried to compile a source file that includes QVariant
with g++ instead of ODB? If it works, then perhaps an include
directory is mission from the ODB command line. In fact, can
you show the exact ODB command line that you are using?

Also it would be useful to know if you built the ODB compiler
yourself or if you are using one of the pre-built packages
(and which version).

Boris


More information about the odb-users mailing list