mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
fix(app): little fixes to improve compilation performance
This commit is contained in:
parent
3bc72a2630
commit
60a21c7c96
5 changed files with 13 additions and 12 deletions
|
|
@ -23,16 +23,21 @@
|
|||
#ifndef CAMERA_H_
|
||||
#define CAMERA_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickFramebufferObject>
|
||||
|
||||
#include "../call/CallModel.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class CallModel;
|
||||
class Camera;
|
||||
struct ContextInfo;
|
||||
|
||||
namespace linphone {
|
||||
class Call;
|
||||
}
|
||||
|
||||
class CameraRenderer : public QQuickFramebufferObject::Renderer {
|
||||
friend class Camera;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ bool ContactsListProxyModel::filterAcceptsRow (
|
|||
const QModelIndex &index = sourceModel()->index(source_row, 0, source_parent);
|
||||
const ContactModel *contact = index.data().value<ContactModel *>();
|
||||
|
||||
m_weights[contact] = static_cast<unsigned int>(round(computeContactWeight(*contact)));
|
||||
m_weights[contact] = static_cast<unsigned int>(round(computeContactWeight(contact)));
|
||||
|
||||
return m_weights[contact] > 0 && (
|
||||
!m_use_connected_filter ||
|
||||
|
|
@ -125,11 +125,11 @@ float ContactsListProxyModel::computeStringWeight (const QString &string, float
|
|||
return percentage * FACTOR_POS_OTHER;
|
||||
}
|
||||
|
||||
float ContactsListProxyModel::computeContactWeight (const ContactModel &contact) const {
|
||||
float weight = computeStringWeight(contact.getVcardModel()->getUsername(), USERNAME_WEIGHT);
|
||||
float ContactsListProxyModel::computeContactWeight (const ContactModel *contact) const {
|
||||
float weight = computeStringWeight(contact->getVcardModel()->getUsername(), USERNAME_WEIGHT);
|
||||
|
||||
// Get all contact's addresses.
|
||||
const list<shared_ptr<linphone::Address> > addresses = contact.m_linphone_friend->getAddresses();
|
||||
const list<shared_ptr<linphone::Address> > addresses = contact->m_linphone_friend->getAddresses();
|
||||
|
||||
float size = static_cast<float>(addresses.size());
|
||||
for (auto it = addresses.cbegin(); it != addresses.cend(); ++it)
|
||||
|
|
|
|||
|
|
@ -23,12 +23,11 @@
|
|||
#ifndef CONTACTS_LIST_PROXY_MODEL_H_
|
||||
#define CONTACTS_LIST_PROXY_MODEL_H_
|
||||
|
||||
#include "../contact/ContactModel.hpp"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ContactModel;
|
||||
class ContactsListModel;
|
||||
|
||||
class ContactsListProxyModel : public QSortFilterProxyModel {
|
||||
|
|
@ -52,7 +51,7 @@ protected:
|
|||
|
||||
private:
|
||||
float computeStringWeight (const QString &string, float percentage) const;
|
||||
float computeContactWeight (const ContactModel &contact) const;
|
||||
float computeContactWeight (const ContactModel *contact) const;
|
||||
|
||||
bool isConnectedFilterUsed () const {
|
||||
return m_use_connected_filter;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#define NOTIFIER_H_
|
||||
|
||||
#include <linphone++/linphone.hh>
|
||||
|
||||
#include <QMutex>
|
||||
#include <QObject>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
#ifndef SMART_SEARCH_BAR_MODEL_H_
|
||||
#define SMART_SEARCH_BAR_MODEL_H_
|
||||
|
||||
#include "../sip-addresses/SipAddressesModel.hpp"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue