Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In a Windows debug build search suggestion popup triggers a Qt assertion #1253

Open
veloman-yunkan opened this issue Nov 22, 2024 · 1 comment
Labels
Milestone

Comments

@veloman-yunkan
Copy link
Collaborator

Image

The assertion is caused by QStyledItemDelegate::paint() being called with an invalid QModelIndex:

void SuggestionListDelegate::paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
/* Paint without text and icon */
QStyleOptionViewItem opt(option);
QStyledItemDelegate::paint(painter, opt, QModelIndex());
paintIcon(painter, opt, index);
paintText(painter, opt, index);
}

Under Linux this doesn't happen because in a normal development flow the debug build of kiwix-desktop uses the same shared libraries of Qt as the release build, whereas under Windows the version of the dlls used depends on the type of the build. Probably the issue can be reproduced under Linux by linking to the debug versions of QT .so files.

@veloman-yunkan
Copy link
Collaborator Author

Note that this bug hides behind two other bugs fixed by #1252 which is not yet merged as of opening this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants