Commit dd84cf9a authored by Stepan Salenikovich's avatar Stepan Salenikovich
Browse files

gnome: libRingClient API update

Refs #68848

Change-Id: I4ce18b8cbffa499d9b5816945ae33793fe86403b
parent c5f08156
......@@ -30,7 +30,7 @@
#include <account.h>
#include <person.h>
#include <contactmethod.h>
#include <historymodel.h>
#include <categorizedhistorymodel.h>
class MinimalHistoryEditor : public CollectionEditor<Call>
{
......@@ -104,7 +104,7 @@ bool MinimalHistoryEditor::regenFile(const Call* toIgnore)
QFile file(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') +"history.ini");
if ( file.open(QIODevice::WriteOnly | QIODevice::Text) ) {
QTextStream stream(&file);
for (const Call* c : HistoryModel::instance()->getHistoryCalls()) {
for (const Call* c : CategorizedHistoryModel::instance()->getHistoryCalls()) {
if (c != toIgnore)
saveCall(stream, c);
}
......
......@@ -39,7 +39,7 @@
#include <QtCore/QItemSelectionModel>
#include <useractionmodel.h>
#include <clutter-gtk/clutter-gtk.h>
#include <historymodel.h>
#include <categorizedhistorymodel.h>
#include "ring_client_options.h"
#include "ringmainwindow.h"
......@@ -126,7 +126,7 @@ ring_client_command_line(GApplication *app, GApplicationCommandLine *cmdline)
}
/* add backends */
HistoryModel::instance()->addCollection<MinimalHistoryBackend>(LoadOptions::FORCE_ENABLED);
CategorizedHistoryModel::instance()->addCollection<MinimalHistoryBackend>(LoadOptions::FORCE_ENABLED);
/* Override theme since we don't have appropriate icons for a dark them (yet) */
GtkSettings *gtk_settings = gtk_settings_get_default();
......
......@@ -38,7 +38,7 @@
#include "incomingcallview.h"
#include "currentcallview.h"
#include <string.h>
#include <historymodel.h>
#include <categorizedhistorymodel.h>
#include <contactmethod.h>
#include <QtCore/QSortFilterProxyModel>
#include "models/gtkqsortfiltertreemodel.h"
......@@ -463,8 +463,8 @@ ring_main_window_init(RingMainWindow *win)
/* sort the history in descending order by date */
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(HistoryModel::instance());
proxyModel->setSourceModel(HistoryModel::instance());
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(CategorizedHistoryModel::instance());
proxyModel->setSourceModel(CategorizedHistoryModel::instance());
proxyModel->setSortRole(static_cast<int>(Call::Role::Date));
proxyModel->sort(0,Qt::DescendingOrder);
......
Supports Markdown
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