Revert recent attempt to fix Invalid Drawable error on Mac.

This reverts commit 59fd36bb914cae248d3c5100dd734d6d90a58dca,
which caused other drawing problems.

Change-Id: I3bb75fd3ca1cd21ffbb9ef5474266f4cd615a64a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Xcode: Resolve extra compiler (e.g qrc) dependencies

The Xcode generator relies on the generic makefile generator for extra
compilers such as qrc and moc, by generating makefiles that are then
executed as separate build steps in the Xcode build.

These makefiles are generated by entering a special mode in the Xcode
generator, in which case we _do_ want to resolve dependencies, so that
e.g. the files referenced inside a qrc file are added as dependencies
to the makefile rule that generates the qrc-cpp file.

Change-Id: I96bdcb165e9774a6328ae1980986fa2c6b00c6d9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Doc: Fix copy+paste errors in the QString class ref

Also bring text closer to the style guide at
http://qt-project.org/wiki/CppDocumentationStyle

Change-Id: I30b1c36ac125a10c002efeb36978ced0d7a8f8bf
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Doc: Add an overview page to compare multithreading techniques

Change-Id: I75e67ecb96423a3ebd82b32e6855378a73463fb7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Doc: Move multithreading guidelines to the overview page

It's helpful to see how to choose among different solutions, right
after seeing short descriptions of all the solutions.

- Some minor rewording was done during the move
- The example about polling ports in a new thread was removed because
  there are better ways to do that without threads.

Change-Id: I2cb571a4dbf9be93fb0ec88c60fb7406996c345b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Doc: Remove page about how to start QThreads

Multiple issues:
- Incomplete: It doesn't talk about instantiating a raw QThread
- Redundant: Its contents are already presented in QThread's class ref
- Incorrect: It is legal to create a QThread before a QCoreApplication
- Irrelevant: The bit about QCoreApplication::exec() and the etymology
  of "GUI thread" is unrelated to the topic of starting threads

Also remove snippets that are no longer used

Change-Id: Ice1819845b5b2cf843719edaa7b0f4bbb1e8bd97
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Doc: Remove section about how to start threads

- Incomplete: It doesn't talk about how to use a raw QThread, or
  QRunnable, or Qt Concurrent.
- Redundant: Its contents are already presented in QThread's class ref,
  and the line before this section links to the "Multithreading
  Technologies in Qt" overview page which provides a more complete intro

Also remove snippet markers that are no longer used.

Change-Id: I89b7bd72f10c8ffdfd9b7772e2493050aafc9c88
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix loss of valid dbus objects after unregisterObject

Partial revert of 3c6bb0ed8bfc9a2c679f4154585a16e47275ad21 and
57aed703d21c3a360d95fd9f85396d1283d3fdd0.

When registering an object that was previously unregistered but not yet
garbage collected, the activeChildren count on the parent node was not
incremented, which could result in other registered objects disappearing
after a later unregisterObject.

Copying objects in the tree is not free, but it's not expensive enough
or used frequently enough to justify that error-prone logic. It's much
safer to simply remove objects immediately.

Change-Id: I3dc59c2ebd07b237518424fcd8ea7371a22d6d15
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
examples: remove unused static const variables

They cause warnings on Clang.

Change-Id: If599303f4a00c2a24f0a7c369299f3ea6fe7fc91
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
examples: fix if (!foo == 0)

Clang issues a warning for this.

Change-Id: I1b9741d0260d43f864e404c693b5a459c5038b67
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
tst_QSettings: add missing () around a macro argument use

'val' was set to
   QList<...>() << ... << ...
further down.

Fixes a Clang warning.

Change-Id: I5fe80d87dbe2c1d50652dfd7b6c5f4a9198cd467
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_qurlinternal: fix a use of memcpy on overlapping memory

The old code smply copied 100 shorts from the pointer passed into the
ushortarray ctor, regardless of the actual bounds of the original array.

Fix by making the ctor take the array by deference, deducing the size
as a template parameter, and only copying that much.

Fixes asan trace:
==18660==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff3c56de00,0x7fff3c56dec8) and [0x7fff3c56dd60, 0x7fff3c56de28) overlap
    #0 0x457161 in memcpy asan_interceptors.cc:330
    #1 0x4c40fe in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:62
    #2 0x4b0437 in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:63
    #3 0x47b643 in tst_QUrlInternal::idna_testsuite_data() qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:119
    ...

Change-Id: Ie497bc8d337bc680a562482ca71ace535797ffb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QtDBus: fix build on MSVC2008 Debug mode.

Normally, searching for a V in a container of T using std::lower_bound
only needs an operator<(T,V). But in MSVC2008 debug mode, STL algorithms
perform some extra checks, such as ensuring the range passed to
std::lower_bound is sorted. This adds a requirement for operator<(T,T)
and operator<(V,T).

QtDBus didn't compile on MSVC2008+Debug since 1e37d854 (Sept 2012!)
because it missed those operator overloads for some private types.

Task-number: QTBUG-33473
Change-Id: I18902d86e6c58349eb7ba3601dc383ad5431c460
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev