From 105f2f3589d5f4796daee472bd94ddec82dca5cc Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 2 Jun 2018 20:22:16 +0000 Subject: Comment on patch for databases/qt5-sqldrivers-mysql Add a note to the patch for MariaDB-compatibility on how to do it without ifdefs, which therefore would track changes in MariaDB definitions (if it follows the MySQL change) automatically. --- .../files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'databases/qt5-sqldrivers-mysql') diff --git a/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp b/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp index 534d989c4ff4..4add3e998f28 100644 --- a/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp +++ b/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp @@ -10,6 +10,13 @@ now requires a C++ or C99 compiler to compile. (Bug #25597667) +For Qt5, which requires C++11, the following line single-line +definition for mysql_bool is less-fragile and more C++y: + using mysql_bool = decltype(MYSQL_BIND::is_null_value); +This does not apply to the Qt4 port, which allows older compilers +and the less-fragile approach would therefore break on old-gcc-in-base +architectures. + --- src/plugins/sqldrivers/mysql/qsql_mysql.cpp.orig 2018-04-29 07:25:09 UTC +++ src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -74,6 +74,14 @@ Q_DECLARE_METATYPE(MYSQL_STMT*) -- cgit v1.2.3