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>
This commit is contained in:
Thiago Macieira 2017-12-26 22:45:20 -02:00
parent f9a1ccf19c
commit 73a5a93ff9

View File

@ -1160,7 +1160,7 @@ static void qLibraryInit()
#endif // Q_NO_MYSQL_EMBEDDED #endif // Q_NO_MYSQL_EMBEDDED
#ifdef MARIADB_BASE_VERSION #ifdef MARIADB_BASE_VERSION
qAddPostRoutine(mysql_server_end); qAddPostRoutine([]() { mysql_server_end(); });
#endif #endif
} }