Windows: Fix toplevel window flags for Qt::Dialogs/Qt::Tool.

Task-number: QTBUG-31111

Change-Id: I58dcf8101077f18c7867cae914026c692735fc15
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix regression when pasting into QTextEdit from Firefox.

Return the codec if one was found by QTextCodec::codecForUtfText,
instead of returning the default (UTF-8).

Task-number: QTBUG-31293

Change-Id: I95e3260376c00537006b7fbfdc3df5850e1ba657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cocoa: Amend 5d07a4d9448f60 to avoid an assert in QWidget::mapTo()

For now, we only call 'flushWindowSystemEvents()' for top-level
QWindows.

Change-Id: Ie6f6d3f9b70241820d9c38bcc0caf832d521268b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>