Commit Graph

22078 Commits

Author SHA1 Message Date
Thiago Macieira
be5b04fd37 Move enabling of C++11 Unicode Strings with ICC from 12.1 to 14.0
The support in 12.1 and 13.x appears to be incomplete. Move it to the
official supported version

https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler

Note: this commit will cause a conflict in 5.5 against
99357e32a0

Task-number: QTBUG-43864
Change-Id: Ic5d393bfd36e48a193fcffff13b9a07106e96795
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-17 05:03:29 +01:00
Friedemann Kleint
9d1bcd727a Diaglib/Event filter: Output application state on focus events.
Output the current active/modal/popup windows when receiving
FocusAboutToChange or FocusIn events.

Task-number: QTBUG-42731
Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-16 17:25:20 +01:00
Morten Johan Sørvig
b2cff0b4bf Fix stylesheet crash.
Style sheets that refer to the progress bar (like
"QProgressDialog[maximum='0']{}") may dereference a
null-pointer during the styleHint() call in QProgressDialogPrivate::init()
since the progress bar has not been created yet.

Move the creation of the progress bar closer to the
top of init(), before the styleHint() call.

Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90
Task-number: QTBUG-43830
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
2015-01-16 14:27:26 +01:00
Morten Johan Sørvig
5239ba95e8 Add missing AppDataLocation case
This amends commit f3bc9f5c.

Change-Id: I69b1a5080e7ac92b8a39746d814da77b17c271c2
Task-number: QTBUG-43868
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-16 13:50:28 +01:00
Marcel Krems
593e3f2fbb Update printer metrics after resolution change.
[ChangeLog][QtPrintSupport] Fixed QPrinter::{width,height} return values
when the resolution is changed in the print dialog.

Task-number: QTBUG-43124
Change-Id: Ib805907affed4b1ffb48e6b1ff89f7a79ab3e329
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-01-16 13:34:37 +01:00
Eric Lemanissier
c28718b88b Correction on bound values in case of repeated QSqlQuery::execBatch
Until now, QSqlQuery::execBatch did not call resetBindCount, which lead
the next call to QSqlQuery::addBindValue to start at non zero index.
This is problematic in case of a prepared query which is called several
times.

Task-number: QTBUG-43874
Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-16 13:14:26 +01:00
Mark Brand
2f010390ad update bundled sqlite to 3.8.7.4
The "Fixed CE build of sqlite3" patch is preserved in this change.

Change-Id: I5461571e5e0b60678727c96a9faee93f9624588c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-16 12:14:15 +01:00
Laszlo Agocs
19b8edebf5 Make transparency test actually test transparency
The OpenGL windows should have some more obvious
transparent areas in them.

Change-Id: I7d000cd367208f99a79b11c341bf94062613f357
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-16 12:12:37 +01:00
Giuseppe D'Angelo
8cbf402123 QComboBox: simplify code
Remove an useless check and hoist a costly call out of a loop.

Change-Id: Ibd1750026af44462a4f0223a9b2f422ebcc7c0e3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-16 12:08:58 +01:00
Pasi Petäjäjärvi
3c6a960b5b Rename QML debug macro to Qt naming style
With change macro is in line with QT_NO_<feature> style of naming
macros. This way it will also be automatically added to file
mkspecs/qmodule.pri in QT_NO_DEFINES value.

Change-Id: I111d07fd015994290c54e00e8aac2d6dbdb7de9e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-01-16 12:08:37 +01:00
Joerg Bornemann
e01c8103e1 fix MSVC target architecture detection for amd64_x86
When using the cross-compiler toolchain for 32 bit on a 64 bit machine,
qmake generated a 64 bit VS project.
This was because qmake didn't know about the amd64_x86 cross-compiler,
and qmake did not use the first MSVC bin directory it found in PATH.

Task-number: QTBUG-43457
Change-Id: I50c6f7bb9afe44a58321c670d680dbcc7cd07223
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-16 12:07:03 +01:00
Richard Moe Gustavsen
5884160db6 iOS: add AppIcon asset name to Xcode project
The current work-flow for adding app icons to an
iOS app during deployment is not good. You basically
need to specify that you want to use asset catalogs
from within Xcode and add your icons there. The
problem is that qmake will regenerate the Xcode project
the next time it runs, and your changes will then be lost.

This patch will check if the project has a valid asset
catalog assigned to QMAKE_BUNDLE_DATA, and configure
the Xcode project to use it for app icons.

Change-Id: I06621ca46aad91de96cb23ba8ca3b1a3f1226670
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-16 11:24:09 +01:00
Nico Vertriest
576cf413bb Doc: verb "to layout" changed to "to lay out"
Task-number: QTBUG-43657
Change-Id: I574186253ee423cc380ec3c6f274f1caa2a6aa2a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:46 +01:00
Nico Vertriest
ddbac7de8d Doc: added entry for link to main page Qt Creator
Task-number: QTBUG-43115
Change-Id: I10413536b981bf248950522dfe07b96394db9c29
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-01-16 10:29:35 +01:00
Nico Vertriest
871560d45c Doc: define target voor function qsnprintf()
Task-number: QTBUG-43537
Change-Id: I76c511891a1a07eca77da399d23097e76047f824
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:22 +01:00
Nico Vertriest
24238e6a31 Doc: link issues in corelib
Task-number: QTBUG-43115
Change-Id: Ia80802e698f16730698e9a90102f549fb35f9305
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-16 10:29:12 +01:00
Paul Olav Tvete
a8a00f646b Turn off font hinting when we do high DPI scaling
Font hinting depends on the specific pixel size, and ends up very
wrong when the painter is scaled.

Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455
Task-number: QTBUG-43809
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-16 09:52:44 +01:00
Paul Olav Tvete
c1d08afd31 Fix constantly growing window bug with devicePixelRatio
Rectangles need to be mapped differently depending on what they are
used for. Expose events need to cover the entire geometry, so they must
be rounded up, potentially increasing the size. If we use the same
conversion for window geometries, it is possible to end up with a
feedback loop if the window reacts to the new size.

Task-number: QTBUG-43743
Change-Id: I7881cc77bf2148fed2ae743c4226617a61197434
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-16 09:52:38 +01:00
Eskil Abrahamsen Blomfeldt
4448576ae0 Android: Fix QLayout tests
This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().

Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:57 +01:00
Eskil Abrahamsen Blomfeldt
7a760f5ed9 Android: Fix QDirModel tests
This test needs to have a test environment available on the regular
file system, so we create this when initializing the test. In
addition we QEXPECT_FAIL one of the tests which seems to expose
a legitimate bug. A bug report has been created for this.

Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:52 +01:00
Eskil Abrahamsen Blomfeldt
a0c21829ea Android: Fix QSideBar test
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.

Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:45 +01:00
Eskil Abrahamsen Blomfeldt
9a34b69b7d Android: Skip QProcess_and_GuiEventLoop test
This requires building a command line tool and running it using
QProcess, which is not a supported deployment option on Android.

Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-01-16 09:27:37 +01:00
Eskil Abrahamsen Blomfeldt
1ee6fdc72c Fix QRawFont test when used with bundled FreeType
The auto-hinter in the FreeType version bundled in Qt gives
slightly different advances on some glyphs. As noted in
the removed code, this was already observed on Windows and QNX,
and recently also on Android.

I'm sure it could also happen on platforms using the system library
if the system library was the same version as the one bundled in Qt.
Instead of expect-failing the test, we simply accept both the
observed results as valid.

Note that we need to accept 9 as a result for the default hinting
preference on all platforms, not just Windows, since the default
hinting preference in FreeType can be a system setting.

Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-16 09:27:29 +01:00
Eskil Abrahamsen Blomfeldt
b4031387f9 Android: Fix QImageReader test
The files for the test have to be included in a qrc to be available on
Android.

Most of the image files are already in a qrc, but a couple were missing.
We add this in a separate qrc to avoid interfering with the tests on
other platforms.

Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-16 09:27:15 +01:00
Friedemann Kleint
988f1b2e57 Windows: Use DND effect chosen in DragEnter/Move for Drop.
The value of pdwEffect passed to IOleDropTarget::Drop() is always
the one with which the drag was initiated.

Task-number: QTBUG-43466
Change-Id: I045fef634b55d4f113b393aa0ad4aa15d37db372
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-16 08:16:36 +01:00
Rainer Keller
997b040310 Autotest: Find all autotests due to changed naming conventions
The algorithm searches for all executables in search path starting with
"tst_". Tests are not named like the folder they are contained in
anymore.

Change-Id: I360f293e43e30292fe0ae6230fd3ec7abf3d632d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-16 08:14:55 +01:00
Rainer Keller
f6a59f8def Benchmarks: Build gui benchmarks only when gui module available
Change-Id: I57fc2f09a4e31e379c256dfe3f5d7546cdcf2b4b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-01-16 08:14:49 +01:00
Frederik Gladhorn
ccb5978c6d Fix namespacing of QNSViewMouseMoveHelper
Task-number: QTBUG-43061
Change-Id: Ied8cdf49c34ef155b0f0bbc7e547b7c01bcd1d11
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-16 06:47:26 +01:00
Friedemann Kleint
241d32bfe3 Fix inlining order of functions in qpathclipper_p.h.
When compiling tst_qpathclipper with MinGW:

In file included from QtGui/private/qpathclipper_p.h:1:0,
                 from tst_qpathclipper.cpp:33:
src/gui/painting/qpathclipper_p.h:469:29: warning: 'static QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
                             ^
qpathclipper_p.h:474:29: warning: 'static QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction direction)

Change-Id: I38feb07d693768285c1d405b3fc92a58c3309547
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-01-16 06:31:46 +01:00
Marc Mutz
ba7653fb74 qtest_widgets.h: add support for pretty-printing QSizePolicy
... in QCOMPAREs.

The implementation is hidden in a nested Internal namespace that retrieves
the strings without strdup()ing. That makes it easier to compose these
functions as there is no need to delete character arrays when using them.

The public interface (which qstrdup()s) is implemented on top of these.

[ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.

Change-Id: Ib03d969847e5a12474c71a7921366b400025f680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:12:59 +01:00
Marc Mutz
49057a1eab QVariant: attempt to work around an ICE on linux-arm-gnueabi-g++ (Ubuntu 11.10) with constexpr QSizePolicy
This is the error:

  src/corelib/kernel/qvariant_p.h: In constructor ‘QVariantPrivateSharedEx<T>::QVariantPrivateSharedEx() [with T = QSizePolicy]’:
  src/corelib/kernel/qvariant_p.h:107:61: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560

There are two things fishy in this file:

1. Use of the unnamed namespace in a file that gets included
   in different libraries. While not technically undefined
   behavior, it may become so when used in the implementation,
   which it is.
2. Missing explicit initialization of a member of
   QVariantPrivateSharedEx. This is just a wild guess, because
   the ICE happens in that line. That class itself is quite
   smelly, because the address of an object is taken before
   the lifetime of the object begins. A fix would be to store
   the object in a wrapper class from which QVPSEx inherits
   _first_, but then a cast from QVPSEx to QVariant::PrivateShared
   would require pointer adjustments, and I didn't look through
   all the code to determine whether that would be an issue.
   Having been bitten by this sometime ago:
    https://marcmutz.wordpress.com/private-practice/private-practice-taming-templates/#edit-20111128
   I opted to do these easy changes first to see whether they
   already fix the ICE.

Change-Id: Ic15fd928b3dff2318c425c915b2dab5e54254d71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:12:54 +01:00
Thiago Macieira
47f99cacc4 Don't call static members with object
This makes it clear that we're not modifying d.

Change-Id: Ic5d393bfd36e48a193fcffff13b968c6d08e69f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-16 03:12:28 +01:00
Thiago Macieira
514af281e3 Add QTimeZone::{systemTimeZone,utc}
[ChangeLog][QtCore][QTimeZone] Added methods systemTimeZone() and utc()
that return QTimeZone objects for the system time zone and for UTC,
respectively.

Change-Id: Ic5d393bfd36e48a193fcffff13b96821bb8514b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-16 03:12:13 +01:00
Thiago Macieira
3d051d41a3 Fix forkfd build when O_CLOEXEC isn't defined.
O_CLOEXEC was introduced with the 2008 revision of POSIX.1 and it's the
only way of doing child processes safely with fork(2) in multithreaded
applications.

But we need to support pre-2008 systems, so we can't use that constant.
So let's just choose two arbitrary values for both of our constants --
we need to change both because we need to be sure that FFD_CLOEXEC won't
be the same as FFD_NONBLOCK.

Linux will probably implement them to the O_ constants, like epoll,
signalfd and inotify have done.

Change-Id: I20a5aa6e6264e7a219e19759eeb8747e01df05ff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-01-16 03:12:09 +01:00
Holger Hans Peter Freyther
98008efcf8 Fix assignment within a Q_ASSERT
This was introduced in 3b844c16e0
and doesn't seem to be right.

Change-Id: I1c6a9445996650566d44f223651dd0c855619a88
Fixes: Coverity CID 21589
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-16 03:11:52 +01:00
Thiago Macieira
bbded12df3 Update QFileSelector to use QSysInfo better
This reduces a bit of string duplication by relying on the constants
defined in qglobal.cpp and detection via uname(2), in addition to adding
the Linux distribution name as a selector.

Change-Id: I64a46a0fc552c399db787125b1b32aae5c50056f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2015-01-16 03:11:51 +01:00
Friedemann Kleint
23f663cad6 Fix compilation of manual Open GL tests with Dynamic GL.
Change-Id: Iffd57f26dfc9d6a00cab855270207fc4da7eb1ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-15 15:35:11 +01:00
Laszlo Agocs
f342bf2533 eglfs: Split kms integration into multiple files
Now that it's a plugin, the restrictions for the compiled-in hooks
do not apply. Make it maintainable and prepare for future development
by splitting up properly.

The actual functions are not touched at all in this patch.

Change-Id: I4c666817afe15b31a63c1f9fc01413e9a2376a3b
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-01-15 15:34:24 +01:00
Laszlo Agocs
43807479bc eglfs: Fix hardware cursor with kms
We have to set a default arrow cursor on startup because non-widget
apps will not request one. This is how we behave with non-kms backends
too.

Change-Id: I11b7bf96e46f570bc49f3e8701616b13c480fda6
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-01-15 15:34:20 +01:00
Laszlo Agocs
99d81c5f18 Do not build kms platform plugin by default
This plugin is deprecated and replaced by eglfs.

Change-Id: Ib559ed411b145b2cb992cc475772894ecd936c07
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-15 15:34:16 +01:00
Laszlo Agocs
31f87f39b6 Avoid warning about QString from char in xcb
Change-Id: I013f0caa8aba7fef07c7dbe90ed01dfb85347223
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-15 15:34:12 +01:00
Thiago Macieira
63ca2846e1 Fix compilation with older MSVC: use qIsNan instead of isnan
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.

Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-15 08:40:14 +01:00
Thiago Macieira
c3590c7677 Update doc saying QDateTime::setTime with invalid time sets to midnight
QDateTimePrivate::setDateTime has a comment saying this is intentional,
so document it.

Task-number: QTBUG-43704
Change-Id: Ic5d393bfd36e48a193fcffff13b965409eaf7be9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-15 08:37:10 +01:00
Richard Moe Gustavsen
13ecde3b7a iOS: guard text responder from clearing selection
When programatically setting a text selection on iOS, we
call [UITextInputDelegate selectionWillChange] to report
the change. If auto correction is enabled, UIKit will then
reset the current tracking, and for some reason tell us to
clear the selection. This is contradictory to us
saying the the selection is about to change, and will
cause an unwanted recursion back to Qt.

Since there seems to be no way to stop UIKit from doing
this, this patch will instead add a guard that refuses
to change the selection recursively while processing
a selection change from Qt.

Task-number: QTBUG-43716
Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-15 08:24:26 +01:00
Tobias Koenig
7eafe74804 Haiku: Fix compilation of qarraydata unit test
On Haiku the compilation failed with error:
"undefined reference to 'bool QTest::qCompare<unsigned long, unsigned int>
 (unsigned long const&, unsigned int const&, char const*, char const*, char const*, int)'"

Change-Id: I0daf2e6029898cb6c3d7da9d603aa1ea533aa829
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-14 05:37:43 +01:00
Tobias Koenig
37fd702e30 Haiku: Make remaining auto tests compile on Haiku
Change-Id: I369b988b8c7d441ebc912298a81d3d82ec19df8c
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-14 05:37:28 +01:00
Tobias Koenig
699455b90a Haiku: Make examples compile on Haiku
Change-Id: I469619b5d749be1043e0bc43e9199a39ace61f16
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-14 05:37:12 +01:00
Tobias Koenig
ab1b1afb83 Haiku: Make network module compile on Haiku
Add the missing definition for IFF_RUNNING like
documented on http://ports.haiku-files.org/wiki/CommonProblems

Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-14 05:36:56 +01:00
J-P Nurmi
ce84a1bde3 Reduce excessive painting caused by transient scrollbars
The step logic in scrollByDelta() made scrollbar position to go
temporarily outside its min/max boundaries, and then setValue()
corrected it immediately back within its bounds. The false change
notifications caused by this position vs. value ping pong caused
plenty of unnecessary updates.

Task-number: QTBUG-30316
Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-14 00:46:43 +01:00
Giuseppe D'Angelo
940530ab67 QComboBox: make setModel reset the root model index
When changing models it makes no sense to keep the old root model index,
pointing into a possibly deleted model. Reset it to the root
of the new model is the best line of action.

[ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root
model index when a new model is set on it.

Task-number: QTBUG-43350
Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-13 22:52:05 +01:00