Commit e04cdfd7 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(App): clean imports and misc

parent edf80196
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <QMenu> #include <QMenu>
#include <QQmlFileSelector> #include <QQmlFileSelector>
#include <QSystemTrayIcon> #include <QSystemTrayIcon>
#include <QtDebug>
#include <QTimer> #include <QTimer>
#include "config.h" #include "config.h"
......
...@@ -159,7 +159,7 @@ void Logger::enable (bool status) { ...@@ -159,7 +159,7 @@ void Logger::enable (bool status) {
linphone_core_enable_log_collection(status ? LinphoneLogCollectionEnabled : LinphoneLogCollectionDisabled); linphone_core_enable_log_collection(status ? LinphoneLogCollectionEnabled : LinphoneLogCollectionDisabled);
} }
void Logger::init (const std::shared_ptr<linphone::Config> &config) { void Logger::init (const shared_ptr<linphone::Config> &config) {
if (mInstance) if (mInstance)
return; return;
......
...@@ -23,35 +23,33 @@ ...@@ -23,35 +23,33 @@
#ifndef PATHS_H_ #ifndef PATHS_H_
#define PATHS_H_ #define PATHS_H_
#include <string>
#include <QString> #include <QString>
// ============================================================================= // =============================================================================
namespace Paths { namespace Paths {
bool filePathExists (const std::string &path); bool filePathExists (const std::string &path);
std::string getAssistantConfigDirPath (); std::string getAssistantConfigDirPath ();
std::string getAvatarsDirPath (); std::string getAvatarsDirPath ();
std::string getCallHistoryFilePath (); std::string getCallHistoryFilePath ();
std::string getCapturesDirPath (); std::string getCapturesDirPath ();
std::string getConfigFilePath (const QString &configPath = QString(), bool writable = true); std::string getConfigFilePath (const QString &configPath = QString(), bool writable = true);
std::string getFactoryConfigFilePath (); std::string getFactoryConfigFilePath ();
std::string getFriendsListFilePath (); std::string getFriendsListFilePath ();
std::string getDownloadDirPath (); std::string getDownloadDirPath ();
std::string getLogsDirPath (); std::string getLogsDirPath ();
std::string getMessageHistoryFilePath (); std::string getMessageHistoryFilePath ();
std::string getPackageDataDirPath (); std::string getPackageDataDirPath ();
std::string getPackageMsPluginsDirPath (); std::string getPackageMsPluginsDirPath ();
std::string getPluginsDirPath (); std::string getPluginsDirPath ();
std::string getRootCaFilePath (); std::string getRootCaFilePath ();
std::string getThumbnailsDirPath (); std::string getThumbnailsDirPath ();
std::string getUserCertificatesDirPath (); std::string getUserCertificatesDirPath ();
std::string getZrtpDataFilePath (); std::string getZrtpDataFilePath ();
std::string getZrtpSecretsFilePath (); std::string getZrtpSecretsFilePath ();
void migrate (); void migrate ();
} }
#endif // PATHS_H_ #endif // PATHS_H_
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "codecs/AudioCodecsModel.hpp" #include "codecs/AudioCodecsModel.hpp"
#include "codecs/VideoCodecsModel.hpp" #include "codecs/VideoCodecsModel.hpp"
#include "conference/ConferenceAddModel.hpp" #include "conference/ConferenceAddModel.hpp"
#include "conference/ConferenceModel.hpp"
#include "contacts/ContactsListProxyModel.hpp" #include "contacts/ContactsListProxyModel.hpp"
#include "core/CoreManager.hpp" #include "core/CoreManager.hpp"
#include "presence/OwnPresenceModel.hpp" #include "presence/OwnPresenceModel.hpp"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
*/ */
#include <QDateTime> #include <QDateTime>
#include <QtDebug>
#include <QTimer> #include <QTimer>
#include "../../app/App.hpp" #include "../../app/App.hpp"
......
...@@ -20,12 +20,10 @@ ...@@ -20,12 +20,10 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QDebug>
#include <QTimer> #include <QTimer>
#include "../../app/App.hpp" #include "../../app/App.hpp"
#include "../../utils/Utils.hpp" #include "../../utils/Utils.hpp"
#include "../conference/ConferenceHelperModel.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
#include "CallsListModel.hpp" #include "CallsListModel.hpp"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QOpenGLFramebufferObject>
#include <QQuickWindow> #include <QQuickWindow>
#include <QThread> #include <QThread>
#include <QTimer> #include <QTimer>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <memory> #include <memory>
#include <QOpenGLFramebufferObject>
#include <QQuickFramebufferObject> #include <QQuickFramebufferObject>
// ============================================================================= // =============================================================================
...@@ -58,7 +57,7 @@ private: ...@@ -58,7 +57,7 @@ private:
bool mIsPreview = false; bool mIsPreview = false;
std::shared_ptr<linphone::Call> mCall; std::shared_ptr<linphone::Call> mCall;
QQuickWindow *mWindow; QQuickWindow *mWindow = nullptr;
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -91,7 +90,7 @@ private: ...@@ -91,7 +90,7 @@ private:
bool mIsPreview = false; bool mIsPreview = false;
CallModel *mCallModel = nullptr; CallModel *mCallModel = nullptr;
QTimer *mRefreshTimer; QTimer *mRefreshTimer = nullptr;
}; };
#endif // CAMERA_H_ #endif // CAMERA_H_
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QOpenGLFramebufferObject>
#include <QQuickWindow> #include <QQuickWindow>
#include <QThread> #include <QThread>
#include <QTimer> #include <QTimer>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#define CAMERA_PREVIEW_H_ #define CAMERA_PREVIEW_H_
#include <QMutex> #include <QMutex>
#include <QOpenGLFramebufferObject>
#include <QQuickFramebufferObject> #include <QQuickFramebufferObject>
// ============================================================================= // =============================================================================
...@@ -50,7 +49,7 @@ private: ...@@ -50,7 +49,7 @@ private:
ContextInfo *mContextInfo; ContextInfo *mContextInfo;
bool mUpdateContextInfo = false; bool mUpdateContextInfo = false;
QQuickWindow *mWindow; QQuickWindow *mWindow = nullptr;
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -67,7 +66,7 @@ public: ...@@ -67,7 +66,7 @@ public:
QQuickFramebufferObject::Renderer *createRenderer () const override; QQuickFramebufferObject::Renderer *createRenderer () const override;
private: private:
QTimer *mRefreshTimer; QTimer *mRefreshTimer = nullptr;
static QMutex mCounterMutex; static QMutex mCounterMutex;
static int mCounter; static int mCounter;
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#include <QDateTime> #include <QDateTime>
#include <QDesktopServices> #include <QDesktopServices>
#include <QFileDialog>
#include <QFileInfo> #include <QFileInfo>
#include <QImage>
#include <QTimer> #include <QTimer>
#include <QUuid> #include <QUuid>
......
...@@ -23,10 +23,7 @@ ...@@ -23,10 +23,7 @@
#ifndef CONFERENCE_ADD_MODEL_H_ #ifndef CONFERENCE_ADD_MODEL_H_
#define CONFERENCE_ADD_MODEL_H_ #define CONFERENCE_ADD_MODEL_H_
#include <memory>
#include "ConferenceHelperModel.hpp" #include "ConferenceHelperModel.hpp"
#include "ConferenceModel.hpp"
// ============================================================================= // =============================================================================
// Sip addresses list to add to conference. // Sip addresses list to add to conference.
...@@ -71,7 +68,7 @@ private: ...@@ -71,7 +68,7 @@ private:
QHash<QString, QVariantMap> mSipAddresses; QHash<QString, QVariantMap> mSipAddresses;
QList<const QVariantMap *> mRefs; QList<const QVariantMap *> mRefs;
ConferenceHelperModel *mConferenceHelperModel; ConferenceHelperModel *mConferenceHelperModel = nullptr;
}; };
Q_DECLARE_METATYPE(std::shared_ptr<linphone::Address> ); Q_DECLARE_METATYPE(std::shared_ptr<linphone::Address> );
......
...@@ -64,7 +64,7 @@ private: ...@@ -64,7 +64,7 @@ private:
return mConferenceAddModel; return mConferenceAddModel;
} }
ConferenceAddModel *mConferenceAddModel; ConferenceAddModel *mConferenceAddModel = nullptr;
std::shared_ptr<linphone::Core> mCore; std::shared_ptr<linphone::Core> mCore;
std::shared_ptr<linphone::Conference> mConference; std::shared_ptr<linphone::Conference> mConference;
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QSet>
#include "../../app/App.hpp" #include "../../app/App.hpp"
#include "ContactModel.hpp" #include "ContactModel.hpp"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <belcard/belcard.hpp> #include <belcard/belcard.hpp>
#include <QFileInfo> #include <QFileInfo>
#include <QImageReader> #include <QImageReader>
#include <QtDebug>
#include <QUuid> #include <QUuid>
#include "../../app/App.hpp" #include "../../app/App.hpp"
......
...@@ -20,10 +20,7 @@ ...@@ -20,10 +20,7 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QtDebug>
#include "../../app/App.hpp" #include "../../app/App.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
#include "ContactsListModel.hpp" #include "ContactsListModel.hpp"
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <cmath> #include <cmath>
#include <QDebug>
#include "../../utils/Utils.hpp" #include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
......
...@@ -23,11 +23,10 @@ ...@@ -23,11 +23,10 @@
#ifndef CORE_MANAGER_H_ #ifndef CORE_MANAGER_H_
#define CORE_MANAGER_H_ #define CORE_MANAGER_H_
#include <QFuture>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QMutex>
#include "../calls/CallsListModel.hpp" #include "../calls/CallsListModel.hpp"
#include "../chat/ChatModel.hpp"
#include "../contacts/ContactsListModel.hpp" #include "../contacts/ContactsListModel.hpp"
#include "../settings/AccountSettingsModel.hpp" #include "../settings/AccountSettingsModel.hpp"
#include "../settings/SettingsModel.hpp" #include "../settings/SettingsModel.hpp"
...@@ -152,15 +151,15 @@ private: ...@@ -152,15 +151,15 @@ private:
std::shared_ptr<linphone::Core> mCore; std::shared_ptr<linphone::Core> mCore;
std::shared_ptr<CoreHandlers> mHandlers; std::shared_ptr<CoreHandlers> mHandlers;
CallsListModel *mCallsListModel; CallsListModel *mCallsListModel = nullptr;
ContactsListModel *mContactsListModel; ContactsListModel *mContactsListModel = nullptr;
SipAddressesModel *mSipAddressesModel; SipAddressesModel *mSipAddressesModel = nullptr;
SettingsModel *mSettingsModel; SettingsModel *mSettingsModel = nullptr;
AccountSettingsModel *mAccountSettingsModel; AccountSettingsModel *mAccountSettingsModel = nullptr;
QHash<QString, std::weak_ptr<ChatModel> > mChatModels; QHash<QString, std::weak_ptr<ChatModel> > mChatModels;
QTimer *mCbsTimer; QTimer *mCbsTimer = nullptr;
QFuture<void> mPromiseBuild; QFuture<void> mPromiseBuild;
QFutureWatcher<void> mPromiseWatcher; QFutureWatcher<void> mPromiseWatcher;
......
...@@ -20,11 +20,8 @@ ...@@ -20,11 +20,8 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QMutex>
#include <QQmlComponent> #include <QQmlComponent>
#include <QQuickWindow>
#include <QScreen> #include <QScreen>
#include <QtDebug>
#include <QTimer> #include <QTimer>
#include "../../app/App.hpp" #include "../../app/App.hpp"
......
...@@ -46,7 +46,7 @@ using namespace std; ...@@ -46,7 +46,7 @@ using namespace std;
Colors::Colors (QObject *parent) : QObject(parent) { Colors::Colors (QObject *parent) : QObject(parent) {
#if LINPHONE_FRIDAY #if LINPHONE_FRIDAY
if (isLinphoneFriday()) { if (::isLinphoneFriday()) {
setProperty("i", QColor("#F48D8D")); setProperty("i", QColor("#F48D8D"));
setProperty("s", QColor("#F58585")); setProperty("s", QColor("#F58585"));
setProperty("t", QColor("#FFC5C5")); setProperty("t", QColor("#FFC5C5"));
...@@ -54,9 +54,9 @@ Colors::Colors (QObject *parent) : QObject(parent) { ...@@ -54,9 +54,9 @@ Colors::Colors (QObject *parent) : QObject(parent) {
#endif // if LINPHONE_FRIDAY #endif // if LINPHONE_FRIDAY
} }
void Colors::useConfig (const std::shared_ptr<linphone::Config> &config) { void Colors::useConfig (const shared_ptr<linphone::Config> &config) {
#if LINPHONE_FRIDAY #if LINPHONE_FRIDAY
if (!isLinphoneFriday()) if (!::isLinphoneFriday())
overrideColors(config); overrideColors(config);
#else #else
overrideColors(config); overrideColors(config);
......
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
* Author: Ghislain MARY * Author: Ghislain MARY
*/ */
#include <QtDebug>
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
#include "OwnPresenceModel.hpp" #include "OwnPresenceModel.hpp"
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#ifndef OWN_PRESENCE_MODEL_H_ #ifndef OWN_PRESENCE_MODEL_H_
#define OWN_PRESENCE_MODEL_H_ #define OWN_PRESENCE_MODEL_H_
#include <QObject>
#include "../presence/Presence.hpp" #include "../presence/Presence.hpp"
// ============================================================================= // =============================================================================
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
* Author: Ghislain MARY * Author: Ghislain MARY
*/ */
#include <QtDebug>
#include "Presence.hpp" #include "Presence.hpp"
// ============================================================================= // =============================================================================
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QtDebug>
#include "../../utils/Utils.hpp" #include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
......
...@@ -778,6 +778,6 @@ QString SettingsModel::getLogsFolder (const shared_ptr<linphone::Config> &config ...@@ -778,6 +778,6 @@ QString SettingsModel::getLogsFolder (const shared_ptr<linphone::Config> &config
); );
} }
bool SettingsModel::getLogsEnabled (const std::shared_ptr<linphone::Config> &config) { bool SettingsModel::getLogsEnabled (const shared_ptr<linphone::Config> &config) {
return config->getInt(UI_SECTION, "logs_enabled", false); return config->getInt(UI_SECTION, "logs_enabled", false);
} }
...@@ -21,12 +21,9 @@ ...@@ -21,12 +21,9 @@
*/ */
#include <QDateTime> #include <QDateTime>
#include <QSet>
#include <QtDebug>
#include "../../utils/LinphoneUtils.hpp" #include "../../utils/LinphoneUtils.hpp"
#include "../../utils/Utils.hpp" #include "../../utils/Utils.hpp"
#include "../chat/ChatModel.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
#include "SipAddressesModel.hpp" #include "SipAddressesModel.hpp"
...@@ -213,7 +210,7 @@ bool SipAddressesModel::removeRows (int row, int count, const QModelIndex &paren ...@@ -213,7 +210,7 @@ bool SipAddressesModel::removeRows (int row, int count, const QModelIndex &paren
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SipAddressesModel::handleChatModelCreated (const std::shared_ptr<ChatModel> &chatModel) { void SipAddressesModel::handleChatModelCreated (const shared_ptr<ChatModel> &chatModel) {
ChatModel *ptr = chatModel.get(); ChatModel *ptr = chatModel.get();
QObject::connect(ptr, &ChatModel::allEntriesRemoved, this, [this, ptr] { QObject::connect(ptr, &ChatModel::allEntriesRemoved, this, [this, ptr] {
......
...@@ -26,12 +26,11 @@ ...@@ -26,12 +26,11 @@
#include <QAbstractListModel> #include <QAbstractListModel>
#include <QUrl> #include <QUrl>
#include "../chat/ChatModel.hpp"
#include "../contact/ContactModel.hpp"
#include "SipAddressObserver.hpp" #include "SipAddressObserver.hpp"
// ============================================================================= // =============================================================================
class ChatModel;
class CoreHandlers; class CoreHandlers;
class SipAddressesModel : public QAbstractListModel { class SipAddressesModel : public QAbstractListModel {
......
...@@ -99,7 +99,7 @@ private: ...@@ -99,7 +99,7 @@ private:
bool mForceClose = false; bool mForceClose = false;
QMutex mForceCloseMutex; QMutex mForceCloseMutex;
QTimer *mForceCloseTimer; QTimer *mForceCloseTimer = nullptr;
std::shared_ptr<linphone::Player> mInternalPlayer; std::shared_ptr<linphone::Player> mInternalPlayer;
std::shared_ptr<Handlers> mHandlers; std::shared_ptr<Handlers> mHandlers;
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
* Author: Ronan Abhamon * Author: Ronan Abhamon
*/ */
#include <QDateTime>
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
#include "TimelineModel.hpp" #include "TimelineModel.hpp"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <QDirIterator> #include <QDirIterator>
#include <QFontDatabase> #include <QFontDatabase>
#include <QMessageBox> #include <QMessageBox>
#include <QScreen>
#include "gitversion.h" #include "gitversion.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment