| 647 | } |
| 648 | |
| 649 | bool QCMakeCacheModelDelegate::eventFilter(QObject* object, QEvent* evt) |
| 650 | { |
| 651 | // FIXME: This filter avoids a crash when opening a file dialog |
| 652 | // with the '...' button on a cache entry line in the GUI. |
| 653 | // Previously this filter was commented as a workaround for Qt issue 205903, |
| 654 | // but that was fixed in Qt 4.5.0 and the crash still occurs as of Qt 5.14 |
| 655 | // without this filter. This needs further investigation. |
| 656 | if (evt->type() == QEvent::FocusOut && this->FileDialogFlag) { |
| 657 | return false; |
| 658 | } |
| 659 | return QItemDelegate::eventFilter(object, evt); |
| 660 | } |
| 661 | |
| 662 | void QCMakeCacheModelDelegate::setModelData(QWidget* editor, |
| 663 | QAbstractItemModel* model, |