Replace the qCpuHasFeature function with a macro

We want to make sure that there's a constant propagation from the static
variable that is filled in with the current code-generation options.
With most compilers in debug mode, we'd carry dead code. With MSVC, even
inlining is really bad even in release mode, and it doesn't perform
constant propagation even with __forceinline.

Change-Id: I7a95ff6622b864771243990bb5e205b2df0c33fc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Fix bad CSS color: O (the letter) is not a valid hex digit

Found by: Tomaz Canabrava <tcanabrava@kde.org>
Change-Id: Ia1b5b00819cf4b145d1384aacbd54ed9a23aa6a3
Reviewed-by: Dirk Hohndel
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QSpinBox: allow positive values to be entered with the '+' prefix.

The code was there to do it, but it was using minimumValue instead of
maximumValue to test if the '+' should be allowed.

Task-number: QTBUG-20691

[ChangeLog][QtWidgets][QSpinBox] Entering positive values with the '+'
prefix is now allowed.

Change-Id: Iff62d073e350dc9a33b7e06e4b492048c74437c4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QTimeZone: Fix isValidId()

Fix isValidId() which was failing valid IDs because it was splitting
name parts by \ instead of /.  it was also rejecting offset from UTC
formats names.  Add unit tests.

Task-number: QTBUG-35025
Change-Id: I4d23d2e54f4a9fac9afcc4eff0a02d6f4af21385
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCommandLineParser: pluck some low-hanging fruit re: exception safety

Make
  QCommandLineParser::add{Help,Version}Option()
  QCommandLineOption::setDefaultValue()
  QCommandLineOptionPrivate::setNames()
have transaction semantics: either they succeed, or they change nothing.
It's trivial to provide this guarantee, so do it.

Add a test for the surprising property that setDefaultValue("") resets
defaultValues() to an empty QStringList instead of one that contains
the empty string.

Change-Id: I61623019de3c7d2e52c24f42cc2e23ec5fddc4da
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Correct compiler warnings for sign conversion

qstrlen() returns a uint. When assigned to an int, the compiler warns
about sign conversions. Because these calls are used within templates,
the code appears in user generated code, and hence the warnings cannot
be suppressed by the -isystem directive. Using the -Werror flag, makes
the user code fail.

[ChangeLog][QtCore] Fixed sign conversion warnings in code using QMetaTypeId.

Change-Id: Ib7603679d6526467f8cbb9d7bcf5f56c6af47ceb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Windows: Don't cover the taskbar when maximizing frameless windows

Brings Windows QPA on par with other platforms.

[ChangeLog][Windows] Don't cover the taskbar when maximizing
frameless windows.

Task-number: QTBUG-8361
Change-Id: Iba35132f697cb7379650a4c883b616c5c2023d4c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix quadratic behavior in QMetaObjectBuilder when writing string table

QHash::key() is O(n) and we're calling it n times. That can make repeated
calls to the meta object builder very slow, as for example QQmlPropertyMap
when inserting properties repeatedly.

Fortunately this is easy to fix, as the value in the hash map is also the
index, so we can simply iterate over the hash once. With the exception of
the class name, which we have to treat specially to ensure that it is always
the first entry in the string table.

Task-number: QTBUG-32720
Change-Id: Ic954c45c454107feee83216131f601cc69d4c63b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>