From: <sv...@va...> - 2008-06-10 20:12:39
|
Author: cerion Date: 2006-07-13 11:53:17 +0100 (Thu, 13 Jul 2006) New Revision: 414 Log: add check for reading empty <errorcounts> tags more backward compatibility for qt pre v3.3.0 Modified: trunk/valkyrie/tool_views/memcheck_view.cpp trunk/valkyrie/tool_views/memcheck_view.h trunk/valkyrie/tool_views/vglogview.cpp Modified: trunk/valkyrie/tool_views/memcheck_view.cpp =================================================================== --- trunk/valkyrie/tool_views/memcheck_view.cpp 2006-07-13 10:15:47 UTC (rev 413) +++ trunk/valkyrie/tool_views/memcheck_view.cpp 2006-07-13 10:53:17 UTC (rev 414) @@ -91,8 +91,13 @@ connect( lView, SIGNAL(selectionChanged()), this, SLOT(itemSelected()) ); /* launch editor with src file loaded */ +#if (QT_VERSION-0 >= 0x030200) connect( lView, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), - this, SLOT(launchEditor(QListViewItem*, const QPoint&, int)) ); + this, SLOT(launchEditor(QListViewItem*)) ); +#else // QT_VERSION < 3.2 + connect( lView, SIGNAL(doubleClicked(QListViewItem*)), + this, SLOT(launchEditor(QListViewItem*)) ); +#endif //zz QFont clientout_fnt( "Adobe Courier", 9, QFont::Normal, false ); //zz clientout_fnt.setStyleHint( QFont::TypeWriter ); @@ -302,7 +307,7 @@ /* checks if itemType() == SRC. if true, and item isReadable or isWriteable, launches an editor with the source file loaded */ -void MemcheckView::launchEditor( QListViewItem* lv_item, const QPoint&, int ) +void MemcheckView::launchEditor( QListViewItem* lv_item ) { if ( !lv_item || !lv_item->parent() ) return; Modified: trunk/valkyrie/tool_views/memcheck_view.h =================================================================== --- trunk/valkyrie/tool_views/memcheck_view.h 2006-07-13 10:15:47 UTC (rev 413) +++ trunk/valkyrie/tool_views/memcheck_view.h 2006-07-13 10:53:17 UTC (rev 414) @@ -53,7 +53,7 @@ void openAllItems(bool); void openOneItem(); void showSrcPath(); - void launchEditor( QListViewItem*, const QPoint&, int ); + void launchEditor( QListViewItem* ); private: QListView* lView; Modified: trunk/valkyrie/tool_views/vglogview.cpp =================================================================== --- trunk/valkyrie/tool_views/vglogview.cpp 2006-07-13 10:15:47 UTC (rev 413) +++ trunk/valkyrie/tool_views/vglogview.cpp 2006-07-13 10:53:17 UTC (rev 414) @@ -780,6 +780,8 @@ break; } case VgElement::ERRORCOUNTS: { + if (elem.childNodes().count() == 0) // ignore empty errorcounts + break; VgErrCounts ec = (VgErrCounts&)elem; /* update topStatus */ topStatus->updateErrorCounts( ec ); |