Am Mo., 13. Mai 2019 um 16:09 Uhr schrieb jungok <[email protected]
>:
> I have no clue, how to debug systems QT. For me it looks like
> 255 = (unsigned char)(-1), e.g. role could not be found. Maybe the expected
> role is developped in a later QT version?
>
No, I don't think so. What we do is that we check for the sensible roles in
that switch and assert if the switch was left without action. All those
roles are even in Qt 4.
Does this patch also report 255?
diff --git a/src/frontends/qt4/GuiIdListModel.cpp
b/src/frontends/qt4/GuiIdListModel.cpp
index b1db347327..80dfc9f817 100644
--- a/src/frontends/qt4/GuiIdListModel.cpp
+++ b/src/frontends/qt4/GuiIdListModel.cpp
@@ -16,6 +16,7 @@
#include "GuiIdListModel.h"
+#include "support/debug.h"
#include "support/lassert.h"
using std::vector;
@@ -68,6 +69,7 @@ bool GuiIdListModel::setData(QModelIndex const & index,
return true;
// If we assert here, it's because we're trying to set an
// unrecognized role.
+ LYXERR0("Unrecognized role: " << role);
LATTEST(false);
return false;
}
Jürgen
>
> Or do we have a routine assigning the role, where I could set a breakpoint?
>
Actually, we pass fixed roles, and all those roles are supposed to be known
(that's why the assert makes sense here).
Jürgen
>
> > Jürgen
>
> Kornel
>