summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-13 20:27:54 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-13 21:09:39 +0200
commit21bb26991913ff9d2e4aa8c497398166b6477239 (patch)
tree4fa00a1533b18520cdf4e04a27aa79d02d1330c7
parentdf62e54d1e49cbcf06c88b6be79ed6b174e901ac (diff)
downloadserenity-21bb26991913ff9d2e4aa8c497398166b6477239.zip
LibGUI: Add ModelIndex::model()
Let's expose this so we can use it in some assertions later.
-rw-r--r--Libraries/LibGUI/ModelIndex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/ModelIndex.h b/Libraries/LibGUI/ModelIndex.h
index c1c94d081e..7bdb647ec4 100644
--- a/Libraries/LibGUI/ModelIndex.h
+++ b/Libraries/LibGUI/ModelIndex.h
@@ -55,6 +55,8 @@ public:
return !(*this == other);
}
+ const Model* model() const { return m_model; }
+
private:
ModelIndex(const Model& model, int row, int column, void* internal_data)
: m_model(&model)