diff options
| author | 2017-02-09 04:36:04 -0500 | |
|---|---|---|
| committer | 2017-02-09 04:36:04 -0500 | |
| commit | d9aa870e5d509cc7309ab82dd102a937ab58613a (patch) | |
| tree | d92d03d76b5c390b335f1cfd761f1a0b59ec8496 /Plugins/DbAndroid/adbmanager.cpp | |
| parent | 68ee4cbcbe424b95969c70346283a9f217f63825 (diff) | |
Imported Upstream version 3.1.1+dfsg1upstream/3.1.1+dfsg1
Diffstat (limited to 'Plugins/DbAndroid/adbmanager.cpp')
| -rw-r--r-- | Plugins/DbAndroid/adbmanager.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Plugins/DbAndroid/adbmanager.cpp b/Plugins/DbAndroid/adbmanager.cpp index 462e91f..bbcf8fc 100644 --- a/Plugins/DbAndroid/adbmanager.cpp +++ b/Plugins/DbAndroid/adbmanager.cpp @@ -135,12 +135,19 @@ QString AdbManager::findAdb() } #endif + QString fullPath; + for (const QString& path : candidates) + { + fullPath = QDir::cleanPath(path); + if (testAdb(fullPath, true)) + return fullPath; + } + #ifdef Q_OS_WIN32 if (testAdb("adb.exe", true)) return "adb.exe"; static_qstring(winAdbPath, "/../Android/sdk/platform-tools/adb.exe"); - QString fullPath; for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation)) { fullPath = QDir::cleanPath(path + winAdbPath); @@ -286,6 +293,7 @@ bool AdbManager::execLongCommand(const QStringList& arguments, QProcess& proc, Q // Take off initial arguments from ADB, store it to use with "push". QStringList primaryArguments; QStringList args = arguments; + while (args.first() != "shell") primaryArguments << args.takeFirst(); |
