From 17b8d9d41ed27507da6a1a8e696e0f614b57b260 Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 18 Mar 2008 13:54:49 +0000 Subject: [PATCH] Bug IPAL19267 - Qt4 porting: incorrect restored GUI state --- src/Qtx/QtxWorkstack.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 4796645d1..500e21558 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -2778,13 +2778,14 @@ void QtxWorkstack::splitterInfo( QSplitter* split, QString& info ) const info += QString( "(splitter orientation=%1 sizes=%3 " ).arg( split->orientation() ).arg( sizesStr ); - for ( QObjectList::const_iterator it = objs.begin(); it != objs.end(); ++it ) + for( int index = 0, count = split->count(); index < count; index++ ) { - if ( (*it)->inherits( "QSplitter" ) ) - splitterInfo( (QSplitter*)*it, info ); - else if ( (*it)->inherits( "QtxWorkstackArea" ) ) + QObject* obj = split->widget( index ); + if ( obj->inherits( "QSplitter" ) ) + splitterInfo( (QSplitter*)obj, info ); + else if ( obj->inherits( "QtxWorkstackArea" ) ) { - QtxWorkstackArea* area = (QtxWorkstackArea*)*it; + QtxWorkstackArea* area = (QtxWorkstackArea*)obj; if ( area->isEmpty() ) continue; info += QString( "(views active='%1'" ).arg( area->activeWidget()->objectName() ); -- 2.39.2