diff --git a/src/Account.cpp b/src/Account.cpp
index 2351cb7c295e70932956c22f39831b3747187bc5..ac2b36cecde90497f36ccfffe21ec689a979b0df 100644
--- a/src/Account.cpp
+++ b/src/Account.cpp
@@ -494,23 +494,24 @@ bool Account::operator==(const Account& a)const
  *                                                                           *
  ****************************************************************************/
 #ifdef ENABLE_VIDEO
-void Account::setActiveVideoCodecList(QList<VideoCodec*> codecs)
+void Account::setActiveVideoCodecList(const QList<VideoCodec*>& codecs)
 {
-   QStringList codecs;
+   QStringList codecs2;
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    foreach(VideoCodec* codec,codecs) {
-      codecs << codecs->getName();
+      codecs2 << codecs->getName();
    }
-   interface.setActiveCodecList(codecs,m_pAccountId);
+   interface.setActiveCodecList(codecs2,m_pAccountId);
 }
 
 QList<VideoCodec*> Account::getActiveVideoCodecList()
 {
    QList<VideoCodec*> codecs;
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
-   foreach (QString codec, interface.getActiveCodecList(m_pAccountId)) {
+   const QStringList activeCodecList = interface.getActiveCodecList(m_pAccountId);
+   foreach (const QString& codec, activeCodecList) {
       codecs << VideoCodec::getCodec(codec);
    }
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/Account.h b/src/Account.h
index 07d672395ea36cf31952b12508eb6261837dac97..2e66943fc927f62d64c461f1bd0085abec325353 100644
--- a/src/Account.h
+++ b/src/Account.h
@@ -176,7 +176,7 @@ class LIB_EXPORT Account : public QObject {
       void setAccountDetails (const MapStringString& m                 );
       bool setAccountDetail  (const QString& param, const QString& val );
       #ifdef ENABLE_VIDEO
-      void setActiveVideoCodecList(QList<VideoCodec*> codecs);
+      void setActiveVideoCodecList(const QList<VideoCodec*>& codecs);
       QList<VideoCodec*> getActiveVideoCodecList();
       #endif
       ///Set the account alias
diff --git a/src/AccountList.cpp b/src/AccountList.cpp
index 620f16e3a2a37c6268cacc9aa9389ba0a675951a..0aeb5edcc3958841af92ae8b1699985bc78d6018 100644
--- a/src/AccountList.cpp
+++ b/src/AccountList.cpp
@@ -259,7 +259,7 @@ QString AccountList::getOrderedList() const
 {
    QString order;
    for( int i = 0 ; i < size() ; i++) {
-      order += getAccountAt(i)->getAccountId() + "/";
+      order += getAccountAt(i)->getAccountId() + '/';
    }
    return order;
 }
diff --git a/src/AudioCodecModel.cpp b/src/AudioCodecModel.cpp
index f5b11ce73c9f8bcf9ef7bcdc6cd2d0f71bba25f8..c15254a98021d0d67883b540e93e38a4d72eece4 100644
--- a/src/AudioCodecModel.cpp
+++ b/src/AudioCodecModel.cpp
@@ -143,4 +143,4 @@ bool AudioCodecModel::moveDown(QModelIndex idx)
       return true;
    }
    return false;
-}
\ No newline at end of file
+}
diff --git a/src/AudioCodecModel.h b/src/AudioCodecModel.h
index ec50ca268aa8de69e71eda26f7dfd2572a5c78f4..3321f6330bc37402cd087fe716319f66ee761985 100644
--- a/src/AudioCodecModel.h
+++ b/src/AudioCodecModel.h
@@ -65,4 +65,4 @@ private:
 
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/Call.cpp b/src/Call.cpp
index db2b44fbbe9ba0ee95e338ca4afb5eba8b9bdd5a..e2734e8cd8a1dff8fc4284c5dc1d6fe33bc3d9e6 100644
--- a/src/Call.cpp
+++ b/src/Call.cpp
@@ -962,4 +962,4 @@ void Call::updatePlayback(int position,int size)
 void Call::contactBackendChanged()
 {
    m_ContactChanged = true;
-}
\ No newline at end of file
+}
diff --git a/src/CallModel.cpp b/src/CallModel.cpp
index bc5dd6eb2c061ade0fb192aab7a524704ea3492c..70fd6b8c0735b82425d411ab811b114647dafa51 100644
--- a/src/CallModel.cpp
+++ b/src/CallModel.cpp
@@ -227,4 +227,4 @@ void CallModelBase::addPrivateCall(Call* call) {
    addCall(call,0);
 }
 
-//More code in CallModel.hpp
\ No newline at end of file
+//More code in CallModel.hpp
diff --git a/src/Contact.cpp b/src/Contact.cpp
index 69603619de45fc69efd63feac8cdf2fa39c34044..7ec52e51071b7584fc7e1717d16bf9e022194c76 100644
--- a/src/Contact.cpp
+++ b/src/Contact.cpp
@@ -208,4 +208,4 @@ QHash<QString,QVariant> Contact::toHash()
    aContact[ "group"          ] = getGroup();
    aContact[ "department"     ] = getDepartment();
    return aContact;
-}
\ No newline at end of file
+}
diff --git a/src/ContactBackend.cpp b/src/ContactBackend.cpp
index 1dbb4cda7124f343269460e8cda70f4fd6bcba55..ddfbdd9e9a6f942c7de063534df8e71de0b00268 100644
--- a/src/ContactBackend.cpp
+++ b/src/ContactBackend.cpp
@@ -56,10 +56,10 @@ ContactList ContactBackend::update()
 ///Return the extension/user of an URI (<sip:12345@exemple.com>)
 QString ContactBackend::getUserFromPhone(QString phoneNumber)
 {
-   if (phoneNumber.indexOf("@") != -1) {
-      QString user = phoneNumber.split("@")[0];
-      if (user.indexOf(":") != -1) {
-         return user.split(":")[1];
+   if (phoneNumber.indexOf('@') != -1) {
+      QString user = phoneNumber.split('@')[0];
+      if (user.indexOf(':') != -1) {
+         return user.split(':')[1];
       }
       else {
          return user;
@@ -71,8 +71,8 @@ QString ContactBackend::getUserFromPhone(QString phoneNumber)
 ///Return the domaine of an URI (<sip:12345@exemple.com>)
 QString ContactBackend::getHostNameFromPhone(QString phoneNumber)
 {
-   if (phoneNumber.indexOf("@") != -1) {
-      return phoneNumber.split("@")[1].left(phoneNumber.split("@")[1].size()-1);
+   if (phoneNumber.indexOf('@') != -1) {
+      return phoneNumber.split('@')[1].left(phoneNumber.split('@')[1].size()-1);
    }
    return "";
-}
\ No newline at end of file
+}
diff --git a/src/ContactBackend.h b/src/ContactBackend.h
index 8899cae73a9dc687fda20237bdda98868fe847ca..d755a92df1dc769d8cce9fd0be1a8420b8543e53 100644
--- a/src/ContactBackend.h
+++ b/src/ContactBackend.h
@@ -76,4 +76,4 @@ signals:
    
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/CredentialModel.cpp b/src/CredentialModel.cpp
index dd7329c4f49c957ac0663d5c840553ea7cd04ff2..05e2fecdf726337b220f6bfb0536819b7ee941a9 100644
--- a/src/CredentialModel.cpp
+++ b/src/CredentialModel.cpp
@@ -103,4 +103,4 @@ void CredentialModel::clear()
       delete data;
    }
    m_lCredentials.clear();
-}
\ No newline at end of file
+}
diff --git a/src/CredentialModel.h b/src/CredentialModel.h
index 0d6013a09c810ebd3886c0bceb7e469c971579fc..c94dd9a3bb007d5af5e8273b778add686fe1709d 100644
--- a/src/CredentialModel.h
+++ b/src/CredentialModel.h
@@ -61,4 +61,4 @@ private:
 
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/HistoryModel.cpp b/src/HistoryModel.cpp
index 39f95a9393c8b034934ba0b272af842d31dc86a9..fbd09a13728d019542e87b51d2b41c2f89708c91 100644
--- a/src/HistoryModel.cpp
+++ b/src/HistoryModel.cpp
@@ -58,8 +58,8 @@ CallMap       HistoryModel::m_sHistoryCalls          ;
 HistoryModel::HistoryModel():m_HistoryInit(false)
 {
    ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
-   QVector< QMap<QString, QString> > history = configurationManager.getHistory();
-   foreach (MapStringString hc, history) {
+   const QVector< QMap<QString, QString> > history = configurationManager.getHistory();
+   foreach (const MapStringString& hc, history) {
       Call* pastCall = Call::buildHistoryCall(
                hc[ CALLID_KEY          ]         ,
                hc[ TIMESTAMP_START_KEY ].toUInt(),
@@ -158,4 +158,4 @@ const QStringList HistoryModel::getNumbersByPopularity()
    }
 
    return cl;
-} //getNumbersByPopularity
\ No newline at end of file
+} //getNumbersByPopularity
diff --git a/src/HistoryModel.h b/src/HistoryModel.h
index bbc850393080f4bafcfef4e3904312a4c38b5769..d3b638fed43e75c7b4b4f4ecfc0fc47b6c50e2fe 100644
--- a/src/HistoryModel.h
+++ b/src/HistoryModel.h
@@ -77,4 +77,4 @@ signals:
    void newHistoryCall          ( Call* call );
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/InstantMessagingModel.cpp b/src/InstantMessagingModel.cpp
index 8417e07f16b4880bf3024d05683d213b356394eb..5c7c8c697df724c5288c377d5efc4893662d8615 100644
--- a/src/InstantMessagingModel.cpp
+++ b/src/InstantMessagingModel.cpp
@@ -17,6 +17,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA *
  ***********************************************************************************/
 #include "InstantMessagingModel.h"
+
 #include "CallModel.h"
 #include "callmanager_interface_singleton.h"
 #include "Call.h"
@@ -123,4 +124,4 @@ void InstantMessagingModel::addOutgoingMessage(QString message)
    im.message = message;
    m_lMessages << im;
    emit dataChanged(index(m_lMessages.size() -1,0), index(m_lMessages.size()-1,0));
-}
\ No newline at end of file
+}
diff --git a/src/InstantMessagingModel.h b/src/InstantMessagingModel.h
index c4123e448b7bf741e10c1971a6aca0eb8a1b1c9f..81a1e38a04d01e8aed3afe2339553e486c3106d1 100644
--- a/src/InstantMessagingModel.h
+++ b/src/InstantMessagingModel.h
@@ -52,7 +52,7 @@ public:
    }
    InstantMessagingModel* getModel(Call* call);
 private:
-   InstantMessagingModelManager();
+   explicit InstantMessagingModelManager();
    static InstantMessagingModelManager* m_spInstance;
    static CallModelBase* m_spCallModel;
    QHash<QString,InstantMessagingModel*> m_lModels;
@@ -75,7 +75,7 @@ public:
    static const int MESSAGE_IMAGE_ROLE   = 103;
    static const int MESSAGE_CONTACT_ROLE = 104;
 
-   InstantMessagingModel(Call* call, QObject* parent = nullptr);
+   explicit InstantMessagingModel(Call* call, QObject* parent = nullptr);
    QVariant      data     ( const QModelIndex& index, int role = Qt::DisplayRole     ) const;
    int           rowCount ( const QModelIndex& parent = QModelIndex()                ) const;
    Qt::ItemFlags flags    ( const QModelIndex& index                                 ) const;
@@ -95,4 +95,4 @@ private:
 
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/VideoCodecModel.cpp b/src/VideoCodecModel.cpp
index b8f32f9f6d49a4876136532a700c79ffa31b4047..8196ce25a2767ed58b53547124e9cb820c5eb82f 100644
--- a/src/VideoCodecModel.cpp
+++ b/src/VideoCodecModel.cpp
@@ -76,8 +76,8 @@ void VideoCodecModel::reload()
 {
    m_lCodecs.clear();
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
-   VectorMapStringString codecs =  interface.getCodecs(m_pAccount->getAccountId());
-   foreach(MapStringString h,codecs) {
+   const VectorMapStringString codecs =  interface.getCodecs(m_pAccount->getAccountId());
+   foreach(const MapStringString& h,codecs) {
       VideoCodec* c = new VideoCodec(h["name"],h["bitrate"].toInt(),h["enabled"]=="true");
       m_lCodecs << c;
    }
@@ -164,4 +164,4 @@ void VideoCodec::setBitrate(const uint bitrate)
 void VideoCodec::setEnabled(const bool enabled)
 {
    m_Enabled = enabled;
-}
\ No newline at end of file
+}
diff --git a/src/VideoCodecModel.h b/src/VideoCodecModel.h
index 6a5c59f09ef8851fadd5e1aeaa87c981f84c167e..d87f4638a76fd88556f3147d80ae31bf5482102a 100644
--- a/src/VideoCodecModel.h
+++ b/src/VideoCodecModel.h
@@ -88,4 +88,4 @@ class LIB_EXPORT VideoCodec {
       bool    m_Enabled;
       static bool m_sInit;
 };
-#endif
\ No newline at end of file
+#endif
diff --git a/src/VideoDevice.cpp b/src/VideoDevice.cpp
index 68dd69244832829c3530e27b237a222bb8419f50..e43c56b3ccb218502fcfb5de5aa9bdf9b4998bb0 100644
--- a/src/VideoDevice.cpp
+++ b/src/VideoDevice.cpp
@@ -28,12 +28,12 @@ VideoDevice::VideoDevice(QString id) : m_DeviceId(id)
 }
 
 ///Get the video device list
-QList<VideoDevice*> VideoDevice::getDeviceList()
+const QList<VideoDevice*> VideoDevice::getDeviceList()
 {
    QHash<QString,VideoDevice*> devices;
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
-   QStringList deviceList = interface.getDeviceList();
-   foreach(QString device,deviceList) {
+   const QStringList deviceList = interface.getDeviceList();
+   foreach(const QString& device,deviceList) {
       if (!m_slDevices[device])
          devices[device] = new VideoDevice(device);
       else
@@ -55,14 +55,14 @@ VideoDevice* VideoDevice::getDevice(QString name)
 }
 
 ///Get the valid rates for this device
-QStringList VideoDevice::getRateList(VideoChannel channel, Resolution resolution)
+const QStringList VideoDevice::getRateList(VideoChannel channel, Resolution resolution)
 {
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    return interface.getDeviceRateList(m_DeviceId,channel,resolution.toString());
 }
 
 ///Get the valid channel list
-QList<VideoChannel> VideoDevice::getChannelList()
+const QList<VideoChannel> VideoDevice::getChannelList()
 {
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    return interface.getDeviceChannelList(m_DeviceId);
@@ -90,39 +90,40 @@ void VideoDevice::setChannel(VideoChannel channel) //??? No device
 }
 
 ///Get the current resolution
-Resolution VideoDevice::getResolution()
+const Resolution VideoDevice::getResolution()
 {
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    return Resolution(interface.getActiveDeviceSize());
 }
 
 ///Get the current channel
-VideoChannel VideoDevice::getChannel() //??? No device
+const VideoChannel VideoDevice::getChannel() //??? No device
 {
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    return interface.getActiveDeviceChannel();
 }
 
 ///Get the current rate
-VideoRate VideoDevice::getRate()
+const VideoRate VideoDevice::getRate()
 {
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
    return interface.getActiveDeviceRate();
 }
 
 ///Get a list of valid resolution
-QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel)
+const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel)
 {
    QList<Resolution> toReturn;
    VideoInterface& interface = VideoInterfaceSingleton::getInstance();
-   QStringList list = interface.getDeviceSizeList(m_DeviceId,channel);
-   foreach(QString res,list) {
+   const QStringList list = interface.getDeviceSizeList(m_DeviceId,channel);
+   foreach(const QString& res,list) {
       toReturn << Resolution(res);
    }
    return toReturn;
 }
 
-QString VideoDevice::getDeviceId()
+///Get the device id
+const QString VideoDevice::getDeviceId() const
 {
    return m_DeviceId;
-}
\ No newline at end of file
+}
diff --git a/src/VideoDevice.h b/src/VideoDevice.h
index e34573137151060aeccb281e77f1dd8359959139..6fcebe1e4b6e1bdac62e5442a5bb460c34114b55 100644
--- a/src/VideoDevice.h
+++ b/src/VideoDevice.h
@@ -42,7 +42,7 @@ struct LIB_EXPORT Resolution {
    Resolution(const Resolution& res):width(res.width),height(res.height){}
    Resolution(const QSize& size):width(size.width()),height(size.height()){}
    //Getter
-   QString toString() { return QString::number(width)+"x"+QString::number(height);}
+   const QString toString() const { return QString::number(width)+"x"+QString::number(height);}
 
    //Attributes
    uint width;
@@ -61,16 +61,16 @@ class LIB_EXPORT VideoDevice {
       static VideoDevice* getDevice(QString id);
 
       //Getter
-      QStringList                getRateList(VideoChannel channel, Resolution resolution);
-      QList<Resolution>          getResolutionList(VideoChannel channel);
-      QList<VideoChannel>        getChannelList ();
-      Resolution                 getResolution  ();
-      VideoChannel               getChannel     ();
-      VideoRate                  getRate        ();
-      QString                    getDeviceId    ();
+      const QStringList         getRateList(VideoChannel channel, Resolution resolution);
+      const QList<Resolution>   getResolutionList(VideoChannel channel);
+      const QList<VideoChannel> getChannelList ();
+      const Resolution          getResolution  ();
+      const VideoChannel        getChannel     ();
+      const VideoRate           getRate        ();
+      const QString             getDeviceId    () const;
       
       //Static getter
-      static QList<VideoDevice*> getDeviceList();
+      static const QList<VideoDevice*> getDeviceList();
 
       //Setter
       void setRate       ( VideoRate rate        );
@@ -85,4 +85,4 @@ class LIB_EXPORT VideoDevice {
       static QHash<QString,VideoDevice*> m_slDevices;
       static bool m_sInit;
 };
-#endif
\ No newline at end of file
+#endif
diff --git a/src/VideoModel.cpp b/src/VideoModel.cpp
index b792881a8370baf2a08b9125dad7cd233c62a17c..4330249027865dc9b0cf5bc581e41997a031f12a 100644
--- a/src/VideoModel.cpp
+++ b/src/VideoModel.cpp
@@ -164,4 +164,4 @@ void VideoModel::stoppedDecoding(QString id, QString shmPath)
    emit videoStopped();
 //    if (m_pTimer)
 //       m_pTimer->stop();
-}
\ No newline at end of file
+}
diff --git a/src/VideoModel.h b/src/VideoModel.h
index 511efaf43a07435c7a30e00777a0ba4c26ca671f..8eb56520100db000b7e6bc0d187d0dc293c83301 100644
--- a/src/VideoModel.h
+++ b/src/VideoModel.h
@@ -81,4 +81,4 @@ signals:
    void videoCallInitiated(VideoRenderer*);
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/VideoRenderer.cpp b/src/VideoRenderer.cpp
index 9071ae4d0ae527b99d78e99a9b619f0ad102c4f3..0a502e43db94a52d8acfef8ce17f9501b1279844 100644
--- a/src/VideoRenderer.cpp
+++ b/src/VideoRenderer.cpp
@@ -308,4 +308,4 @@ void VideoRenderer::setResolution(QSize size)
 void VideoRenderer::setShmPath(QString path)
 {
    m_ShmPath = path;
-}
\ No newline at end of file
+}
diff --git a/src/VideoRenderer.h b/src/VideoRenderer.h
index bfbfa45ef10762d82ebe80d06645638c39fc756a..5c647d38d16455b577d5f01540e8e7d6594e3e1f 100644
--- a/src/VideoRenderer.h
+++ b/src/VideoRenderer.h
@@ -90,4 +90,4 @@ class LIB_EXPORT VideoRenderer : public QObject {
 
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/configurationmanager_interface_singleton.cpp b/src/configurationmanager_interface_singleton.cpp
index e177272326a9aa10b931514c3eebddb597524ed2..37628d74490dab5260f504a9506831ea548f3580 100644
--- a/src/configurationmanager_interface_singleton.cpp
+++ b/src/configurationmanager_interface_singleton.cpp
@@ -34,4 +34,3 @@ ConfigurationManagerInterface & ConfigurationManagerInterfaceSingleton::getInsta
    }
    return *interface;
 }
-
diff --git a/src/dbus/metatypes.h b/src/dbus/metatypes.h
index e86ef685c20adee93d7f4baf5b15df9d2623b7c4..a059e542d18cb64cbe7a37ef80d77e0e1fd7a6ff 100644
--- a/src/dbus/metatypes.h
+++ b/src/dbus/metatypes.h
@@ -26,4 +26,4 @@ inline void registerCommTypes() {
    dbus_metaTypeInit = true;
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/sflphone_const.h b/src/sflphone_const.h
index 3b4fa6c113a6dc66db717e3a30038323b122f5e1..f7b69856a50b811596222bfe7b93fc5d15d20a37 100644
--- a/src/sflphone_const.h
+++ b/src/sflphone_const.h
@@ -312,4 +312,4 @@ static const QString empty("");
 #define TIMESTAMP_STOP_KEY    "timestamp_stop"
 #define MISSED_STRING         "missed"
 #define INCOMING_STRING       "incoming"
-#define OUTGOING_STRING       "outgoing"
\ No newline at end of file
+#define OUTGOING_STRING       "outgoing"
diff --git a/src/typedefs.h b/src/typedefs.h
index d8bf6c89fb39cae34cd89bf4e14d2328e7d2d6af..e2241ae84719d27ba8784fc84dda3b1a088a772b 100644
--- a/src/typedefs.h
+++ b/src/typedefs.h
@@ -52,4 +52,4 @@ typedef QMap<QString, int> MapStringInt;
 #endif
 
 
-#endif
\ No newline at end of file
+#endif