summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-06-02 08:54:38 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-06-02 08:54:38 (GMT)
commitb31819a2871f0479da59c01d9fc7469d36120c2b (patch)
tree66a52c719c144295a3adf9d6d7b4cff3a63c13ea /examples
parentd52fb58f34199e9a6e008929425cd21b92a2674a (diff)
parentd018549a25761b5e50d90939d94384f23d7a01e0 (diff)
downloadQt-b31819a2871f0479da59c01d9fc7469d36120c2b.zip
Qt-b31819a2871f0479da59c01d9fc7469d36120c2b.tar.gz
Qt-b31819a2871f0479da59c01d9fc7469d36120c2b.tar.bz2
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt
Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tests/auto/selftests/expected_skip.txt tests/auto/selftests/tst_selftests.cpp
Diffstat (limited to 'examples')
-rw-r--r--examples/dialogs/sipdialog/dialog.cpp13
-rw-r--r--examples/dialogs/sipdialog/main.cpp2
2 files changed, 7 insertions, 8 deletions
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]