[WIP] Solid device import with proper model support

Review Request #117806 - Created April 27, 2014 and discarded

Information
Kai Uwe Broulik
solid
master
Reviewers
solid
afiestas, apol, ivan, lukas
This adds proper model support to the Solid device import making it possible to hook it up to a ListView directly with automatically propagated change notifications.

You can have a look at a WIP battery monitor using it in [plasma-workspace] broulik/batterymonitorsolidimport branch.

I'm not completely satisfied with it as I'm not really good at that Qt model stuff, having the private impl mess around with the QList and having the model itself just calling beginInsertRows and endInsertRows is probably not optimal.

I apologize for the hard-to-read diff but I renamed the files outside of git and git diff --find-copies-harder confused Review Board :/ It is also available in the broulik/modelimport branch.
I tried to iron out most of the crashes and issues and that thing will definitely need a whole lot of unit tests.

Issues

  • 5
  • 0
  • 0
  • 5
Description From Last Updated
I would remove this property. It adds quite some logic and complexity for no apparent reason. You can use count==0 ... Aleix Pol Gonzalez Aleix Pol Gonzalez
You probably want to do a begin/endRemoveRows or begin/endResetModel. Aleix Pol Gonzalez Aleix Pol Gonzalez
You want to actually add it here, no? Aleix Pol Gonzalez Aleix Pol Gonzalez
No need to remove anything? Aleix Pol Gonzalez Aleix Pol Gonzalez
Don't comment, remove, no? Aleix Pol Gonzalez Aleix Pol Gonzalez
Kai Uwe Broulik
Kai Uwe Broulik
Aleix Pol Gonzalez
Aleix Pol Gonzalez
Kai Uwe Broulik
Kai Uwe Broulik
Review request changed

Status: Discarded

Loading...