mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile: send logfiles as attachments on iOS as well
This was added for Android a while ago, but now this works on iOS as well which is a very welcome addition for the recipient of these support emails (i.e. me). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8164ca56ec
commit
87387b7e7e
3 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
divelist: do not include planned versions of a dive if there is real data
|
divelist: do not include planned versions of a dive if there is real data
|
||||||
desktop: fix key composition in tag widgets and dive site widget
|
desktop: fix key composition in tag widgets and dive site widget
|
||||||
|
mobile: send log files as attachments for support emails on iOS
|
||||||
mobile: allow cloud account deletion (Apple app store requirement)
|
mobile: allow cloud account deletion (Apple app store requirement)
|
||||||
mobile: fix listing of local cloud cache directories
|
mobile: fix listing of local cloud cache directories
|
||||||
dive computer support:
|
dive computer support:
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
#include <QtAndroid>
|
#include <QtAndroid>
|
||||||
#include "core/serial_usb_android.h"
|
#include "core/serial_usb_android.h"
|
||||||
std::vector<android_usb_serial_device_descriptor> androidSerialDevices;
|
std::vector<android_usb_serial_device_descriptor> androidSerialDevices;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMLManager *QMLManager::m_instance = NULL;
|
QMLManager *QMLManager::m_instance = NULL;
|
||||||
|
@ -506,7 +505,16 @@ bool QMLManager::createSupportEmail()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
qDebug() << __FUNCTION__ << "failed to share the logFiles via intent, use the fall-back mail body method";
|
qDebug() << __FUNCTION__ << "failed to share the logFiles via intent, use the fall-back mail body method";
|
||||||
|
#elif defined(Q_OS_IOS)
|
||||||
|
// call into objC++ code to share on iOS
|
||||||
|
QString libdcLogFileName(logfile_name);
|
||||||
|
iosshare.supportEmail(appLogFileName, libdcLogFileName);
|
||||||
|
// Unfortunately I haven't been able to figure out how to wait until the mail was sent
|
||||||
|
// so that this could tell us whether this was successful or not
|
||||||
|
// We always assume it worked and return to the caller.
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
// fallback code that tries to copy the logs into the message body and uses the Qt send email method
|
||||||
QString mailToLink = "mailto:in-app-support@subsurface-divelog.org?subject=Subsurface-mobile support request";
|
QString mailToLink = "mailto:in-app-support@subsurface-divelog.org?subject=Subsurface-mobile support request";
|
||||||
mailToLink += "&body=";
|
mailToLink += "&body=";
|
||||||
mailToLink += messageBody;
|
mailToLink += messageBody;
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
#include "core/serial_usb_android.h"
|
#include "core/serial_usb_android.h"
|
||||||
|
#elif defined(Q_OS_IOS)
|
||||||
|
#include "ios/ios-share.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
@ -266,6 +268,9 @@ private:
|
||||||
QString appLogFileName;
|
QString appLogFileName;
|
||||||
QFile appLogFile;
|
QFile appLogFile;
|
||||||
bool appLogFileOpen;
|
bool appLogFileOpen;
|
||||||
|
#endif
|
||||||
|
#if defined(Q_OS_IOS)
|
||||||
|
IosShare iosshare;
|
||||||
#endif
|
#endif
|
||||||
qPrefCloudStorage::cloud_status m_oldStatus;
|
qPrefCloudStorage::cloud_status m_oldStatus;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue