From a93064e2b7ea8365eae8824b4612f6200b7dee23 Mon Sep 17 00:00:00 2001 From: Alexey Shilov Date: Tue, 14 Sep 2010 17:56:03 +0300 Subject: Fixes: NB#190336 - boosted applications use more SGX memory pages than non-boosted ones RevBy: Antti Kervinen, Armin Berres --- src/corelib/core/mcomponentcache.cpp | 9 +-------- src/corelib/core/mcomponentcache_p.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/corelib/core/mcomponentcache.cpp b/src/corelib/core/mcomponentcache.cpp index c256956a..5c2c7e86 100644 --- a/src/corelib/core/mcomponentcache.cpp +++ b/src/corelib/core/mcomponentcache.cpp @@ -46,7 +46,6 @@ MComponentCachePrivate::MComponentCachePrivate() : mApplicationInstance(0), mApplicationWindowInstance(0), glWidgetOfmApplicationWindowInstance(0), - glWidgetOfOtherWindow(0), cacheBeingPopulated(false), initialArgc(ARGV_LIMIT), initialArgv(new char* [initialArgc]) @@ -57,7 +56,6 @@ MComponentCachePrivate::~MComponentCachePrivate() { #ifdef QT_OPENGL_LIB delete glWidgetOfmApplicationWindowInstance; - delete glWidgetOfOtherWindow; #endif delete mApplicationWindowInstance; delete[] initialArgv; @@ -264,16 +262,11 @@ QGLWidget* MComponentCachePrivate::glWidget(const QGLFormat* format) { #ifdef QT_OPENGL_LIB QGLWidget *returnValue; - if (cacheBeingPopulated && glWidgetOfmApplicationWindowInstance != 0 + if (glWidgetOfmApplicationWindowInstance != 0 && (!format || glWidgetOfmApplicationWindowInstance->format() == *format)) { returnValue = glWidgetOfmApplicationWindowInstance; glWidgetOfmApplicationWindowInstance = 0; - } else if (glWidgetOfOtherWindow != 0 - && (!format || glWidgetOfOtherWindow->format() == *format)) - { - returnValue = glWidgetOfOtherWindow; - glWidgetOfOtherWindow = 0; } else { returnValue = createNewGlWidget(format); } diff --git a/src/corelib/core/mcomponentcache_p.h b/src/corelib/core/mcomponentcache_p.h index db90dc0e..79e679c5 100644 --- a/src/corelib/core/mcomponentcache_p.h +++ b/src/corelib/core/mcomponentcache_p.h @@ -49,7 +49,6 @@ public: MApplication *mApplicationInstance; MApplicationWindow *mApplicationWindowInstance; QGLWidget *glWidgetOfmApplicationWindowInstance; - QGLWidget *glWidgetOfOtherWindow; bool cacheBeingPopulated; int initialArgc; char **initialArgv; -- cgit v1.2.3