I have made the following changes intended for :
  CE:MW:Shared / nemo-qml-plugins

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/6949

Thank You,
Marko Saukko

[This message was auto-generated]

---

Request # 6949:

Messages from BOSS:

State: review at 2012-10-05T12:08:41 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: Project:MTF:MW / nemo-qml-plugins -> CE:MW:Shared / nemo-qml-plugins
  
changes files:
--------------
--- nemo-qml-plugins.changes
+++ nemo-qml-plugins.changes
@@ -0,0 +1,4 @@
+* Fri Oct 5 2012 Robin Burchell <[email protected]> - 0.0.8
+- contacts: Tidy up some cruft in filtering now that SectionScroller knows how 
to handle models (from Robin)
+- contacts: Prefer anything else to a phone number for a display label, as 
phone numbers aren't descriptive (from Robin)
+

old:
----
  nemo-qml-plugins-0.0.7.tar.bz2

new:
----
  nemo-qml-plugins-0.0.8.tar.bz2

spec files:
-----------
--- nemo-qml-plugins.spec
+++ nemo-qml-plugins.spec
@@ -9,7 +9,7 @@
 # << macros
 
 Summary:    Nemo QML plugins source package.
-Version:    0.0.7
+Version:    0.0.8
 Release:    1
 Group:      System/Libraries
 License:    BSD

other changes:
--------------

++++++ nemo-qml-plugins-0.0.7.tar.bz2 -> nemo-qml-plugins-0.0.8.tar.bz2
--- contacts/seasideperson.cpp
+++ contacts/seasideperson.cpp
@@ -119,20 +119,13 @@
     if (!displayLabel.isEmpty())
         return displayLabel;
 
-    foreach (const QContactPhoneNumber& phone, 
mContact.details<QContactPhoneNumber>()) {
-        if(!phone.number().isNull())
-            return phone.number();
-    }
-
-    foreach (const QContactOnlineAccount& account,
-             mContact.details<QContactOnlineAccount>()){
-        if(!account.accountUri().isNull())
+    foreach (const QContactOnlineAccount& account, 
mContact.details<QContactOnlineAccount>()) {
+        if (!account.accountUri().isNull())
             return account.accountUri();
     }
 
-    foreach (const QContactEmailAddress& email,
-             mContact.details<QContactEmailAddress>()){
-        if(!email.emailAddress().isNull())
+    foreach (const QContactEmailAddress& email, 
mContact.details<QContactEmailAddress>()) {
+        if (!email.emailAddress().isNull())
             return email.emailAddress();
     }
 
@@ -140,6 +133,11 @@
     if (!company.name().isNull())
         return company.name();
 
+    foreach (const QContactPhoneNumber& phone, 
mContact.details<QContactPhoneNumber>()) {
+        if (!phone.number().isNull())
+            return phone.number();
+    }
+
     return "(unnamed)"; // TODO: localisation
 }
 
--- contacts/seasideproxymodel.cpp
+++ contacts/seasideproxymodel.cpp
@@ -108,26 +108,14 @@
         }
     }
 
-    if (priv->filterType == FilterAll) {
-        // TODO: this should not be here
-        qDebug("fastscroll: emitting countChanged");
-        emit const_cast<SeasideProxyModel*>(this)->countChanged();
-        return true;
-    }
-
-    if (priv->filterType == FilterFavorites) {
-        if (person->favorite()) {
-            // TODO: this should not be here
-            qDebug("fastscroll: emitting countChanged");
-            emit const_cast<SeasideProxyModel*>(this)->countChanged();
+    switch (priv->filterType) {
+        case FilterAll:
             return true;
-        }
-
-        return false;
-    } else {
-        qWarning() << "[SeasideProxyModel] invalid filter type";
-        return false;
+        case FilterFavorites:
+            return person->favorite();
     }
+
+    return false;
 }
 
 bool SeasideProxyModel::lessThan(const QModelIndex& left,
--- contacts/seasideproxymodel.h
+++ contacts/seasideproxymodel.h
@@ -39,10 +39,7 @@
 
     Q_INVOKABLE int getSourceRow(int row) const;
 
-    // for fastscroll support
-    Q_PROPERTY(int count READ count NOTIFY countChanged)
-    Q_PROPERTY(int length READ count NOTIFY countChanged)
-    int count() const { return rowCount(QModelIndex()); }
+    // for SectionScroller support
     Q_INVOKABLE QVariantMap get(int row) const;
 
     // API
@@ -82,9 +79,6 @@
         return model->exportContacts();
     }
 
-signals:
-    void countChanged();
-
 protected:
     virtual bool filterAcceptsRow(int source_row, const QModelIndex& 
source_parent) const;
     virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) 
const;

++++++ nemo-qml-plugins.yaml
--- nemo-qml-plugins.yaml
+++ nemo-qml-plugins.yaml
@@ -2,7 +2,7 @@
 Summary: Nemo QML plugins source package.
 Group: System/Libraries
 Description: Do not install this, install the subpackaged plugins.
-Version: 0.0.7
+Version: 0.0.8
 Release: 1
 Sources:
     - "%{name}-%{version}.tar.bz2"



Reply via email to