#include <iostream>
using namespace std;
+#ifdef WNT
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
/*!
Constructor
*/
if ( listView() && !listView()->allColumnsShowFocus() )
W = width( p->fontMetrics(), listView(), c );
- QListViewItem::paintCell( p, col_group, c, min( W, w ), align );
+ QListViewItem::paintCell( p, col_group, c, min( W, w ), align );
}
/*!
// get splitter sizes and store it in the map for future setting
QValueList<int> sizes;
QStringList sizesLst = QStringList::split( ':', ::getValue( params, "sizes" ) );
- for ( QStringList::Iterator it = sizesLst.begin(); it != sizesLst.end(); ++it )
+ QStringList::Iterator it;
+ for ( it = sizesLst.begin(); it != sizesLst.end(); ++it )
sizes.append( (*it).toInt() );
sMap[ splitter ] = sizes;
// for ( QStringList::Iterator tit = children.begin(); tit != children.end(); ++tit )
// printf (" |-> child = [%s]\n", (*tit).latin1() );
- for ( QStringList::Iterator it = children.begin(); it != children.end(); ++it ) {
+ for ( it = children.begin(); it != children.end(); ++it ) {
if ( (*it).startsWith( "(splitter" ) ) {
QSplitter* newSplitter = new QSplitter( splitter );
setSplitter( newSplitter, *it, sMap );
else if ( (*it).startsWith( "(views" ) ) {
QtxWorkstackArea* newArea = createArea( splitter );
QString activeViewName = ::getValue( *it, "active" );
- QWidget* activeView( 0 );
+ QWidget* activeView = 0;
activeViewName = activeViewName.mid( 1, activeViewName.length()-2 ); // chop off ' symbols
int i = 0;
QString viewName = ::getViewName( *it, i );
qApp->processEvents();
// restore splitters' sizes (map of sizes is filled in setSplitters)
- for ( QMap< QSplitter*, QValueList<int> >::Iterator it = sMap.begin(); it != sMap.end(); ++it )
- it.key()->setSizes( it.data() );
+ for ( QMap< QSplitter*, QValueList<int> >::Iterator itm = sMap.begin(); itm != sMap.end(); ++itm )
+ itm.key()->setSizes( itm.data() );
return (*this);
}
/*!Destructor.*/
STD_Application::~STD_Application()
{
+ clearViewManagers();
}
/*! \retval QString "StdApplication"*/
ViewManagerList lst;
viewManagers( lst );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it )
- removeViewManager( it.current() );
+ for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
+ SUIT_ViewManager* vm = it.current();
+ removeViewManager( vm );
+ delete vm;
+ }
}
/*!\retval TRUE, if view manager \a vm, already in view manager list (\a myViewMgrs).*/