Results 1 to 3 of 3

Thread: QSql::Location : enum type redefinition

  1. #1
    Join Date
    Jan 2017
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Question QSql::Location : enum type redefinition

    Hi,

    I'im using QT 5.8 msvc2015_64. I'm trying to compile my project that using the QSql module. But i have a enum type redefinition error in the qtsqlGlobal.h (a qt header file).

    Qt Code:
    1. #ifndef QTSQLGLOBAL_H
    2. #define QTSQLGLOBAL_H
    3.  
    4. #include <QtCore/qglobal.h>
    5.  
    6. QT_BEGIN_NAMESPACE
    7.  
    8. #ifndef QT_STATIC
    9. # if defined(QT_BUILD_SQL_LIB)
    10. # define Q_SQL_EXPORT Q_DECL_EXPORT
    11. # else
    12. # define Q_SQL_EXPORT Q_DECL_IMPORT
    13. # endif
    14. #else
    15. # define Q_SQL_EXPORT
    16. #endif
    17.  
    18. namespace QSql
    19. {
    20. enum Location
    21. {
    22. BeforeFirstRow = -1,
    23. AfterLastRow = -2
    24. };
    25.  
    26. enum ParamTypeFlag
    27. {
    28. In = 0x00000001,
    29. Out = 0x00000002,
    30. InOut = In | Out,
    31. Binary = 0x00000004
    32. };
    33. Q_DECLARE_FLAGS(ParamType, ParamTypeFlag)
    34.  
    35. enum TableType
    36. {
    37. Tables = 0x01,
    38. SystemTables = 0x02,
    39. Views = 0x04,
    40. AllTables = 0xff
    41. };
    42.  
    43. enum NumericalPrecisionPolicy
    44. {
    45. LowPrecisionInt32 = 0x01,
    46. LowPrecisionInt64 = 0x02,
    47. LowPrecisionDouble = 0x04,
    48.  
    49. HighPrecision = 0
    50. };
    51. }
    52.  
    53. Q_DECLARE_OPERATORS_FOR_FLAGS(QSql::ParamType)
    54.  
    55. QT_END_NAMESPACE
    56.  
    57. #endif // QSQL_H
    To copy to clipboard, switch view to plain text mode 

    I have compiled successfully my project with Qt msvc2012_64. But when i do it with QT 5.8 msvc2015_64 i had this error.

    Any help please.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSql::Location : enum type redefinition

    Does the error contain any other hint?
    E.g. where it finds the other definition?

    Cheers,
    _

  3. #3
    Join Date
    Jan 2017
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QSql::Location : enum type redefinition

    Quote Originally Posted by anda_skoa View Post
    Does the error contain any other hint?
    E.g. where it finds the other definition?

    Cheers,
    _
    Thank you for replying. It's not the only error, i have QSql::ParamTypeFlag : enum type redefinition, QSql::TableType : enum type redefinition, QSql::NumericalPrecisionPolicy : enum type redefinition ..... But i guess it's the same problem. Like i say, i dont think that my source code is the problem. I compiled with Qt and visual 2012 before. But when i do it with Qt and visual 2015, i have this problem with the qt headers.

Similar Threads

  1. Replies: 0
    Last Post: 31st August 2014, 22:05
  2. How to inheriting a enum type?
    By ricardodovalle in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2014, 20:04
  3. Replies: 2
    Last Post: 23rd April 2011, 14:36
  4. QSql - incomplete type 'struct QVariant'
    By UltramaticOrange in forum Newbie
    Replies: 2
    Last Post: 5th October 2010, 20:07
  5. Problem with connect() (enum-type as parameter)
    By alu23 in forum Qt Programming
    Replies: 3
    Last Post: 9th May 2008, 08:46

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.