summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-10-13 13:51:19 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-03-15 23:00:41 +0100
commitf5213ab799be73ef7e0c5fee9828d4fbcf238d95 (patch)
treeeee87a06883b6693cfe8bfe66377abc0a261f5a9 /src
parent26ed956cbc5b081b972fe0c435e77e62d3f7944b (diff)
QMySQL: return QVariant::ByteArray for POINT column
qDecodeMYSQLType() did not handle FIELD_TYPE_GEOMETRY and therefore the type for a POINT column was incorrectly treated as QVariant::String. Even the type can not (yet) be properly decoded to a QPoint, treating it as QVariant::ByteArray is the better option here. Fixes: QTBUG-72140 Change-Id: I12e75b326ae3acb75cb36f2e650464528bd43c0e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index d3e37f11d6..a641935dc5 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -294,6 +294,7 @@ static QMetaType::Type qDecodeMYSQLType(int mysqltype, uint flags)
case FIELD_TYPE_TINY_BLOB :
case FIELD_TYPE_MEDIUM_BLOB :
case FIELD_TYPE_LONG_BLOB :
+ case FIELD_TYPE_GEOMETRY :
type = (flags & BINARY_FLAG) ? QMetaType::QByteArray : QMetaType::QString;
break;
default: