" ",
" "};
-QPixmap* QtxResourceMgr::myDefaultPix = NULL;
-
/*!
\class QtxResourceMgr::Resources
\internal
QtxResourceMgr::QtxResourceMgr( const QString& appName, const QString& resVarTemplate )
: myAppName( appName ),
myCheckExist( true ),
+ myDefaultPix( 0 ),
myIsPixmapCached( true ),
myHasUserValues( true ),
myWorkingMode( AllowUserValues )
qDeleteAll( myResources );
qDeleteAll( myFormats );
+
+ delete myDefaultPix;
}
/*!
\return default pixmap
\sa setDefaultPixmap(), loadPixmap()
*/
-QPixmap QtxResourceMgr::defaultPixmap()
+QPixmap QtxResourceMgr::defaultPixmap() const
{
- QPixmap res;
- if(!myDefaultPix)
- myDefaultPix = new QPixmap( pixmap_not_found_xpm );
-
- if ( myDefaultPix && !myDefaultPix->isNull() )
- res = *myDefaultPix;
- return res;
+ static QPixmap* defpx = 0;
+ if ( !defpx )
+ defpx = new QPixmap( pixmap_not_found_xpm );
+
+ return myDefaultPix ? *myDefaultPix : *defpx;
}
/*!
if ( pix.isNull() )
myDefaultPix = 0;
else
- myDefaultPix = new QPixmap( pix );
+ myDefaultPix = new QPixmap( pix );
}
/*!