mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
fix(App): clean imports and misc
This commit is contained in:
parent
edf80196e6
commit
e04cdfd78a
30 changed files with 44 additions and 82 deletions
|
|
@ -26,7 +26,6 @@
|
|||
#include <QMenu>
|
||||
#include <QQmlFileSelector>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QtDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include "config.h"
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ void Logger::enable (bool status) {
|
|||
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)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,35 +23,33 @@
|
|||
#ifndef PATHS_H_
|
||||
#define PATHS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <QString>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
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_
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
*/
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QtDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
|
|
|
|||
|
|
@ -20,12 +20,10 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
#include "../../utils/Utils.hpp"
|
||||
#include "../conference/ConferenceHelperModel.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
#include "CallsListModel.hpp"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickWindow>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickFramebufferObject>
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -58,7 +57,7 @@ private:
|
|||
bool mIsPreview = false;
|
||||
std::shared_ptr<linphone::Call> 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_
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickWindow>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#define CAMERA_PREVIEW_H_
|
||||
|
||||
#include <QMutex>
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickFramebufferObject>
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include <QDateTime>
|
||||
#include <QDesktopServices>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QImage>
|
||||
#include <QTimer>
|
||||
#include <QUuid>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@
|
|||
#ifndef CONFERENCE_ADD_MODEL_H_
|
||||
#define CONFERENCE_ADD_MODEL_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ConferenceHelperModel.hpp"
|
||||
#include "ConferenceModel.hpp"
|
||||
|
||||
// =============================================================================
|
||||
// Sip addresses list to add to conference.
|
||||
|
|
@ -71,7 +68,7 @@ private:
|
|||
QHash<QString, QVariantMap> mSipAddresses;
|
||||
QList<const QVariantMap *> mRefs;
|
||||
|
||||
ConferenceHelperModel *mConferenceHelperModel;
|
||||
ConferenceHelperModel *mConferenceHelperModel = nullptr;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(std::shared_ptr<linphone::Address> );
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ private:
|
|||
return mConferenceAddModel;
|
||||
}
|
||||
|
||||
ConferenceAddModel *mConferenceAddModel;
|
||||
ConferenceAddModel *mConferenceAddModel = nullptr;
|
||||
|
||||
std::shared_ptr<linphone::Core> mCore;
|
||||
std::shared_ptr<linphone::Conference> mConference;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QSet>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
|
||||
#include "ContactModel.hpp"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <belcard/belcard.hpp>
|
||||
#include <QFileInfo>
|
||||
#include <QImageReader>
|
||||
#include <QtDebug>
|
||||
#include <QUuid>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
|
|
|
|||
|
|
@ -20,10 +20,7 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
#include "../../utils/Utils.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
#include "ContactsListModel.hpp"
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "../../utils/Utils.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,10 @@
|
|||
#ifndef CORE_MANAGER_H_
|
||||
#define CORE_MANAGER_H_
|
||||
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
#include <QMutex>
|
||||
|
||||
#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<linphone::Core> mCore;
|
||||
std::shared_ptr<CoreHandlers> 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<QString, std::weak_ptr<ChatModel> > mChatModels;
|
||||
|
||||
QTimer *mCbsTimer;
|
||||
QTimer *mCbsTimer = nullptr;
|
||||
|
||||
QFuture<void> mPromiseBuild;
|
||||
QFutureWatcher<void> mPromiseWatcher;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,8 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QMutex>
|
||||
#include <QQmlComponent>
|
||||
#include <QQuickWindow>
|
||||
#include <QScreen>
|
||||
#include <QtDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
|
|
|
|||
|
|
@ -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<linphone::Config> &config) {
|
||||
void Colors::useConfig (const shared_ptr<linphone::Config> &config) {
|
||||
#if LINPHONE_FRIDAY
|
||||
if (!isLinphoneFriday())
|
||||
if (!::isLinphoneFriday())
|
||||
overrideColors(config);
|
||||
#else
|
||||
overrideColors(config);
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@
|
|||
* Author: Ghislain MARY
|
||||
*/
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../../utils/Utils.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
#include "OwnPresenceModel.hpp"
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
#ifndef OWN_PRESENCE_MODEL_H_
|
||||
#define OWN_PRESENCE_MODEL_H_
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "../presence/Presence.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
* Author: Ghislain MARY
|
||||
*/
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#include "Presence.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../../utils/Utils.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,12 +21,9 @@
|
|||
*/
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QSet>
|
||||
#include <QtDebug>
|
||||
|
||||
#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> &chatModel) {
|
||||
void SipAddressesModel::handleChatModelCreated (const shared_ptr<ChatModel> &chatModel) {
|
||||
ChatModel *ptr = chatModel.get();
|
||||
|
||||
QObject::connect(ptr, &ChatModel::allEntriesRemoved, this, [this, ptr] {
|
||||
|
|
|
|||
|
|
@ -26,12 +26,11 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <QUrl>
|
||||
|
||||
#include "../chat/ChatModel.hpp"
|
||||
#include "../contact/ContactModel.hpp"
|
||||
#include "SipAddressObserver.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ChatModel;
|
||||
class CoreHandlers;
|
||||
|
||||
class SipAddressesModel : public QAbstractListModel {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ private:
|
|||
bool mForceClose = false;
|
||||
QMutex mForceCloseMutex;
|
||||
|
||||
QTimer *mForceCloseTimer;
|
||||
QTimer *mForceCloseTimer = nullptr;
|
||||
|
||||
std::shared_ptr<linphone::Player> mInternalPlayer;
|
||||
std::shared_ptr<Handlers> mHandlers;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
* Author: Ronan Abhamon
|
||||
*/
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include "../core/CoreManager.hpp"
|
||||
|
||||
#include "TimelineModel.hpp"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <QDirIterator>
|
||||
#include <QFontDatabase>
|
||||
#include <QMessageBox>
|
||||
#include <QScreen>
|
||||
|
||||
#include "gitversion.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue