basctl/source/basicide/moduldlg.cxx |    2 +-
 vcl/qt5/QtInstanceTreeView.cxx      |   18 +++++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 095727789b999317a5e2be0eaef079ac71bf590d
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Jan 20 20:49:55 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Jan 22 11:16:23 2026 +0100

    tdf#130857 qt weld: Add first QtInstanceTreeView::get_dest_row_at_pos impl
    
    Add initial implementation for QtInstanceTreeView::get_dest_row_at_pos
    that returns an iterator for the item at the given position.
    
    Drag'n'drop logic and autoscroll are not implemented yet
    and can be added later when needed.
    
    Change-Id: I439f492350feb39417aeff2579e9b672976a72c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197692
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx
index 26372c298ccd..651c74d783ba 100644
--- a/vcl/qt5/QtInstanceTreeView.cxx
+++ b/vcl/qt5/QtInstanceTreeView.cxx
@@ -750,10 +750,22 @@ void QtInstanceTreeView::set_column_custom_renderer(int, 
bool)
 
 void QtInstanceTreeView::queue_draw() { assert(false && "Not implemented 
yet"); }
 
-std::unique_ptr<weld::TreeIter> QtInstanceTreeView::get_dest_row_at_pos(const 
Point&, bool, bool)
+std::unique_ptr<weld::TreeIter> QtInstanceTreeView::get_dest_row_at_pos(const 
Point& rPos,
+                                                                        bool 
bDnDMode, bool)
 {
-    assert(false && "Not implemented yet");
-    return {};
+    assert(!bDnDMode && "bDndMode and bAutoScroll params not handled yet");
+    (void)bDnDMode;
+
+    SolarMutexGuard g;
+
+    std::unique_ptr<weld::TreeIter> pIter;
+    GetQtInstance().RunInMainThread([&] {
+        const QModelIndex aIndex = m_pTreeView->indexAt(toQPoint(rPos));
+        if (aIndex.isValid())
+            pIter = std::make_unique<QtInstanceTreeIter>(aIndex);
+    });
+
+    return pIter;
 }
 
 void QtInstanceTreeView::unset_drag_dest_row() { assert(false && "Not 
implemented yet"); }
commit c3ef848908ead5e9e7f5094add72e1515eeaf56b
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Jan 20 20:32:33 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Jan 22 11:16:11 2026 +0100

    basctl: Simplify another weld::TreeIter equality check
    
    See this previous commit for more background:
    
        Change-Id: I9386e100f83b9bdb832b50f1056305b81c23e351
        Author: Michael Weghorn <[email protected]>
        Date:   Tue Jan 20 19:52:12 2026 +0100
    
            tdf#130857 Simplify various weld::TreeIter equality checks
    
    Change-Id: I483dc42cd8c3f9c92b1719f1ba247cfc367b16e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197691
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 9df40f8d8556..299e6acebffa 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -336,7 +336,7 @@ private:
         {
             std::unique_ptr<weld::TreeIter> 
xParent(pSource->make_iterator(xEntry.get()));
             std::unique_ptr<weld::TreeIter> 
xSelParent(pSource->make_iterator(xSelected.get()));
-            if (pSource->iter_parent(*xParent) && 
pSource->iter_parent(*xSelParent) && pSource->iter_compare(*xParent, 
*xSelParent) == 0)
+            if (pSource->iter_parent(*xParent) && 
pSource->iter_parent(*xSelParent) && xParent->equal(*xSelParent))
                 bValid = false;
         }
 

Reply via email to