Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0 Beta
-
None
-
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux
-
ba524dc69fd9e304afba71cbf505d778e4cc92c2
Description
Linguist segfault when the user clicks on a text to be translated and the text is a QListWidget item or a QTreeWidget column defined in a ui file (I only tried with these two).
Commit d56636976643498b9fa688eb9b3029ed9669a8a2 introduced bringToFront to show the widget containing the text to translate but the target.target.object can't be casted to a QWidget.
Here is the backtrace:
0 QObject::isWidgetType qobject.h 137 0x464e1c
1 qobject_cast<QWidget *> qwidget.h 737 0x465050
2 bringToFront formpreviewview.cpp 400 0x4637c5
3 highlightTarget formpreviewview.cpp 416 0x4638a4
4 highlightTargets formpreviewview.cpp 466 0x4639d9
5 FormPreviewView::setSourceContext formpreviewview.cpp 546 0x464454
6 MainWindow::updateSourceView mainwindow.cpp 1995 0x477016
7 MainWindow::selectedMessageChanged mainwindow.cpp 1505 0x471c25
8 MainWindow::qt_static_metacall moc_mainwindow.cpp 360 0x4b816f
9 QMetaObject::activate qobject.cpp 3730 0x7ffff6af208d
10 QMetaObject::activate qobject.cpp 3595 0x7ffff6af189a
11 QItemSelectionModel::currentRowChanged moc_qitemselectionmodel.cpp 490 0x7ffff6a67edb
12 QItemSelectionModel::setCurrentIndex qitemselectionmodel.cpp 1375 0x7ffff6a6467b
13 QAbstractItemView::mousePressEvent qabstractitemview.cpp 1725 0x7ffff79fb8df
14 QTreeView::mousePressEvent qtreeview.cpp 1907 0x7ffff7a499f9
15 QWidget::event qwidget.cpp 8734 0x7ffff7761f31
16 QFrame::event qframe.cpp 544 0x7ffff789605f
17 QAbstractScrollArea::viewportEvent qabstractscrollarea.cpp 1206 0x7ffff793d2b0
18 QAbstractItemView::viewportEvent qabstractitemview.cpp 1685 0x7ffff79fb500
19 QTreeView::viewportEvent qtreeview.cpp 1309 0x7ffff7a46ad8
... <More>
To reproduce:
- create a ui file with a QListWidget;
- add an item with a text to translate;
- generate the ts file;
- open it in linguist;
- click on the text in the QListWidget.
With the attached files, open ags_fr.ts in linguist and click on the "column" text to be translated.