Remove QT_STATIC_CONST

This macro is no longer used. It was introduced probably by mistake,
due to MSVC not following the strict string requirement of the C and
C++ standards by default (you can assign a string literal to a
non-const char*).

Change-Id: I4b221dd435191b0eea689dbed35915cf3206648b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Mark all QChar static functions as [[gnu::const]]

The GCC documentation says that a const function is not allowed to read
global memory. This needs to be clarified: it's not allowed to read RW
global memory. It's fine to read read-only memory, as that is equivalent
to just pure code.

The QChar static out-of-line functions only lookup a property of the
given Unicode character and always return the same value.

The only exception is the decomposition() function, which returns a
QString and is therefore not allowed to be marked const.

Change-Id: Id36b2f84a1b8ff9db5acf1d4e59e8b3811068cff
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Add missing detection for some 64-bit architectures

Architectures missing were arm64, mips64, power64, s390x and sparcv9
(sparc64, but we're using the name that matches the Q_PROCESSOR_xxx
define, which in turn matches Solaris's psrinfo output).

Change-Id: I50b8152b3c42589b98db157b9efeae2be6a90414
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Enforce strict string literal behaviors with MSVC 2013

MSVC 2013 implements the behavior mandated by C++11 that removes the
ability to downconvert a string literal to a modifiable char*, but it's
not enabled by default. This option turns it on.

It's only enabled for release builds because the compiler page has a note
saying the Standard Library has bugs that prevent it from working in
debug mode. See http://msdn.microsoft.com/en-us/library/dn449508.aspx

Visual Studio "14" has this fixed.

[ChangeLog][Compiler Specific Changes] Release builds with Microsoft
Visual Studio 2013 now enable the standard-conforming C and C++ strict
string behavior. This option will be enabled in all builds with future
Visual Studio versions. Non-conforming code should be fixed for maximum
portability and correctness. See
http://msdn.microsoft.com/en-us/library/dn449508.aspx for more
information.

Change-Id: If5ba6cc8456209b268e047d1010710fe332b8312
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Don't look up a QChar's digit value more than necessary

It isn't a particularly complex operation, but why waste CPU cycles?

This is the kind of function that should be declared pure/const.

Change-Id: I13f03ef0f87607f7649c66beeb37614a31ef2a10
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
QObject: don't hold mutex when copying arguments in a QueuedConnection

QMetaType::create can call user code and we should not keep mutex held as
this may cause dead lock.

Make sure the tst_qobjectrace actually emit some signal so the test check
there is no race if the receiver object is destroyed while
the mutex is unlocked.

Task-number: QTBUG-39990
Change-Id: I56ca1ae7a11cd7b33c1a68727370972862e11c2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QNX: Override QPlatformScreen::grabWindow

The grabWindow API basically should return a screenshot at the window
location. On QNX only the SCREEN_DISPLAY_MANAGER_CONTEXT can read from
the screen which will require root privileges.
At least this will fix some QWidget auto tests that rely on this API.

Change-Id: I350233173d3aecd376f48af9f650606a5cce6205
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>