From fa97a0f683bf288356f6fed8c77a03fb6c363624 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 1 Sep 2009 20:41:23 +1000 Subject: Fix misformatted license headers. Reviewed-by: Trust Me --- examples/qws/dbscreen/dbscreen.cpp | 21 +++++++++------------ examples/qws/dbscreen/dbscreen.h | 21 +++++++++------------ examples/qws/dbscreen/dbscreendriverplugin.cpp | 23 ++++++++++------------- qmake/generators/unix/unixmake.cpp | 19 ++++++++----------- src/gui/kernel/qt_mac.cpp | 19 ++++++++----------- 5 files changed, 44 insertions(+), 59 deletions(-) diff --git a/examples/qws/dbscreen/dbscreen.cpp b/examples/qws/dbscreen/dbscreen.cpp index 81df21d..3d3b15b 100644 --- a/examples/qws/dbscreen/dbscreen.cpp +++ b/examples/qws/dbscreen/dbscreen.cpp @@ -1,11 +1,11 @@ - /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the examples of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -36,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ #include "dbscreen.h" #include diff --git a/examples/qws/dbscreen/dbscreen.h b/examples/qws/dbscreen/dbscreen.h index a3c392e..b177cfc 100644 --- a/examples/qws/dbscreen/dbscreen.h +++ b/examples/qws/dbscreen/dbscreen.h @@ -1,11 +1,11 @@ - /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the examples of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -36,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ #ifndef DBSCREEN_H #define DBSCREEN_H diff --git a/examples/qws/dbscreen/dbscreendriverplugin.cpp b/examples/qws/dbscreen/dbscreendriverplugin.cpp index c1cc03c..bc2434b 100644 --- a/examples/qws/dbscreen/dbscreendriverplugin.cpp +++ b/examples/qws/dbscreen/dbscreendriverplugin.cpp @@ -1,11 +1,11 @@ - /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the examples of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -36,12 +36,9 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ - +** +****************************************************************************/ + #include #include "dbscreen.h" diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 2e6397b..4d8883c 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -1,11 +1,11 @@ /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the qmake application of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the qmake application of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -36,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ #include "unixmake.h" #include "option.h" diff --git a/src/gui/kernel/qt_mac.cpp b/src/gui/kernel/qt_mac.cpp index 6b2bbcb..2b9d073 100644 --- a/src/gui/kernel/qt_mac.cpp +++ b/src/gui/kernel/qt_mac.cpp @@ -1,11 +1,11 @@ /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the QtGui module of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -36,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ #include #include -- cgit v0.12 From fe501b51b03c8c48c3efada83e8ae278c93ae5ab Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 1 Sep 2009 17:38:56 +0200 Subject: Doc: Fixed broken links to renamed functions. Reviewed-by: Trust Me --- src/gui/widgets/qcalendarwidget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp index 14efb9f..9c8ca01 100644 --- a/src/gui/widgets/qcalendarwidget.cpp +++ b/src/gui/widgets/qcalendarwidget.cpp @@ -1968,9 +1968,7 @@ void QCalendarWidgetPrivate::_q_editingFinished() The widget is initialized with the current month and year, but QCalendarWidget provides several public slots to change the year - and month that is shown. The currently displayed month and year - can be retrieved using the currentPageMonth() and currentPageYear() - functions, respectively. + and month that is shown. By default, today's date is selected, and the user can select a date using both mouse and keyboard. The currently selected date @@ -1983,6 +1981,9 @@ void QCalendarWidgetPrivate::_q_editingFinished() all. Note that a date also can be selected programmatically using the setSelectedDate() slot. + The currently displayed month and year can be retrieved using the + monthShown() and yearShown() functions, respectively. + A newly created calendar widget uses abbreviated day names, and both Saturdays and Sundays are marked in red. The calendar grid is not visible. The week numbers are displayed, and the first column @@ -2292,7 +2293,7 @@ int QCalendarWidget::monthShown() const selected date. The currently displayed month and year can be retrieved using the - currentPageMonth() and currentPageYear() functions respectively. + monthShown() and yearShown() functions respectively. \sa yearShown(), monthShown(), showPreviousMonth(), showNextMonth(), showPreviousYear(), showNextYear() -- cgit v0.12 From 400d72d5c4b1556ddcc188d82a24d5439f728bbe Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 1 Sep 2009 18:50:41 +0200 Subject: Don't seg-fault when printing error message in shader manager It's very likely that some of the shader objects in required program will be null, as not all are manditory. Check to see if they exist before de-referencing them and asking for their log string. Reviewed-by: Trustme --- .../gl2paintengineex/qglengineshadermanager.cpp | 36 +++++++++++++++------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 891c027..d48a7b6 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -570,20 +570,34 @@ bool QGLEngineShaderManager::useCorrectShaderProg() requiredProgram.program->link(); if (!requiredProgram.program->isLinked()) { + QLatin1String none("none"); + QLatin1String br("\n"); QString error; - qWarning() << "Shader program failed to link," + error = QLatin1String("Shader program failed to link,") #if defined(QT_DEBUG) - << '\n' - << " Shaders Used:" << '\n' - << " mainVertexShader = " << requiredProgram.mainVertexShader->objectName() << '\n' - << " positionVertexShader = " << requiredProgram.positionVertexShader->objectName() << '\n' - << " mainFragShader = " << requiredProgram.mainFragShader->objectName() << '\n' - << " srcPixelFragShader = " << requiredProgram.srcPixelFragShader->objectName() << '\n' - << " maskFragShader = " << requiredProgram.maskFragShader->objectName() << '\n' - << " compositionFragShader = "<< requiredProgram.compositionFragShader->objectName() << '\n' + + br + + QLatin1String(" Shaders Used:\n") + + QLatin1String(" mainVertexShader = ") + + (requiredProgram.mainVertexShader ? + requiredProgram.mainVertexShader->objectName() : none) + br + + QLatin1String(" positionVertexShader = ") + + (requiredProgram.positionVertexShader ? + requiredProgram.positionVertexShader->objectName() : none) + br + + QLatin1String(" mainFragShader = ") + + (requiredProgram.mainFragShader ? + requiredProgram.mainFragShader->objectName() : none) + br + + QLatin1String(" srcPixelFragShader = ") + + (requiredProgram.srcPixelFragShader ? + requiredProgram.srcPixelFragShader->objectName() : none) + br + + QLatin1String(" maskFragShader = ") + + (requiredProgram.maskFragShader ? + requiredProgram.maskFragShader->objectName() : none) + br + + QLatin1String(" compositionFragShader = ") + + (requiredProgram.compositionFragShader ? + requiredProgram.compositionFragShader->objectName() : none) + br #endif - << " Error Log:" << '\n' - << " " << requiredProgram.program->log(); + + QLatin1String(" Error Log:\n") + + QLatin1String(" ") + requiredProgram.program->log(); qWarning() << error; delete requiredProgram.program; } else { -- cgit v0.12 From d21fc5446c7583e153c1d566aefd7186f9c445cd Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 1 Sep 2009 18:55:05 +0200 Subject: Autotest which checks you can paint to an fbo in a gl widget's p.e. The test mimics examples/opengl/framebufferobjects in that it begins a QPainter on a QGLWidget in it's paint event, then begins a second QPainter on a QGLFramebufferObject, leaving 2 painters active at the same time. When the FBO's painter is ended, GL rendering should be re-targetted at the QGLWidget automatically. --- tests/auto/qgl/tst_qgl.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 1629542..f979174 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -73,6 +73,7 @@ private slots: void partialGLWidgetUpdates(); void glWidgetRendering(); void glFBORendering(); + void glFBOUseInGLWidget(); void glPBufferRendering(); void glWidgetReparent(); void colormap(); @@ -769,6 +770,60 @@ void tst_QGL::glFBORendering() QCOMPARE(fb.pixel(192, 64), QColor(Qt::green).rgb()); } +class FBOUseInGLWidget : public QGLWidget +{ +public: + bool widgetPainterBeginOk; + bool fboPainterBeginOk; + QImage fboImage; +protected: + void paintEvent(QPaintEvent*) + { + QPainter widgetPainter; + widgetPainterBeginOk = widgetPainter.begin(this); + QGLFramebufferObjectFormat fboFormat(0, QGLFramebufferObject::CombinedDepthStencil); + QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat); + + QPainter fboPainter; + fboPainterBeginOk = fboPainter.begin(fbo); + fboPainter.fillRect(0, 0, 128, 128, Qt::red); + fboPainter.end(); + fboImage = fbo->toImage(); + + widgetPainter.fillRect(rect(), Qt::blue); + + delete fbo; + } + +}; + +void tst_QGL::glFBOUseInGLWidget() +{ + if (!QGLFramebufferObject::hasOpenGLFramebufferObjects()) + QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle); + + FBOUseInGLWidget w; + w.resize(128, 128); + w.show(); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&w); +#endif + QTest::qWait(200); + + QVERIFY(w.widgetPainterBeginOk); + QVERIFY(w.fboPainterBeginOk); + + QImage widgetFB = w.grabFrameBuffer(false); + QImage widgetReference(widgetFB.size(), widgetFB.format()); + widgetReference.fill(0xff0000ff); + QCOMPARE(widgetFB, widgetReference); + + QImage fboReference(w.fboImage.size(), w.fboImage.format()); + fboReference.fill(0xffff0000); + QCOMPARE(w.fboImage, fboReference); +} + void tst_QGL::glWidgetReparent() { // Try it as a top-level first: -- cgit v0.12 From 491bf41b96fdc48aa166ae7702e00f3e6eb1825c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 1 Sep 2009 19:16:11 +0200 Subject: Fix Solaris build: test isn't test. configure: test: argument expected Reviewed-by: TrustMe --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6832ad3..c519ab1 100755 --- a/configure +++ b/configure @@ -3723,8 +3723,9 @@ elif [ "$Edition" = "OpenSource" ]; then echo "You have already accepted the terms of the $LicenseType license." acceptance=yes else - test -e "$relpath/LICENSE.GPL3" && \ + if [ -e "$relpath/LICENSE.GPL3" ]; then echo "Type '3' to view the GNU General Public License version 3." + fi echo "Type 'L' to view the Lesser GNU General Public License version 2.1." echo "Type 'yes' to accept this license offer." echo "Type 'no' to decline this license offer." -- cgit v0.12