summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index fba9efb92..2b2d4cbbe 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -12,12 +12,14 @@
#include <QElapsedTimer>
#include <QTimer>
#include <QDateTime>
+#include <QClipboard>
#include <QBluetoothLocalDevice>
#include "qt-models/divelistmodel.h"
#include "qt-models/gpslistmodel.h"
#include "qt-models/completionmodels.h"
+#include "qt-models/messagehandlermodel.h"
#include "core/divelist.h"
#include "core/device.h"
#include "core/pref.h"
@@ -332,6 +334,16 @@ void QMLManager::cancelCredentialsPinSetup()
setShowPin(false);
}
+void QMLManager::copyAppLogToClipboard()
+{
+ /*
+ * The user clicked the button, so copy the log file
+ * to the clipboard for easy access
+ */
+ QString copyString = MessageHandlerModel::self()->logAsString();
+ QApplication::clipboard()->setText(copyString, QClipboard::Clipboard);
+}
+
void QMLManager::finishSetup()
{
// Initialize cloud credentials.