浏览代码

LibGUI: Add ModelIndex::model()

Let's expose this so we can use it in some assertions later.
Andreas Kling 5 年之前
父节点
当前提交
21bb269919
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Libraries/LibGUI/ModelIndex.h

+ 2 - 0
Libraries/LibGUI/ModelIndex.h

@@ -55,6 +55,8 @@ public:
         return !(*this == other);
         return !(*this == other);
     }
     }
 
 
+    const Model* model() const { return m_model; }
+
 private:
 private:
     ModelIndex(const Model& model, int row, int column, void* internal_data)
     ModelIndex(const Model& model, int row, int column, void* internal_data)
         : m_model(&model)
         : m_model(&model)