Android: write appLog to file

The trick is to pick a path that is accessible from other applications.
In theory QStandardPaths::GenericDataLocation should provide that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-09 17:03:57 -07:00
parent e8b46039f6
commit c59a74029b
3 changed files with 47 additions and 2 deletions

View file

@ -125,6 +125,9 @@ public:
bool showPin() const;
void setShowPin(bool enable);
Q_INVOKABLE void setStatusbarColor(QColor color);
#if defined(Q_OS_ANDROID)
void writeToAppLogFile(QString logText);
#endif
public slots:
void applicationStateChanged(Qt::ApplicationState state);
@ -208,6 +211,11 @@ private:
bool m_showPin;
DCDeviceData *m_device_data;
QString m_progressMessage;
#if defined(Q_OS_ANDROID)
QString appLogFileName;
QFile appLogFile;
bool appLogFileOpen;
#endif
signals:
void cloudUserNameChanged();