QFontconfigDatabase weight-matching refactoring

Factor out the piece-wise linear weight matching in an attempt to make
it less error-prone to add new weights to the QFont::Weight enum.

Change-Id: I5fefdba67a60a061f8b9104393194a27bc8c6e35
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
qdoc: ignore Q_DECL_OVERRIDE

Change-Id: Idf07753b6811c1ec8dba1ddd0fbb8036ce6723f2
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Micro-optimize QVariant enum to number conversions

Change-Id: I2296d9417e0d1ef08084fb259885ac2a3eff9fe8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
OS X: remove use of Carbon API for scroll events; fix ScrollBegin

NSEventPhaseMayBegin doesn't happen with some types of trackpads, so
don't treat NSEventPhaseBegan as Qt::ScrollUpdate.

Change-Id: Ica97d49692a904e20c8eb0250760e6370311ee40
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
QCommandLineParser: Show usage and errors in message boxes on Windows.

Use the Windows MessageBox API if no console window can be obtained.

[ChangeLog][QtCore][QCommandLineParser] Message boxes are used
to display errors and usage if no console window can be obtained
on Windows.

Change-Id: I63ee8e4d8bd78db83e688fd69374779102562aa3
Reviewed-by: David Faure <david.faure@kdab.com>