This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/103806/

On January 27th, 2012, 7:21 p.m., Marco Martin wrote:

it looks good to me, (and proably you're right 90% of qml models a qabstractlistmodel could be enough)
only thing that i am usire of is the runnerforid function
Just that runnerForIndex thing, please comment on it and I'll submit another patch without the trailing whitespaces and "fuuuu".

Thanks!!

On January 27th, 2012, 7:21 p.m., Marco Martin wrote:

components/runnermodel/runnermodel.cpp (Diff revision 1)
void RunnerModel::matchesChanged(const QList<Plasma::QueryMatch> &matches)
183
167
168
QObject* RunnerModel::runnerForId(const QString& id)
why a direct access for the runner is needed?
Well, now that you say it it's just used for the section. We can add a new role that does this indoors, I can see benefit in accessing the runner in terms of flexibility, though.

If we limit the model user to the roles we might end up making the API not scalable over the time.

Since I'm an alien over here, I'll let you decide what's best. :)

- Aleix


On January 27th, 2012, 6:06 p.m., Aleix Pol Gonzalez wrote:

Review request for Plasma.
By Aleix Pol Gonzalez.

Updated Jan. 27, 2012, 6:06 p.m.

Description

Adds some features to the RunnerModel so that it can be used properly in the KRunner QML implementation I've been working on (see the testing section).

Also it simplifies the code a bit by moving from QAbstractItemModel -> QAbstractListModel.

Testing

use it in kde:scratch/apol/krunner-qml (proof of concept for a KRunner implemented in QtQuick).

here's a video, so that you know what's going on: http://www.proli.net/meu/netrunner/qmlrunner.ogv

Diffs

  • components/runnermodel/runnermodel.h (899bf1f)
  • components/runnermodel/runnermodel.cpp (a226f8e)

View Diff