diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-08-07 13:59:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-08 12:49:45 +0200 |
commit | 1142dde83e888f8d8ea15099c3634a59faf8fe33 (patch) | |
tree | 45f239e256463f765851b0f49f024889dafda56b /src/corelib/kernel/qcoreapplication.cpp | |
parent | c54aafad368384cb0ae945565592d2985a6fe527 (diff) |
Android: Fix QCoreApplication::applicationDirPath()
Disable the code path which queries /proc/<pid>/exe for the
current executable path, as from a Q_OS_ANDROID perspective,
this executable will be the Dalvik binary. Instead we
get the application directory via the fallback, by
looking in argv[0], since this is set to the location of the
application binary.
Task-number: QTBUG-32852
Change-Id: Ib93050f41cbd47aaf71284e8bfa6a3247131d978
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index efb1289a5c..a7b14b22b5 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1973,7 +1973,7 @@ QString QCoreApplication::applicationFilePath() } #endif #if defined( Q_OS_UNIX ) -# ifdef Q_OS_LINUX +# if defined(Q_OS_LINUX) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) // Try looking for a /proc/<pid>/exe symlink first which points to // the absolute path of the executable QFileInfo pfi(QString::fromLatin1("/proc/%1/exe").arg(getpid())); |