VirtualBox

Ignore:
Timestamp:
May 2, 2016 10:32:14 AM (9 years ago)
Author:
vboxsync
Message:

VBoxGlobal::prepare: Must keep the QByteArray returned by toUtf8/toLocal8Bit when getting arguments, otherwise the temporary instance will be deleted before we use the constData() return (or so it seems, anways).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r60547 r60783  
    41044104    {
    41054105#if QT_VERSION >= 0x050000
    4106         const char *arg = arguments.at(i).toLocal8Bit().constData();
     4106        QByteArray  argBytes = arguments.at(i).toUtf8();
     4107        const char *arg = argBytes.constData();
    41074108#else /* QT_VERSION < 0x050000 */
    41084109        const char *arg = qApp->argv() [i];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette