mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +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
|
||||
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: fix listing of local cloud cache directories
|
||||
dive computer support:
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
#include <QtAndroid>
|
||||
#include "core/serial_usb_android.h"
|
||||
std::vector<android_usb_serial_device_descriptor> androidSerialDevices;
|
||||
|
||||
#endif
|
||||
|
||||
QMLManager *QMLManager::m_instance = NULL;
|
||||
|
@ -506,7 +505,16 @@ bool QMLManager::createSupportEmail()
|
|||
return true;
|
||||
}
|
||||
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
|
||||
// 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";
|
||||
mailToLink += "&body=";
|
||||
mailToLink += messageBody;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
#include "core/serial_usb_android.h"
|
||||
#elif defined(Q_OS_IOS)
|
||||
#include "ios/ios-share.h"
|
||||
#endif
|
||||
|
||||
class QAction;
|
||||
|
@ -266,6 +268,9 @@ private:
|
|||
QString appLogFileName;
|
||||
QFile appLogFile;
|
||||
bool appLogFileOpen;
|
||||
#endif
|
||||
#if defined(Q_OS_IOS)
|
||||
IosShare iosshare;
|
||||
#endif
|
||||
qPrefCloudStorage::cloud_status m_oldStatus;
|
||||
|
||||
|
|
Loading…
Reference in a new issue