diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-21 10:23:29 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-21 11:57:52 +0200 |
commit | 7555a925816e3244073803f0adc4d44640f5ac1d (patch) | |
tree | f6f11015ae7387b50eaa76aa2c80ff273093b188 /src/plugins/sqldrivers | |
parent | 31c251765db45a068f1268027e5dd600151af1e5 (diff) | |
parent | 8d64d1e0c3f7ebcee859e8b5f40aa27a8df86351 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.
This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.
Conflicts:
mkspecs/features/default_pre.prf
mkspecs/features/mac/toolchain.prf
mkspecs/features/toolchain.prf
src/dbus/qdbusconnection.cpp
src/plugins/sqldrivers/mysql/qsql_mysql.cpp
src/sql/drivers/mysql/qsql_mysql.cpp
src/widgets/widgets/qmenubar.cpp
src/widgets/widgets/qmenubar_p.h
tools/configure/configureapp.cpp
tools/configure/environment.cpp
tools/configure/environment.h
Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r-- | src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index 30a0a04f44..eb2bddd0bd 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -640,8 +640,15 @@ QVariant QMYSQLResult::data(int field) if (f.nullIndicator) return QVariant(f.type); - if (qIsInteger(f.type)) - return QVariant(f.type, f.outField); + if (qIsInteger(f.type)) { + QVariant variant(f.type, f.outField); + // we never want to return char variants here, see QTBUG-53397 + if (static_cast<int>(f.type) == QMetaType::UChar) + return variant.toUInt(); + else if (static_cast<int>(f.type) == QMetaType::Char) + return variant.toInt(); + return variant; + } if (f.type != QVariant::ByteArray) val = toUnicode(d->drv_d_func()->tc, f.outField, f.bufLength); @@ -1371,7 +1378,7 @@ bool QMYSQLDriver::open(const QString& db, : sslCipher.toLocal8Bit().constData()); } -#if MYSQL_VERSION_ID >= 50000 +#if MYSQL_VERSION_ID >= 50100 if (connectTimeout != 0) mysql_options(d->mysql, MYSQL_OPT_CONNECT_TIMEOUT, &connectTimeout); if (readTimeout != 0) @@ -1400,7 +1407,7 @@ bool QMYSQLDriver::open(const QString& db, setOpenError(true); return false; } -#if MYSQL_VERSION_ID >= 50000 +#if MYSQL_VERSION_ID >= 50100 if (reconnect) mysql_options(d->mysql, MYSQL_OPT_RECONNECT, &reconnect); #endif |