|
From: <sv...@va...> - 2010-09-03 03:34:44
|
Author: cerion
Date: 2010-09-03 04:34:26 +0100 (Fri, 03 Sep 2010)
New Revision: 500
Log:
Fix treeitem child setup & expand.
Now src items are not opened by default: gives clearer overview.
Modified:
branches/valkyrie_qt4port/toolview/helgrind_logview.cpp
branches/valkyrie_qt4port/toolview/vglogview.cpp
branches/valkyrie_qt4port/toolview/vglogview.h
Modified: branches/valkyrie_qt4port/toolview/helgrind_logview.cpp
===================================================================
--- branches/valkyrie_qt4port/toolview/helgrind_logview.cpp 2010-04-07 23:20:12 UTC (rev 499)
+++ branches/valkyrie_qt4port/toolview/helgrind_logview.cpp 2010-09-03 03:34:26 UTC (rev 500)
@@ -94,7 +94,7 @@
QDomElement hthreadid = elem.firstChildElement();
#ifdef DEBUG_ON
if ( hthreadid.tagName() != "hthreadid" ) {
- vkPrintErr( "AnnounceThreadItem::setupChildren(): unexpected tagName: %s",
+ vkPrintErr( "AnnounceThreadItem::AnnounceThreadItem(): unexpected tagName: %s",
qPrintable( hthreadid.tagName() ) );
}
#endif
Modified: branches/valkyrie_qt4port/toolview/vglogview.cpp
===================================================================
--- branches/valkyrie_qt4port/toolview/vglogview.cpp 2010-04-07 23:20:12 UTC (rev 499)
+++ branches/valkyrie_qt4port/toolview/vglogview.cpp 2010-09-03 03:34:26 UTC (rev 500)
@@ -173,13 +173,8 @@
setupChildren();
// now we've loaded any child items from the model,
- // we can open up any child items that themselves have children
- for ( int i=0; i<this->childCount(); ++i ) {
- QTreeWidgetItem* chld = this->child( i );
- if ( chld->childCount() > 0 ) {
- chld->setExpanded( true );
- }
- }
+ // we can open the item without jitter.
+ this->setExpanded( true );
}
@@ -694,7 +689,8 @@
}
#endif
last_item = new FrameItem( this, last_item, e );
- last_item->openChildren();
+ // don't open children: just set them up.
+ last_item->setupChildren();
}
}
}
Modified: branches/valkyrie_qt4port/toolview/vglogview.h
===================================================================
--- branches/valkyrie_qt4port/toolview/vglogview.h 2010-04-07 23:20:12 UTC (rev 499)
+++ branches/valkyrie_qt4port/toolview/vglogview.h 2010-09-03 03:34:26 UTC (rev 500)
@@ -95,7 +95,6 @@
private:
QDomDocument vglog;
QTreeWidget* view; // we don't own this: don't cleanup
-
};
@@ -148,6 +147,8 @@
VgOutputItem* parent();
void openChildren();
+ // all (non-root) items with children must reimplement this:
+ virtual void setupChildren() {}
// useful static data + functions for mapping tagname -> enum
static ElemTypeMap elemtypeMap;
@@ -167,8 +168,6 @@
private:
void initialise();
- // all (non-root) items with children must reimplement this:
- virtual void setupChildren() {}
};
@@ -207,7 +206,7 @@
{
public:
InfoItem( VgOutputItem* parent, QDomElement root );
-private:
+
void setupChildren();
};
@@ -217,7 +216,7 @@
{
public:
LogQualItem( VgOutputItem* parent, QDomElement logqual );
-private:
+
void setupChildren();
};
@@ -228,7 +227,7 @@
public:
ArgsItem( VgOutputItem* parent, QTreeWidgetItem* after,
QDomElement vgargs );
-private:
+
void setupChildren();
};
@@ -239,7 +238,7 @@
public:
PreambleItem( VgOutputItem* parent, QTreeWidgetItem* after,
QDomElement preamble );
-private:
+
void setupChildren();
};
@@ -260,13 +259,12 @@
void showFullSrcPath( bool show );
bool isFullSrcPathShown();
+ void setupChildren();
+
protected:
QString getErrorAcronym( ErrorItem::AcronymMap map, QString kind );
private:
- void setupChildren();
-
-private:
QString err_tmplt;
bool fullSrcPathShown;
};
@@ -279,7 +277,7 @@
public:
StackItem( VgOutputItem* parent, QTreeWidgetItem* after,
QDomElement stck );
-private:
+
void setupChildren();
};
@@ -293,7 +291,6 @@
QString describe_IP( bool withPath = false );
-private:
void setupChildren();
};
@@ -313,7 +310,7 @@
public:
SuppCountsItem( VgOutputItem* parent, QTreeWidgetItem* after,
QDomElement sc );
-private:
+
void setupChildren();
};
|