From 5f42409744853f49ac8bfaeddcd3f0d918c4df14 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 8 Dec 2006 16:29:26 +0000 Subject: [PATCH] A fix for compilation with Qt < 4.2.0. --- src/info/qt_ui.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/info/qt_ui.cpp b/src/info/qt_ui.cpp index 037378be3..87024b09b 100644 --- a/src/info/qt_ui.cpp +++ b/src/info/qt_ui.cpp @@ -242,8 +242,13 @@ rightclick_tree_widget::mousePressEvent(QMouseEvent *event) { } QTreeWidgetItem *item = itemAt(event->pos()); - if (NULL != item) + if (NULL != item) { +#if QT_VERSION >= 0x040200 gui->expand_all_elements(item, !item->isExpanded()); +#else // QT_VERSION >= 0x040200 + gui->expand_all_elements(item, !item->treeWidget()->isItemExpanded(item)); +#endif // QT_VERSION >= 0x040200 + } } void