diff options
author | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2018-07-26 13:52:06 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2018-07-31 12:59:18 +0000 |
commit | 818ab021f5fbeeddaed001efd8716907e735bd71 (patch) | |
tree | 2dce08925e73afcb6bcde60d3f68034d321a1b16 /src/plugins | |
parent | cf2d59bfe8720627e016195903e16cd0c97fa612 (diff) |
Compilation fix of qsql_mysql.cpp
qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp:78:21: error: conflicting declaration ‘using my_bool = bool’
using my_bool = bool;
^
In file included from /home/nierob/dev/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h:60,
from /home/nierob/dev/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp:40:
/usr/include/mysql/mysql.h:53:14: note: previous declaration as ‘typedef char my_bool’
typedef char my_bool;
^~~~~~~
Seems that type was implemented with char not bool.
Ammends 82b4c79fb90c1a01165b96455ae48715c3059bbe.
Change-Id: Iccb70303a3af5c298922525b219dc6ed6168ba0b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index 7c0e270923..a1636302b7 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -74,9 +74,9 @@ Q_DECLARE_METATYPE(MYSQL_STMT*) # define Q_CLIENT_MULTI_STATEMENTS 0 #endif -#if MYSQL_VERSION_ID >= 80001 -using my_bool = bool; -#endif +// MySQL above version 8 removed my_bool typedef while MariaDB kept it, +// by redefining it we can regain source compatibility. +using my_bool = decltype(mysql_stmt_bind_result(nullptr, nullptr)); QT_BEGIN_NAMESPACE |