mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
Replace usage of QString::asprintf for new Qt
Qt5 removed the instance method QString::asprintf, and later replaced it with a static method of the same name, causing CoreHost to compile, but pass empty strings to the managed entry point. The static QString::number method is available in both Qt4 and Qt5, and as a bonus the overload should resolve to the appropriate pointer length for the target.
This commit is contained in:
parent
4287317ec0
commit
a0d8a403c3
1 changed files with 4 additions and 8 deletions
|
|
@ -143,14 +143,10 @@ int CoreHost::run(QGuiApplication& app, QQmlApplicationEngine& engine, runCallba
|
|||
execArgs.push_back("exec");
|
||||
execArgs.push_back(runContext.managedExe);
|
||||
|
||||
QString appPtr;
|
||||
appPtr.asprintf("%llu", (quintptr)&app);
|
||||
QString enginePtr;
|
||||
enginePtr.asprintf("%llu", (quintptr)&engine);
|
||||
QString callbackPtr;
|
||||
callbackPtr.asprintf("%llu", (quintptr)runCallback);
|
||||
QString exportedSymbolPointer;
|
||||
exportedSymbolPointer.asprintf("%llu", (quintptr)getExportedFunction);
|
||||
auto appPtr = QString::number((qintptr)&app);
|
||||
auto enginePtr = QString::number((quintptr)&engine);
|
||||
auto callbackPtr = QString::number((quintptr)runCallback);
|
||||
auto exportedSymbolPointer = QString::number((quintptr)&getExportedFunction);
|
||||
|
||||
execArgs.push_back(appPtr);
|
||||
execArgs.push_back(enginePtr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue