diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-04 09:26:33 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-04 09:26:33 (GMT) |
commit | 95c0a8de7af1e631485117f5764f4e2677ec6d0b (patch) | |
tree | 9f1fd8726b7f33a6958f3cf395c3ea1300c2d580 /examples | |
parent | a800e1d5e7fa69a3bfa21d74c5db47f5a41ed65c (diff) | |
parent | 397c3bb494e220af5ef1cf6e47cfdfc84b61540b (diff) | |
download | Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.zip Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.tar.gz Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.tar.bz2 |
Merge commit 'mainline/master' into kinetic-declarativeui
Conflicts:
configure.exe
src/gui/math3d/qmatrix4x4.cpp
src/gui/math3d/qmatrix4x4.h
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'examples')
-rw-r--r-- | examples/animation/sub-attaq/mainwindow.cpp | 2 | ||||
-rw-r--r-- | examples/dialogs/sipdialog/dialog.cpp | 13 | ||||
-rw-r--r-- | examples/dialogs/sipdialog/main.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/hellogl_es2/glwidget.cpp | 8 |
4 files changed, 13 insertions, 12 deletions
diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp index 5e8e259..123363b 100644 --- a/examples/animation/sub-attaq/mainwindow.cpp +++ b/examples/animation/sub-attaq/mainwindow.cpp @@ -44,6 +44,8 @@ #include "graphicsscene.h" //Qt +#include <QGraphicsView> + #ifdef QT_NO_OPENGL #include <QtGui/QMenuBar> #include <QtGui/QLayout> diff --git a/examples/dialogs/sipdialog/dialog.cpp b/examples/dialogs/sipdialog/dialog.cpp index 9f1b9ad..653b518 100644 --- a/examples/dialogs/sipdialog/dialog.cpp +++ b/examples/dialogs/sipdialog/dialog.cpp @@ -90,7 +90,7 @@ Dialog::Dialog() //! [Dialog constructor part4] //! [Dialog constructor part5] - connect(button, SIGNAL(pressed()), + connect(button, SIGNAL(clicked()), qApp, SLOT(closeAllWindows())); connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(desktopResized(int))); @@ -111,14 +111,13 @@ void Dialog::reactToSIP() { QRect availableGeometry = QApplication::desktop()->availableGeometry(0); - if (desktopGeometry.width() == availableGeometry.width()) { - if (desktopGeometry.height() > availableGeometry.height()) { + if (desktopGeometry != availableGeometry) { + if (windowState() | Qt::WindowMaximized) setWindowState(windowState() & ~Qt::WindowMaximized); - setGeometry(availableGeometry); - } else { - setWindowState(windowState() | Qt::WindowMaximized); - } + + setGeometry(availableGeometry); } + desktopGeometry = availableGeometry; } //! [reactToSIP() function] diff --git a/examples/dialogs/sipdialog/main.cpp b/examples/dialogs/sipdialog/main.cpp index 5fcbfd8..fec6de2 100644 --- a/examples/dialogs/sipdialog/main.cpp +++ b/examples/dialogs/sipdialog/main.cpp @@ -48,6 +48,6 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Dialog dialog; - dialog.exec(); + return dialog.exec(); } //! [main() function] diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp index ee50670..cb4a48d 100644 --- a/examples/opengl/hellogl_es2/glwidget.cpp +++ b/examples/opengl/hellogl_es2/glwidget.cpp @@ -190,7 +190,7 @@ void GLWidget::initializeGL () " color = clamp(color, 0.0, 1.0);\n" " gl_Position = matrix * vertex;\n" "}\n"; - vshader1->setSourceCode(vsrc1); + vshader1->compile(vsrc1); QGLShader *fshader1 = new QGLShader(QGLShader::FragmentShader, this); const char *fsrc1 = @@ -199,7 +199,7 @@ void GLWidget::initializeGL () "{\n" " gl_FragColor = color;\n" "}\n"; - fshader1->setSourceCode(fsrc1); + fshader1->compile(fsrc1); program1.addShader(vshader1); program1.addShader(fshader1); @@ -224,7 +224,7 @@ void GLWidget::initializeGL () " gl_Position = matrix * vertex;\n" " texc = texCoord;\n" "}\n"; - vshader2->setSourceCode(vsrc2); + vshader2->compile(vsrc2); QGLShader *fshader2 = new QGLShader(QGLShader::FragmentShader); const char *fsrc2 = @@ -237,7 +237,7 @@ void GLWidget::initializeGL () " color = color * 0.2 + color * 0.8 * angle;\n" " gl_FragColor = vec4(clamp(color, 0.0, 1.0), 1.0);\n" "}\n"; - fshader2->setSourceCode(fsrc2); + fshader2->compile(fsrc2); program2.addShader(vshader2); program2.addShader(fshader2); |