summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-12-26 22:45:20 -0200
committerThiago Macieira <thiago.macieira@intel.com>2018-01-10 03:17:09 +0000
commit73a5a93ff982a2e783828b1e11988614d38d8687 (patch)
tree7110a7853b89ed2f883917f18f534d71932ff144 /src/plugins/sqldrivers
parentf9a1ccf19c09cfe842cc2e6d661c4c284387ed2f (diff)
MySQL: Fix qAddPostRoutine of mysql_server_end() on Windows
The function is declared as STDCALL, so we can't add a direct function pointer to it (calling convention doesn't match what QtCore will try to use). Instead, add a lambda as a trampoline. Task-number: QTBUG-65471 Change-Id: I39332e0a867442d58082fffd1504002206e5cfaf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 6e428fb878..28d5ccb4a2 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -1160,7 +1160,7 @@ static void qLibraryInit()
#endif // Q_NO_MYSQL_EMBEDDED
#ifdef MARIADB_BASE_VERSION
- qAddPostRoutine(mysql_server_end);
+ qAddPostRoutine([]() { mysql_server_end(); });
#endif
}