Extending the inputMethodQuery API

Currently, inputMethodQuery() only provides information about the
current paragraph. On some platforms, such as Android, the input method
needs information about the global cursor position, and more of the
surrounding text. Some queries need to pass parameters.

The current inputmethodQuery() implementation does not allow parameters to
be passed. Changing this would require new or modified virtual functions, which
is not possible until Qt 6. Therefore, a completely new mechanism is needed.

Change-Id: Ic64fd90198ade70aa0fa6fa5ad3867dfa7ed763c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Consolidate StandardButton, ButtonRole and related static functions

Moving them into QPlatformDialogHelper for the convenience of both
widgets and QtQuick.Dialogs.  The main reason is to ensure that
QtQuick.Dialogs does not need to depend on the widgets module, in
order to re-implement the button box concept in a generic dialog.

Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
WinRT: Exit process event loop if WaitForMoreEvents is not set

Change-Id: Ic74a75a56ba3f014b108e96d7a79a8623e6fa1d1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
WinRT: Added socket engine implementation

Added basic functionality to socket for WinRT. Even though not
all auto tests pass yet, this patch can be seen as a foundation
for upcoming work in this area. Reading from and writing to TCP
socket works and one can listen for tcp connections.

Change-Id: Id4c25ba1c7187ed92b6368c785c4f62837faded7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Revert "Logging: Don't use for loop in qCDebug macros"

The use of if {} else {} in the macro causes compiler warnings
about "ambiguous 'else'" if qCDebug is used in an if / else without brackets.

Revert to the for loop, but make the variable name less likely
to clash.

This reverts commit bab5f5873680aa3c5a22d94da112aafd2b0b53d3.

Task-number: QTBUG-36605
Change-Id: Ie4b075b63b83b7f8a2ad61437b7bf3e6a6c0177a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Exclude widgets without associated QWindow in QApplication::shouldQuit().

Task-number: QTBUG-35986

Change-Id: Ibeb425fe054af163b86b2142028b3ea744cb9820
Reviewed-by: David Faure <david.faure@kdab.com>
Add const overload for QLoggingCategory::operator()()

Change 85e57653 caused a compile error for code that does

  Q_DECLARE_LOGGING_CATEGORY(cat);
  //..
  qCDebug(cat()) << // ...

error: C3848: expression having type 'const QLoggingCategory' would lose
some const-volatile qualifiers in order to call 'QLoggingCategory
&QLoggingCategory::operator ()(void)'

This is a regression from Qt 5.2. Fix the error by adding a const version
of operator()().

Change-Id: I2fb04f2e155962adee0f98089fc5a159000bef56
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Android: Add enablers for listening to activity results

When you launch an activity through an intent,
data can be provided back from the activity when it has finished
using onActivityResult() in the activity which launched it.

This is okay for applications, since they can easily create their
own activities, but does not work for libraries that need to
use intents. There is no listener API for activity results which
allow external classes to eavesdrop.

In order to support launching intents from third-party or add-on
libraries, we provide a low-level way to hook into the activity
result event. The corresponding public API will be added to
QtAndroidExtras.

Change-Id: I89417f485e2c0e69028dcccc7c155788346a7417
Reviewed-by: Christian Stromme <christian.stromme@digia.com>