[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdevplatform] interfaces: Be less restrictive about the documentation index type
From:       Aleix Pol <null () kde ! org>
Date:       2017-05-31 16:51:35
Message-ID: E1dG6qN-00016Y-Fx () code ! kde ! org
[Download RAW message or body]

Git commit a57a1e06a9fd1bdfa6410867cbef7e14e7e88c2f by Aleix Pol.
Committed on 31/05/2017 at 16:50.
Pushed by apol into branch 'master'.

Be less restrictive about the documentation index type

In the end any item model works, we just will be displaying the it's first
level.
This allows using proxy models for it.

M  +4    -3    interfaces/idocumentationprovider.h

https://commits.kde.org/kdevplatform/a57a1e06a9fd1bdfa6410867cbef7e14e7e88c2f

diff --git a/interfaces/idocumentationprovider.h \
b/interfaces/idocumentationprovider.h index 8627ac70f..4532dafb7 100644
--- a/interfaces/idocumentationprovider.h
+++ b/interfaces/idocumentationprovider.h
@@ -25,7 +25,7 @@
 
 class QIcon;
 class QModelIndex;
-class QAbstractListModel;
+class QAbstractItemModel;
 namespace KDevelop
 {
 class Declaration;
@@ -38,8 +38,9 @@ public:
     /** @returns an IDocument instance for the specified declaration or a null \
                pointer if none could be found.*/
     virtual IDocumentation::Ptr documentationForDeclaration(KDevelop::Declaration* \
declaration) const = 0;  
-    /** @returns an instance of an interface to create an index for all the items \
                provided by this class. */
-    virtual QAbstractListModel* indexModel() const = 0;
+    /** @returns an instance of an interface to create an index for all the items \
provided by this class. +     *  Should have all items at the same level */
+    virtual QAbstractItemModel* indexModel() const = 0;
 
     /** @returns the documentation information related to the index in the model. */
     virtual IDocumentation::Ptr documentationForIndex(const QModelIndex& idx) const \
= 0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic