From 8d68e1929eb4614be64e44475438b702bbf33367 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Mon, 31 Oct 2016 09:38:58 +0100 Subject: [PATCH] Fix initialization Initialize "mode", fix order. --- keychain.cpp | 7 ++++--- keychain_p.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/keychain.cpp b/keychain.cpp index 8e738d0..90ee4eb 100644 --- a/keychain.cpp +++ b/keychain.cpp @@ -195,12 +195,13 @@ ReadPasswordJobPrivate::ReadPasswordJobPrivate(const QString &service_, ReadPass } JobPrivate::JobPrivate(const QString &service_, Job *qq) - : error( NoError ) + : q(qq) + , mode( Text ) + , error( NoError ) , service( service_ ) , autoDelete( true ) , insecureFallback( false ) - , q(qq) { - +{ } QString JobPrivate::modeToString(Mode m) diff --git a/keychain_p.h b/keychain_p.h index dc66d12..ab7f0be 100644 --- a/keychain_p.h +++ b/keychain_p.h @@ -45,8 +45,8 @@ public: static QString modeToString(Mode m); static Mode stringToMode(const QString& s); - Mode mode; Job* const q; + Mode mode; QByteArray data; #if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID)