Changeset View
Changeset View
Standalone View
Standalone View
plugins/patchreview/patchreviewtoolview.cpp
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
54 | 54 | | |||
55 | class PatchFilesModel : public VcsFileChangesModel | 55 | class PatchFilesModel : public VcsFileChangesModel | ||
56 | { | 56 | { | ||
57 | Q_OBJECT | 57 | Q_OBJECT | ||
58 | public: | 58 | public: | ||
59 | PatchFilesModel( QObject *parent, bool allowSelection ) : VcsFileChangesModel( parent, allowSelection ) { }; | 59 | PatchFilesModel( QObject *parent, bool allowSelection ) : VcsFileChangesModel( parent, allowSelection ) { }; | ||
60 | enum ItemRoles { HunksNumberRole = LastItemRole+1 }; | 60 | enum ItemRoles { HunksNumberRole = LastItemRole+1 }; | ||
61 | 61 | | |||
62 | public slots: | 62 | public Q_SLOTS: | ||
63 | void updateState( const KDevelop::VcsStatusInfo &status, unsigned hunksNum ) { | 63 | void updateState( const KDevelop::VcsStatusInfo &status, unsigned hunksNum ) { | ||
64 | int row = VcsFileChangesModel::updateState( invisibleRootItem(), status ); | 64 | int row = VcsFileChangesModel::updateState( invisibleRootItem(), status ); | ||
65 | if ( row == -1 ) | 65 | if ( row == -1 ) | ||
66 | return; | 66 | return; | ||
67 | 67 | | |||
68 | QStandardItem *item = invisibleRootItem()->child( row, 0 ); | 68 | QStandardItem *item = invisibleRootItem()->child( row, 0 ); | ||
69 | setFileInfo( item, hunksNum ); | 69 | setFileInfo( item, hunksNum ); | ||
70 | item->setData( QVariant( hunksNum ), HunksNumberRole ); | 70 | item->setData( QVariant( hunksNum ), HunksNumberRole ); | ||
▲ Show 20 Lines • Show All 533 Lines • Show Last 20 Lines |