From ec80437be9f0b70c0cec6248c95f6251de8f7e8b Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 19 Mar 2010 10:04:24 +0100 Subject: Actually use GL texture cache when bindoptions are provided Reviewed-by: Trond --- src/opengl/qgl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index e0030ad..5908f14 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2208,8 +2208,8 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G Q_Q(QGLContext); #ifdef QGL_BIND_TEXTURE_DEBUG - printf("QGLContextPrivate::bindTexture(), imageSize=(%d,%d), internalFormat =0x%x, options=%x\n", - image.width(), image.height(), internalFormat, int(options)); + printf("QGLContextPrivate::bindTexture(), imageSize=(%d,%d), internalFormat =0x%x, options=%x, key=%llx\n", + image.width(), image.height(), internalFormat, int(options), key); QTime time; time.start(); #endif @@ -2547,7 +2547,7 @@ GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format, return 0; Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, target, format, false, options); + QGLTexture *texture = d->bindTexture(image, target, format, options); return texture->id; } @@ -2559,7 +2559,7 @@ GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMa return 0; Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), false, DefaultBindOption); + QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), DefaultBindOption); return texture->id; } @@ -2571,7 +2571,7 @@ GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMa return 0; Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), false, options); + QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), options); return texture->id; } #endif -- cgit v0.12 From 81f5cc4d938ff3a381358efa5d900517d66a80dd Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 19 Mar 2010 10:40:25 +0100 Subject: simple cleanup in QSplitter there is no need for a singleshot for deleteLater here Reviewed-by: gabi --- src/gui/widgets/qsplitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp index f4076eb..597b28b 100644 --- a/src/gui/widgets/qsplitter.cpp +++ b/src/gui/widgets/qsplitter.cpp @@ -1305,7 +1305,7 @@ void QSplitter::setRubberBand(int pos) Q_D(QSplitter); if (pos < 0) { if (d->rubberBand) - QTimer::singleShot(0, d->rubberBand, SLOT(deleteLater())); + d->rubberBand->deleteLater(); return; } QRect r = contentsRect(); -- cgit v0.12 From 6d6df0e2b63f0103ec1f19b4b856b106e295d618 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 19 Mar 2010 10:42:44 +0100 Subject: Removed an assert in the print dialog on windows This assert was checking that the parent widget for the print dialog was already created. That's useless since we immediately after call winId(). Task-number: QTBUG-8684 Reviewed-by: gabi --- src/gui/dialogs/qprintdialog_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp index 1061660..38c8759 100644 --- a/src/gui/dialogs/qprintdialog_win.cpp +++ b/src/gui/dialogs/qprintdialog_win.cpp @@ -141,7 +141,7 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent, if (d->ep->printToFile) pd->Flags |= PD_PRINTTOFILE; - Q_ASSERT(parent != 0 && parent->testAttribute(Qt::WA_WState_Created)); + Q_ASSERT(parent); pd->hwndOwner = parent->window()->winId(); pd->lpPageRanges[0].nFromPage = qMax(pdlg->fromPage(), pdlg->minPage()); pd->lpPageRanges[0].nToPage = (pdlg->toPage() > 0) ? qMin(pdlg->toPage(), pdlg->maxPage()) : 1; -- cgit v0.12