Commit b97b823f authored by Ronan Abhamon's avatar Ronan Abhamon

unstable

parent bcee4d9d
......@@ -184,11 +184,11 @@
</message>
<message>
<source>lostIncomingCall</source>
<translation>Lost incoming call</translation>
<translation type="vanished">Lost incoming call</translation>
</message>
<message>
<source>lostOutgoingCall</source>
<translation>Lost outgoing call</translation>
<translation type="vanished">Lost outgoing call</translation>
</message>
<message>
<source>endCall</source>
......
......@@ -184,11 +184,11 @@
</message>
<message>
<source>lostIncomingCall</source>
<translation>Appel entrant manqué</translation>
<translation type="vanished">Appel entrant manqué</translation>
</message>
<message>
<source>lostOutgoingCall</source>
<translation>Appel sortant manqué</translation>
<translation type="vanished">Appel sortant manqué</translation>
</message>
<message>
<source>endCall</source>
......
......@@ -22,12 +22,15 @@ signals:
void sipAddressChanged (const QString &sipAddress);
public:
typedef QPair<QVariantMap, std::shared_ptr<void> > ChatEntryData;
enum Roles {
ChatEntry = Qt::DisplayRole,
SectionDate
};
enum EntryType {
BaseEntry,
MessageEntry,
CallEntry
};
......@@ -57,8 +60,6 @@ public slots:
void removeAllEntries ();
private:
typedef QPair<QVariantMap, std::shared_ptr<void> > ChatEntryData;
void fillMessageEntry (
QVariantMap &dest,
const std::shared_ptr<linphone::ChatMessage> &message
......
#include "ChatProxyModel.hpp"
#include <QtDebug>
// ===================================================================
ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent) {
......@@ -9,5 +10,12 @@ ChatProxyModel::ChatProxyModel (QObject *parent) : QSortFilterProxyModel(parent)
}
bool ChatProxyModel::filterAcceptsRow (int source_row, const QModelIndex &source_parent) const {
QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
const QVariantMap &data = qvariant_cast<QVariantMap>(
index.data()
);
qDebug() << data["type"];
return true; // TODO.
}
......@@ -26,6 +26,10 @@ public slots:
return &m_chat_model;
}
void setEntryTypeFilter (ChatModel::EntryType type) {
// TODO.
}
protected:
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const;
......
......@@ -151,7 +151,9 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel &contact)
// -------------------------------------------------------------------
void ContactsListProxyModel::setConnectedFilter (bool useConnectedFilter) {
m_use_connected_filter = useConnectedFilter;
invalidate();
void ContactsListProxyModel::setConnectedFilter (bool use_connected_filter) {
if (use_connected_filter != m_use_connected_filter) {
m_use_connected_filter = use_connected_filter;
invalidate();
}
}
......@@ -35,7 +35,7 @@ private:
bool isConnectedFilterUsed () const {
return m_use_connected_filter;
}
void setConnectedFilter (bool useConnectedFilter);
void setConnectedFilter (bool use_connected_filter);
static const QRegExp m_search_separators;
......
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