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 82b4c79fb9.
Change-Id: Iccb70303a3af5c298922525b219dc6ed6168ba0b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
parent
cf2d59bfe8
commit
818ab021f5
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue