diff --git a/src/app/App.cpp b/src/app/App.cpp index 998a994ab..f6b684171 100644 --- a/src/app/App.cpp +++ b/src/app/App.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "config.h" diff --git a/src/app/logger/Logger.cpp b/src/app/logger/Logger.cpp index 8c6addaa6..4221a581e 100644 --- a/src/app/logger/Logger.cpp +++ b/src/app/logger/Logger.cpp @@ -159,7 +159,7 @@ void Logger::enable (bool status) { linphone_core_enable_log_collection(status ? LinphoneLogCollectionEnabled : LinphoneLogCollectionDisabled); } -void Logger::init (const std::shared_ptr &config) { +void Logger::init (const shared_ptr &config) { if (mInstance) return; diff --git a/src/app/paths/Paths.hpp b/src/app/paths/Paths.hpp index fbd9e9b1e..e12a6cc22 100644 --- a/src/app/paths/Paths.hpp +++ b/src/app/paths/Paths.hpp @@ -23,35 +23,33 @@ #ifndef PATHS_H_ #define PATHS_H_ -#include - #include // ============================================================================= namespace Paths { -bool filePathExists (const std::string &path); + bool filePathExists (const std::string &path); -std::string getAssistantConfigDirPath (); -std::string getAvatarsDirPath (); -std::string getCallHistoryFilePath (); -std::string getCapturesDirPath (); -std::string getConfigFilePath (const QString &configPath = QString(), bool writable = true); -std::string getFactoryConfigFilePath (); -std::string getFriendsListFilePath (); -std::string getDownloadDirPath (); -std::string getLogsDirPath (); -std::string getMessageHistoryFilePath (); -std::string getPackageDataDirPath (); -std::string getPackageMsPluginsDirPath (); -std::string getPluginsDirPath (); -std::string getRootCaFilePath (); -std::string getThumbnailsDirPath (); -std::string getUserCertificatesDirPath (); -std::string getZrtpDataFilePath (); -std::string getZrtpSecretsFilePath (); + std::string getAssistantConfigDirPath (); + std::string getAvatarsDirPath (); + std::string getCallHistoryFilePath (); + std::string getCapturesDirPath (); + std::string getConfigFilePath (const QString &configPath = QString(), bool writable = true); + std::string getFactoryConfigFilePath (); + std::string getFriendsListFilePath (); + std::string getDownloadDirPath (); + std::string getLogsDirPath (); + std::string getMessageHistoryFilePath (); + std::string getPackageDataDirPath (); + std::string getPackageMsPluginsDirPath (); + std::string getPluginsDirPath (); + std::string getRootCaFilePath (); + std::string getThumbnailsDirPath (); + std::string getUserCertificatesDirPath (); + std::string getZrtpDataFilePath (); + std::string getZrtpSecretsFilePath (); -void migrate (); + void migrate (); } #endif // PATHS_H_ diff --git a/src/components/Components.hpp b/src/components/Components.hpp index f0d94b168..651bb3694 100644 --- a/src/components/Components.hpp +++ b/src/components/Components.hpp @@ -33,6 +33,7 @@ #include "codecs/AudioCodecsModel.hpp" #include "codecs/VideoCodecsModel.hpp" #include "conference/ConferenceAddModel.hpp" +#include "conference/ConferenceModel.hpp" #include "contacts/ContactsListProxyModel.hpp" #include "core/CoreManager.hpp" #include "presence/OwnPresenceModel.hpp" diff --git a/src/components/call/CallModel.cpp b/src/components/call/CallModel.cpp index 1c48b59fd..a2bcc9b46 100644 --- a/src/components/call/CallModel.cpp +++ b/src/components/call/CallModel.cpp @@ -21,7 +21,6 @@ */ #include -#include #include #include "../../app/App.hpp" diff --git a/src/components/calls/CallsListModel.cpp b/src/components/calls/CallsListModel.cpp index d8515a293..41897885d 100644 --- a/src/components/calls/CallsListModel.cpp +++ b/src/components/calls/CallsListModel.cpp @@ -20,12 +20,10 @@ * Author: Ronan Abhamon */ -#include #include #include "../../app/App.hpp" #include "../../utils/Utils.hpp" -#include "../conference/ConferenceHelperModel.hpp" #include "../core/CoreManager.hpp" #include "CallsListModel.hpp" diff --git a/src/components/camera/Camera.cpp b/src/components/camera/Camera.cpp index 46cd1fddf..988e7de64 100644 --- a/src/components/camera/Camera.cpp +++ b/src/components/camera/Camera.cpp @@ -20,6 +20,7 @@ * Author: Ronan Abhamon */ +#include #include #include #include diff --git a/src/components/camera/Camera.hpp b/src/components/camera/Camera.hpp index cc27a62fb..736127bec 100644 --- a/src/components/camera/Camera.hpp +++ b/src/components/camera/Camera.hpp @@ -25,7 +25,6 @@ #include -#include #include // ============================================================================= @@ -58,7 +57,7 @@ private: bool mIsPreview = false; std::shared_ptr mCall; - QQuickWindow *mWindow; + QQuickWindow *mWindow = nullptr; }; // ----------------------------------------------------------------------------- @@ -91,7 +90,7 @@ private: bool mIsPreview = false; CallModel *mCallModel = nullptr; - QTimer *mRefreshTimer; + QTimer *mRefreshTimer = nullptr; }; #endif // CAMERA_H_ diff --git a/src/components/camera/CameraPreview.cpp b/src/components/camera/CameraPreview.cpp index ef6ae16b0..e58be5d63 100644 --- a/src/components/camera/CameraPreview.cpp +++ b/src/components/camera/CameraPreview.cpp @@ -20,6 +20,7 @@ * Author: Ronan Abhamon */ +#include #include #include #include diff --git a/src/components/camera/CameraPreview.hpp b/src/components/camera/CameraPreview.hpp index 478873d91..91b371cbe 100644 --- a/src/components/camera/CameraPreview.hpp +++ b/src/components/camera/CameraPreview.hpp @@ -24,7 +24,6 @@ #define CAMERA_PREVIEW_H_ #include -#include #include // ============================================================================= @@ -50,7 +49,7 @@ private: ContextInfo *mContextInfo; bool mUpdateContextInfo = false; - QQuickWindow *mWindow; + QQuickWindow *mWindow = nullptr; }; // ----------------------------------------------------------------------------- @@ -67,7 +66,7 @@ public: QQuickFramebufferObject::Renderer *createRenderer () const override; private: - QTimer *mRefreshTimer; + QTimer *mRefreshTimer = nullptr; static QMutex mCounterMutex; static int mCounter; diff --git a/src/components/chat/ChatModel.cpp b/src/components/chat/ChatModel.cpp index 3b644d7f4..01a17723c 100644 --- a/src/components/chat/ChatModel.cpp +++ b/src/components/chat/ChatModel.cpp @@ -24,9 +24,7 @@ #include #include -#include #include -#include #include #include diff --git a/src/components/conference/ConferenceAddModel.hpp b/src/components/conference/ConferenceAddModel.hpp index 60187bad3..e986e7130 100644 --- a/src/components/conference/ConferenceAddModel.hpp +++ b/src/components/conference/ConferenceAddModel.hpp @@ -23,10 +23,7 @@ #ifndef CONFERENCE_ADD_MODEL_H_ #define CONFERENCE_ADD_MODEL_H_ -#include - #include "ConferenceHelperModel.hpp" -#include "ConferenceModel.hpp" // ============================================================================= // Sip addresses list to add to conference. @@ -71,7 +68,7 @@ private: QHash mSipAddresses; QList mRefs; - ConferenceHelperModel *mConferenceHelperModel; + ConferenceHelperModel *mConferenceHelperModel = nullptr; }; Q_DECLARE_METATYPE(std::shared_ptr ); diff --git a/src/components/conference/ConferenceHelperModel.hpp b/src/components/conference/ConferenceHelperModel.hpp index a1297390a..afde60c30 100644 --- a/src/components/conference/ConferenceHelperModel.hpp +++ b/src/components/conference/ConferenceHelperModel.hpp @@ -64,7 +64,7 @@ private: return mConferenceAddModel; } - ConferenceAddModel *mConferenceAddModel; + ConferenceAddModel *mConferenceAddModel = nullptr; std::shared_ptr mCore; std::shared_ptr mConference; diff --git a/src/components/contact/ContactModel.cpp b/src/components/contact/ContactModel.cpp index e59f4b5c8..4c189b6c7 100644 --- a/src/components/contact/ContactModel.cpp +++ b/src/components/contact/ContactModel.cpp @@ -20,8 +20,6 @@ * Author: Ronan Abhamon */ -#include - #include "../../app/App.hpp" #include "ContactModel.hpp" diff --git a/src/components/contact/VcardModel.cpp b/src/components/contact/VcardModel.cpp index 53eeea305..c8f5d7dd0 100644 --- a/src/components/contact/VcardModel.cpp +++ b/src/components/contact/VcardModel.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "../../app/App.hpp" diff --git a/src/components/contacts/ContactsListModel.cpp b/src/components/contacts/ContactsListModel.cpp index b70938013..5fca467b3 100644 --- a/src/components/contacts/ContactsListModel.cpp +++ b/src/components/contacts/ContactsListModel.cpp @@ -20,10 +20,7 @@ * Author: Ronan Abhamon */ -#include - #include "../../app/App.hpp" -#include "../../utils/Utils.hpp" #include "../core/CoreManager.hpp" #include "ContactsListModel.hpp" diff --git a/src/components/contacts/ContactsListProxyModel.cpp b/src/components/contacts/ContactsListProxyModel.cpp index e616f5715..11c6ac442 100644 --- a/src/components/contacts/ContactsListProxyModel.cpp +++ b/src/components/contacts/ContactsListProxyModel.cpp @@ -22,8 +22,6 @@ #include -#include - #include "../../utils/Utils.hpp" #include "../core/CoreManager.hpp" diff --git a/src/components/core/CoreManager.hpp b/src/components/core/CoreManager.hpp index 6ced604bd..f43086954 100644 --- a/src/components/core/CoreManager.hpp +++ b/src/components/core/CoreManager.hpp @@ -23,11 +23,10 @@ #ifndef CORE_MANAGER_H_ #define CORE_MANAGER_H_ -#include #include -#include #include "../calls/CallsListModel.hpp" +#include "../chat/ChatModel.hpp" #include "../contacts/ContactsListModel.hpp" #include "../settings/AccountSettingsModel.hpp" #include "../settings/SettingsModel.hpp" @@ -152,15 +151,15 @@ private: std::shared_ptr mCore; std::shared_ptr mHandlers; - CallsListModel *mCallsListModel; - ContactsListModel *mContactsListModel; - SipAddressesModel *mSipAddressesModel; - SettingsModel *mSettingsModel; - AccountSettingsModel *mAccountSettingsModel; + CallsListModel *mCallsListModel = nullptr; + ContactsListModel *mContactsListModel = nullptr; + SipAddressesModel *mSipAddressesModel = nullptr; + SettingsModel *mSettingsModel = nullptr; + AccountSettingsModel *mAccountSettingsModel = nullptr; QHash > mChatModels; - QTimer *mCbsTimer; + QTimer *mCbsTimer = nullptr; QFuture mPromiseBuild; QFutureWatcher mPromiseWatcher; diff --git a/src/components/notifier/Notifier.cpp b/src/components/notifier/Notifier.cpp index b437d88cc..d06657bd4 100644 --- a/src/components/notifier/Notifier.cpp +++ b/src/components/notifier/Notifier.cpp @@ -20,11 +20,8 @@ * Author: Ronan Abhamon */ -#include #include -#include #include -#include #include #include "../../app/App.hpp" diff --git a/src/components/other/colors/Colors.cpp b/src/components/other/colors/Colors.cpp index 4c2d457e7..f83e4d9ba 100644 --- a/src/components/other/colors/Colors.cpp +++ b/src/components/other/colors/Colors.cpp @@ -46,7 +46,7 @@ using namespace std; Colors::Colors (QObject *parent) : QObject(parent) { #if LINPHONE_FRIDAY - if (isLinphoneFriday()) { + if (::isLinphoneFriday()) { setProperty("i", QColor("#F48D8D")); setProperty("s", QColor("#F58585")); setProperty("t", QColor("#FFC5C5")); @@ -54,9 +54,9 @@ Colors::Colors (QObject *parent) : QObject(parent) { #endif // if LINPHONE_FRIDAY } -void Colors::useConfig (const std::shared_ptr &config) { +void Colors::useConfig (const shared_ptr &config) { #if LINPHONE_FRIDAY - if (!isLinphoneFriday()) + if (!::isLinphoneFriday()) overrideColors(config); #else overrideColors(config); diff --git a/src/components/presence/OwnPresenceModel.cpp b/src/components/presence/OwnPresenceModel.cpp index 64cda73d2..c090d47ec 100644 --- a/src/components/presence/OwnPresenceModel.cpp +++ b/src/components/presence/OwnPresenceModel.cpp @@ -20,9 +20,6 @@ * Author: Ghislain MARY */ -#include - -#include "../../utils/Utils.hpp" #include "../core/CoreManager.hpp" #include "OwnPresenceModel.hpp" diff --git a/src/components/presence/OwnPresenceModel.hpp b/src/components/presence/OwnPresenceModel.hpp index d8aa0d184..1bfcaedca 100644 --- a/src/components/presence/OwnPresenceModel.hpp +++ b/src/components/presence/OwnPresenceModel.hpp @@ -23,8 +23,6 @@ #ifndef OWN_PRESENCE_MODEL_H_ #define OWN_PRESENCE_MODEL_H_ -#include - #include "../presence/Presence.hpp" // ============================================================================= diff --git a/src/components/presence/Presence.cpp b/src/components/presence/Presence.cpp index d9331a9a0..38aa17a24 100644 --- a/src/components/presence/Presence.cpp +++ b/src/components/presence/Presence.cpp @@ -20,8 +20,6 @@ * Author: Ghislain MARY */ -#include - #include "Presence.hpp" // ============================================================================= diff --git a/src/components/settings/AccountSettingsModel.cpp b/src/components/settings/AccountSettingsModel.cpp index 63980f322..97f110aeb 100644 --- a/src/components/settings/AccountSettingsModel.cpp +++ b/src/components/settings/AccountSettingsModel.cpp @@ -20,8 +20,6 @@ * Author: Ronan Abhamon */ -#include - #include "../../utils/Utils.hpp" #include "../core/CoreManager.hpp" diff --git a/src/components/settings/SettingsModel.cpp b/src/components/settings/SettingsModel.cpp index 0d908325a..5e3d1c829 100644 --- a/src/components/settings/SettingsModel.cpp +++ b/src/components/settings/SettingsModel.cpp @@ -778,6 +778,6 @@ QString SettingsModel::getLogsFolder (const shared_ptr &config ); } -bool SettingsModel::getLogsEnabled (const std::shared_ptr &config) { +bool SettingsModel::getLogsEnabled (const shared_ptr &config) { return config->getInt(UI_SECTION, "logs_enabled", false); } diff --git a/src/components/sip-addresses/SipAddressesModel.cpp b/src/components/sip-addresses/SipAddressesModel.cpp index f3e31cb59..c2fcaf0d8 100644 --- a/src/components/sip-addresses/SipAddressesModel.cpp +++ b/src/components/sip-addresses/SipAddressesModel.cpp @@ -21,12 +21,9 @@ */ #include -#include -#include #include "../../utils/LinphoneUtils.hpp" #include "../../utils/Utils.hpp" -#include "../chat/ChatModel.hpp" #include "../core/CoreManager.hpp" #include "SipAddressesModel.hpp" @@ -213,7 +210,7 @@ bool SipAddressesModel::removeRows (int row, int count, const QModelIndex &paren // ----------------------------------------------------------------------------- -void SipAddressesModel::handleChatModelCreated (const std::shared_ptr &chatModel) { +void SipAddressesModel::handleChatModelCreated (const shared_ptr &chatModel) { ChatModel *ptr = chatModel.get(); QObject::connect(ptr, &ChatModel::allEntriesRemoved, this, [this, ptr] { diff --git a/src/components/sip-addresses/SipAddressesModel.hpp b/src/components/sip-addresses/SipAddressesModel.hpp index 782b11e32..dacee0566 100644 --- a/src/components/sip-addresses/SipAddressesModel.hpp +++ b/src/components/sip-addresses/SipAddressesModel.hpp @@ -26,12 +26,11 @@ #include #include -#include "../chat/ChatModel.hpp" -#include "../contact/ContactModel.hpp" #include "SipAddressObserver.hpp" // ============================================================================= +class ChatModel; class CoreHandlers; class SipAddressesModel : public QAbstractListModel { diff --git a/src/components/sound-player/SoundPlayer.hpp b/src/components/sound-player/SoundPlayer.hpp index 88503281e..1408d6579 100644 --- a/src/components/sound-player/SoundPlayer.hpp +++ b/src/components/sound-player/SoundPlayer.hpp @@ -99,7 +99,7 @@ private: bool mForceClose = false; QMutex mForceCloseMutex; - QTimer *mForceCloseTimer; + QTimer *mForceCloseTimer = nullptr; std::shared_ptr mInternalPlayer; std::shared_ptr mHandlers; diff --git a/src/components/timeline/TimelineModel.cpp b/src/components/timeline/TimelineModel.cpp index ef1b2dfc8..8d9baf6d9 100644 --- a/src/components/timeline/TimelineModel.cpp +++ b/src/components/timeline/TimelineModel.cpp @@ -20,8 +20,6 @@ * Author: Ronan Abhamon */ -#include - #include "../core/CoreManager.hpp" #include "TimelineModel.hpp" diff --git a/src/main.cpp b/src/main.cpp index 62de1b487..1e8be9848 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include "gitversion.h"