diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 0268796c27..fa1db627e0 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2478,7 +2478,7 @@ QString QCoreApplication::applicationFilePath() if (procName != d->argv[0]) { // clear the cache if the procname changes, so we reprocess it. QCoreApplicationPrivate::clearApplicationFilePath(); - procName = QByteArray(d->argv[0]); + procName.assign(d->argv[0]); } }