summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-09 01:19:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-09 01:19:49 (GMT)
commitd9c84c26dc212b2f170dfb48346df7c439e6f759 (patch)
tree73ecbd1987d064616f07dd8d811a5ae57c45e001 /src
parent43c831fb56b9e1cff95b21c210bd85f5b67c99b1 (diff)
parent63fdbf4633552126197fad0d5f0595d505a28164 (diff)
downloadQt-d9c84c26dc212b2f170dfb48346df7c439e6f759.zip
Qt-d9c84c26dc212b2f170dfb48346df7c439e6f759.tar.gz
Qt-d9c84c26dc212b2f170dfb48346df7c439e6f759.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: [QTBUG-15278] QWidget::windowState gets out of sync (Aero Snap) HTTP cacheing: do not store the date header with the resource
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_win.cpp34
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp13
2 files changed, 30 insertions, 17 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 6e89ceb..913bc7e 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -3779,16 +3779,32 @@ bool QETWidget::translateConfigEvent(const MSG &msg)
QApplication::sendSpontaneousEvent(this, &e);
hideChildren(true);
}
- } else if (msg.wParam != SIZE_MINIMIZED && isMinimized()) {
+ } else if (msg.wParam != SIZE_MINIMIZED) {
+ bool window_state_changed = false;
+ Qt::WindowStates oldstate = Qt::WindowStates(dataPtr()->window_state);
+ if (isMinimized()) {
#ifndef Q_WS_WINCE
- const QString title = windowTitle();
- if (!title.isEmpty())
- d_func()->setWindowTitle_helper(title);
+ const QString title = windowTitle();
+ if (!title.isEmpty())
+ d_func()->setWindowTitle_helper(title);
#endif
- data->window_state &= ~Qt::WindowMinimized;
- showChildren(true);
- QShowEvent e;
- QApplication::sendSpontaneousEvent(this, &e);
+ data->window_state &= ~Qt::WindowMinimized;
+ showChildren(true);
+ QShowEvent e;
+ QApplication::sendSpontaneousEvent(this, &e);
+ // Capture SIZE_MAXIMIZED and SIZE_RESTORED without preceding WM_SYSCOMMAND
+ // (Aero Snap on Win7)
+ } else if (msg.wParam == SIZE_MAXIMIZED && !isMaximized()) {
+ data->window_state |= Qt::WindowMaximized;
+ window_state_changed = true;
+ } else if (msg.wParam == SIZE_RESTORED && isMaximized()) {
+ data->window_state &= ~(Qt::WindowMaximized);
+ window_state_changed = true;
+ }
+ if (window_state_changed) {
+ QWindowStateChangeEvent e(oldstate);
+ QApplication::sendSpontaneousEvent(this, &e);
+ }
}
}
if (msg.wParam != SIZE_MINIMIZED && oldSize != newSize) {
@@ -3820,7 +3836,7 @@ bool QETWidget::translateConfigEvent(const MSG &msg)
QApplication::postEvent(this, e);
}
}
-} else if (msg.message == WM_MOVE) { // move event
+ } else if (msg.message == WM_MOVE) { // move event
int a = (int) (short) LOWORD(msg.lParam);
int b = (int) (short) HIWORD(msg.lParam);
QPoint oldPos = geometry().topLeft();
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 108ac68..7c90f68 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -1001,14 +1001,11 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (hop_by_hop)
continue;
- // for 4.6.0, we were planning to not store the date header in the
- // cached resource; through that we planned to reduce the number
- // of writes to disk when using a QNetworkDiskCache (i.e. don't
- // write to disk when only the date changes).
- // However, without the date we cannot calculate the age of the page
- // anymore.
- //if (header == "date")
- //continue;
+ // we are currently not using the date header to determine the expiration time of a page,
+ // but only the "Expires", "max-age" and "s-maxage" headers, see
+ // QNetworkAccessHttpBackend::validateCache() and below ("metaData.setExpirationDate()").
+ if (header == "date")
+ continue;
// Don't store Warning 1xx headers
if (header == "warning") {