I have made the following changes intended for : CE:MW:Shared / libcommhistory
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7535 Thank You, John Brooks [This message was auto-generated] --- Request # 7535: Messages from BOSS: State: review at 2012-12-14T06:27:55 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:special:branches:CE:MW:Shared / libcommhistory -> CE:MW:Shared / libcommhistory changes files: -------------- --- libcommhistory.changes +++ libcommhistory.changes @@ -0,0 +1,3 @@ +* Thu Dec 13 2012 John Brooks <[email protected]> - 1.4.4 +- Add API for deleting events to the declarative plugin (from Andrew den Exter) + old: ---- libcommhistory-1.4.3.tar.gz new: ---- libcommhistory-1.4.4.tar.bz2 spec files: ----------- --- libcommhistory.spec +++ libcommhistory.spec @@ -1,11 +1,11 @@ Name: libcommhistory Summary: Communications event history database API -Version: 1.4.3 +Version: 1.4.4 Release: 1 Group: System/Libraries License: LGPL URL: https://github.com/nemomobile/libcommhistory -Source0: %{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.bz2 Patch0: libcommhistory-1.3.12.6-fix-shared-static-lib-build-order.patch BuildRequires: libqtcontacts-tracker-extensions-devel BuildRequires: pkgconfig(QtCore) >= 4.7.0 @@ -58,7 +58,7 @@ %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name} %patch0 -p1 other changes: -------------- ++++++ libcommhistory-1.4.3.tar.gz -> libcommhistory-1.4.4.tar.bz2 --- declarative/src/callproxymodel.cpp +++ declarative/src/callproxymodel.cpp @@ -1,4 +1,5 @@ #include "callproxymodel.h" +#include "event.h" CallProxyModel::CallProxyModel(QObject *parent) : QSortFilterProxyModel(parent), @@ -28,3 +29,12 @@ QSortFilterProxyModel::setFilterKeyColumn(role - CommHistory::EventModel::BaseRole); QSortFilterProxyModel::setFilterRole(role); } + +void CallProxyModel::deleteAt(int index) +{ + QModelIndex sourceIndex = mapToSource(CallProxyModel::index(index, 0)); + CommHistory::Event event = m_source->event(sourceIndex); + + if (event.isValid()) + m_source->deleteEvent(event); +} --- declarative/src/callproxymodel.h +++ declarative/src/callproxymodel.h @@ -113,6 +113,8 @@ void setSortRole(int role); void setFilterRole(int role); + void deleteAt(int index); + private: CommHistory::CallModel *m_source; };
