From 3f8583de36ddf6081d7230d7a24aa7a11594b215 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 18 Nov 2018 08:12:09 +0200 Subject: Mobile: initialize copy variables Signed-off-by: Miika Turkia --- mobile-widgets/qmlmanager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index a133a5479..05bea0a0e 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -224,6 +224,18 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), // make sure we know if the current cloud repo has been successfully synced syncLoadFromCloud(); LOG_STP("qmlmgr sync load cloud"); + + memset(&m_copyPasteDive, 0, sizeof(m_copyPasteDive)); + memset(&what, 0, sizeof(what)); + + // Let's set some defaults to be copied so users don't necessarily need + // to know how to configure this + what.divemaster = true; + what.buddy = true; + what.suit = true; + what.tags = true; + what.cylinders = true; + what.weights = true; } void QMLManager::applicationStateChanged(Qt::ApplicationState state) -- cgit v1.2.3-70-g09d2