Browse Source

Merge pull request #8603 from DonLakeFlyer/LogDownloadMobile

Fix mobile Log Download
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
3b5460a825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ChangeLog.md
  2. 12
      src/AnalyzeView/LogDownloadController.cc
  3. 15
      src/AnalyzeView/LogDownloadPage.qml

2
ChangeLog.md

@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes. @@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes.
### 4.0.6 - Not yet released
* Analyze/Log Download - Fix download on mobile versions of QGC
### 4.0.5 - Stable
* Solo: Fix mission upload failures

12
src/AnalyzeView/LogDownloadController.cc

@ -519,19 +519,9 @@ void @@ -519,19 +519,9 @@ void
LogDownloadController::download(QString path)
{
QString dir = path;
#if defined(__mobile__)
if(dir.isEmpty()) {
if (dir.isEmpty()) {
dir = qgcApp()->toolbox()->settingsManager()->appSettings()->logSavePath();
}
#else
if(dir.isEmpty()) {
dir = QString(); //-- TODO: QGCQFileDialog::getExistingDirectory(
// MainWindow::instance(),
// tr("Log Download Directory"),
// QDir::homePath(),
// QGCQFileDialog::ShowDirsOnly | QGCQFileDialog::DontResolveSymlinks);
}
#endif
downloadToDirectory(dir);
}

15
src/AnalyzeView/LogDownloadPage.qml

@ -147,11 +147,16 @@ AnalyzePage { @@ -147,11 +147,16 @@ AnalyzePage {
var o = logController.model.get(rowIndex)
if (o) o.selected = true
})
fileDialog.title = qsTr("Select save directory")
fileDialog.selectExisting = true
fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath
fileDialog.selectFolder = true
fileDialog.openForLoad()
if (ScreenTools.isMobile) {
// You can't pick folders in mobile, only default location is used
logController.download()
} else {
fileDialog.title = qsTr("Select save directory")
fileDialog.selectExisting = true
fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath
fileDialog.selectFolder = true
fileDialog.openForLoad()
}
}
QGCFileDialog {
id: fileDialog

Loading…
Cancel
Save