SPDY must handle destoyed QNetworkReply

A QNetworkReply may be deleted before it is closed by the protocol.
Since QSpdyProtocolHandler tracks pointers to QNetworkReplies it must
keep track of their destruction as well to avoid links to deleted
objects.

This fixes the last issue with SPDY access of Google Mail in QtWebKit.

Change-Id: I2c56dc080fdcb249b6ed9189fef84cbbc1220cbd
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Cocoa: Use helper class for event handling in native windows

QNSWindow and QNSPanel duplicate some code when it comes to event
handling, which can be refactored. Also, it's currently not
possible to keep an NSWindow derived instance temporarily alive
as QCocoaWindow is not designed to keep track of more than one
NSWindow. Finally, we can reduce the size of (and eventually remove)
the QCocoaWindowCategory which polutes the NSWindow namespace.

We move QNSWindow and QNSPanel specific API into QNSWindowProtocol,
and define QCocoaNSWindow as NSWindow extended by that protocol.
This gives us a type we can refer to any of the native windows
QCocoaWindow instanciates.

We introduce QNSWindowHelper which gathers the common code between
QNSWindow and QNSPanel. This is a one-to-one mapping that keeps a
weak (non-retaining) reference to the NSWindow and a weak reference
to the QCocoaWindow. It has the same life span as its associated
NSWindow.

Task-number: QTBUG-33082
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Change-Id: I38d001bf13f64a1ba4f1439291c5103c3f755183
Reviewed-by: Liang Qi <liang.qi@digia.com>
Cocoa: Keep child NSWindow alive while it grabs the mouse

Otherwise, Cocoa loses sight on which window to send the
dragging mouse event. If the window is kept alive (but hidden)
Cocoa will send the events to it, and we can forward them to
the actual QWindow.

This is the expected use-case:

  1. Start dragging a QWindow and change its flags.
  2. This triggers a call to QCocoaWindow::recreateWindow(),
     which will get rid of the old NSWindow and create a new
     one (the QNSView is moved to the new NSWindow).
  3. When we stop dragging, the NSWindow is finally destroyed.

QNSView Pointer References Remarks:

In QNSView, m_window points to the QWindow which remains unchanged
until deleted. Similarly m_platformWindow remains valid until
deleted, in which case we delete the QNSView, the NSWindow and its
helper (see QCocoaWindow destructor).

This fixes undocking QToolBars when they are a child NSWindow.

Task-number: QTBUG-33082
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Change-Id: I6fc53292cd96586cfdf401481c5442d759f1fae5
Reviewed-by: Liang Qi <liang.qi@digia.com>
Windows Vista Style: Don't draw menubar item background for QQ Controls

In QtQuick Controls, we draw the full menubar background and the menubar
items on top. Unless in a particular state, there's no need to draw the
background or it may overlap with the menubar edge.

Change-Id: Ia35a73274cc10b3b5a3f55573c92919f99555db0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Turn off compiler optimization in tst_qtendian for MSVC2008.

This causes frequent compiler errors on Windows CE.

tests\auto\corelib\global\qtendian\tst_qtendian.cpp(140) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'd:\orcas\compiler\utc\src\P2\main.c[0xCCCCCCCC:0xCCCCCCCC]', line 243)

Task-number: QTBUG-37194

Change-Id: I2adbc1e3b1896fbe86780aa26a15e918333a09f2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Win32: define _HAS_EXCEPTIONS as 0 when exceptions are off.

When this macro is not defined, a number of inline methods in the MSVC
stl will throw exceptions. This in turn generates a warning when
exceptions are not enabled on the compiler command-line.

Change-Id: I5a57ec544bda0c75f04fdea9412b03107f9ff531
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Doc: fix documentation of QProgressDialog::open

The slot is connected to the canceled() signal and not to the
accepted() signal since the introduction of the open method.

Task-number: QTBUG-37210
Change-Id: I0604c612f6054611a69876d53908bb58ec048b09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Doc: fix Q_ASSERT example

Task-number: QTBUG-37162
Change-Id: Ifef8a976d29125251d7d87028c29deee4353e10a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>