From 2a0f68a6c2167ca2657fb2b1df55c9647b2e2c04 Mon Sep 17 00:00:00 2001
From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
Date: Tue, 16 Jul 2013 11:32:31 -0400
Subject: [PATCH] [ #22321 ] Make Krazy2 happy

---
 src/CMakeLists.txt                   | 2 +-
 src/abstractcontactbackend.h         | 1 -
 src/call.cpp                         | 6 +++---
 src/callmodel.cpp                    | 2 +-
 src/contact.h                        | 2 +-
 src/dbus/instancemanager.h           | 5 ++---
 src/dbus/videomanager.h              | 4 ++--
 src/historymodel.cpp                 | 4 ++++
 src/historymodel.h                   | 6 ++----
 src/visitors/phonenumberselector.cpp | 2 +-
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index caace062..b98a3788 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -216,4 +216,4 @@ install( TARGETS qtsflphone
   ARCHIVE DESTINATION lib
   LIBRARY DESTINATION lib
   DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}
-)
\ No newline at end of file
+)
diff --git a/src/abstractcontactbackend.h b/src/abstractcontactbackend.h
index 86c46769..3f6bbf55 100644
--- a/src/abstractcontactbackend.h
+++ b/src/abstractcontactbackend.h
@@ -16,7 +16,6 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-
 #ifndef ABSTRACTION_CONTACT_BACKEND_H
 #define ABSTRACTION_CONTACT_BACKEND_H
 
diff --git a/src/call.cpp b/src/call.cpp
index 33cf412e..71586ec9 100644
--- a/src/call.cpp
+++ b/src/call.cpp
@@ -293,7 +293,7 @@ Call* Call::buildRingingCall(const QString & callId)
 ///Build a call that is already over
 Call* Call::buildHistoryCall(const QString & callId, uint startTimeStamp, uint stopTimeStamp, QString account, QString name, QString number, QString type)
 {
-   if(name == "empty") name = QString();
+   if(name == "empty") name.clear();
    Call* call            = new Call(Call::State::OVER, callId, name, number, account );
 
    call->m_pStopTimeStamp  = stopTimeStamp ;
@@ -728,7 +728,7 @@ Call::State Call::stateChanged(const QString& newStateName)
       connect(m_pTimer,SIGNAL(timeout()),this,SLOT(updated()));
       m_pTimer->start();
    }
-   m_CallNumber = QString();
+   m_CallNumber.clear();
    emit changed();
    emit changed(this);
    qDebug() << "Calling stateChanged " << newStateName << " -> " << toDaemonCallState(newStateName) << " on call with state " << previousState << ". Become " << m_CurrentState;
@@ -999,7 +999,7 @@ void Call::start()
    ::time(&curTime);
    emit changed();
    emit changed(this);
-   m_CallNumber = QString();
+   m_CallNumber.clear();
    m_pStartTimeStamp = curTime;
 }
 
diff --git a/src/callmodel.cpp b/src/callmodel.cpp
index 30c33812..8a5204a1 100644
--- a/src/callmodel.cpp
+++ b/src/callmodel.cpp
@@ -956,4 +956,4 @@ void CallModel::slotDTMFPlayed( const QString& str )
    }
    const QModelIndex& idx = getIndex(call);
    setData(idx,50, Call::Role::DTMFAnimState);
-}
\ No newline at end of file
+}
diff --git a/src/contact.h b/src/contact.h
index 9d504b99..2487f5ad 100644
--- a/src/contact.h
+++ b/src/contact.h
@@ -79,7 +79,7 @@ public:
    class  PhoneNumbers : public QList<Contact::PhoneNumber*>, public ContactTreeBackend {
    public:
       virtual QObject* self() __attribute__ ((const));
-      PhoneNumbers(Contact* parent);
+      explicit PhoneNumbers(Contact* parent);
       PhoneNumbers(Contact* parent, const QList<Contact::PhoneNumber*>& list);
       Contact* contact() const;
    private:
diff --git a/src/dbus/instancemanager.h b/src/dbus/instancemanager.h
index d17170c9..84538909 100644
--- a/src/dbus/instancemanager.h
+++ b/src/dbus/instancemanager.h
@@ -16,9 +16,8 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-
-#ifndef INSTANCE_INTERFACE_SINGLETON_H
-#define INSTANCE_INTERFACE_SINGLETON_H
+#ifndef INSTANCEMANAGER_H
+#define INSTANCEMANAGER_H
 
 #include "instance_dbus_interface.h"
 #include "../typedefs.h"
diff --git a/src/dbus/videomanager.h b/src/dbus/videomanager.h
index 3beae23b..81911f9b 100644
--- a/src/dbus/videomanager.h
+++ b/src/dbus/videomanager.h
@@ -15,8 +15,8 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-#ifndef VIDEO_INTERFACE_SINGLETON_H
-#define VIDEO_INTERFACE_SINGLETON_H
+#ifndef VIDEOMANAGER_H
+#define VIDEOMANAGER_H
 
 #include "video_dbus_interface.h"
 #include "../typedefs.h"
diff --git a/src/historymodel.cpp b/src/historymodel.cpp
index 78eb443e..425ca57b 100644
--- a/src/historymodel.cpp
+++ b/src/historymodel.cpp
@@ -84,6 +84,10 @@ HistoryModel::TopLevelItem::TopLevelItem(int name) :
    HistoryTreeBackend(HistoryTreeBackend::TOP_LEVEL),QObject(nullptr),m_Name(name),m_NameStr(m_slHistoryConstStr[name])
 {}
 
+HistoryModel::~TopLevelItem() {
+   m_spInstance->m_lCategoryCounter.removeAll(this);
+}
+
 
 /*****************************************************************************
  *                                                                           *
diff --git a/src/historymodel.h b/src/historymodel.h
index 9796de67..c9d2b40e 100644
--- a/src/historymodel.h
+++ b/src/historymodel.h
@@ -101,7 +101,7 @@ public:
 private:
 
    //Constructor
-   HistoryModel();
+   explicit HistoryModel();
    ~HistoryModel();
 
    bool initHistory ();
@@ -121,9 +121,7 @@ private:
    friend class HistoryModel;
    public:
       virtual QObject* getSelf() {return this;}
-      virtual ~TopLevelItem() {
-         m_spInstance->m_lCategoryCounter.removeAll(this);
-      }
+      virtual ~TopLevelItem();
    private:
       TopLevelItem(int name);
       CallList m_lChildren;
diff --git a/src/visitors/phonenumberselector.cpp b/src/visitors/phonenumberselector.cpp
index 1c495947..a2bf84e0 100644
--- a/src/visitors/phonenumberselector.cpp
+++ b/src/visitors/phonenumberselector.cpp
@@ -28,4 +28,4 @@ void PhoneNumberSelector::setDefaultVisitor(PhoneNumberSelector* v)
 PhoneNumberSelector* PhoneNumberSelector::defaultVisitor()
 {
    return m_spDefaultVisitor;
-}
\ No newline at end of file
+}
-- 
GitLab