Skip to content

tabswitcher: Do not emit if we're adding no documents

Aleix Pol Gonzalez requested to merge work/apol/fix-load into master

Otherwise we would crash with asserts enabled at startup:

-13 0x00007902cac2a7ba in qt_assert (assertion=0x7902cabc951a <.L.str.20> "last >= first", file=0x7902cabcff11 <.L.str.2> "/home/apol/devel/frameworks6/qt6/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp", line=2888)
    at /home/apol/devel/frameworks6/qt6/qtbase/src/corelib/global/qassert.cpp:68
-14 0x00007902cb18952c in QAbstractItemModel::beginInsertRows (this=0x63ef8d1ba5b0, parent=..., first=0, last=-1) at /home/apol/devel/frameworks6/qt6/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp:2888
-15 0x00007902bd841462 in detail::TabswitcherFilesModel::insertDocuments (this=0xbf6b4730, row=32764, documents=...) at /home/apol/devel/frameworks6/kate/addons/tabswitcher/tabswitcherfilesmodel.cpp:123
-16 0x00007902bd826e9e in TabSwitcherPluginView::registerDocuments (this=0x63ef8d22ad90, documents=...) at /home/apol/devel/frameworks6/kate/addons/tabswitcher/tabswitcher.cpp:187
-17 0x00007902bd8262ef in TabSwitcherPluginView::setupModel (this=0x63ef8d22ad90) at /home/apol/devel/frameworks6/kate/addons/tabswitcher/tabswitcher.cpp:135
-18 0x00007902bd825360 in TabSwitcherPluginView::TabSwitcherPluginView (this=0x63ef8d22ad90, plugin=0x63ef8cf2cc50, mainWindow=0x63ef8ce26240) at /home/apol/devel/frameworks6/kate/addons/tabswitcher/tabswitcher.cpp:64
-19 0x00007902bd825026 in TabSwitcherPlugin::createView (this=0x63ef8cf2cc50, mainWindow=0x63ef8ce26240) at /home/apol/devel/frameworks6/kate/addons/tabswitcher/tabswitcher.cpp:34
-20 0x00007902cfc72801 in KatePluginManager::enablePluginGUI (item=0x63ef8cb2c120, win=0x63ef8cce6200, config=0x63ef8cab23d0) at /home/apol/devel/frameworks6/kate/apps/lib/katepluginmanager.cpp:227
-21 0x00007902cfc7272a in KatePluginManager::enableAllPluginsGUI (this=0x7ffcbf6b7d90, win=0x63ef8cce6200, config=0x63ef8cab23d0) at /home/apol/devel/frameworks6/kate/apps/lib/katepluginmanager.cpp:174
-22 0x00007902cfc0de02 in KateMainWindow::KateMainWindow (this=0x63ef8cce6200, sconfig=0x63ef8cab23d0, sgroup=..., userTriggered=false) at /home/apol/devel/frameworks6/kate/apps/lib/katemainwindow.cpp:141
-23 0x00007902cfbc237a in KateApp::newMainWindow (sconfig_=0x63ef8cab23d0, sgroup_=..., userTriggered=false) at /home/apol/devel/frameworks6/kate/apps/lib/kateapp.cpp:678
Edited by Aleix Pol Gonzalez

Merge request reports