summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix running tst_qmessagehandler when QT_MESSAGE_PATTERN is setThiago Macieira2014-12-181-0/+9
| | | | | | | | | | | | | | | | | | This test fails if the environment has the variable set. Change-Id: Ibd54ff3e6e22a885341898889088ac56e84282b1 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Prospective stabilization fix for tst_qwindow::positioning(default)Simon Hausmann2014-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Our theory for the failure of framePosition() not having the expected value after setFramePosition towards the end of the test is that we try to call setFramePosition() while the getting-back-from-fullscreen-to-normal window animation is still running, at which point the compositor may just choose to ignore our move request. Similarly to when going fullscreen, also wait when coming back from it. Change-Id: Icfc92f277d96dccdfad772c4aac252b2a20c6196 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | tst_QSizePolicy: non-functional fixesMarc Mutz2014-12-261-1/+3
| | | | | | | | | | | | | | Fix indention, add empty line as separator, undef a local macro. Change-Id: Ie0d8529322f87ca2bdedb9a7f2f4cf9f463a6e12 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | tst_QSizePolicy: split a test functionMarc Mutz2014-12-261-3/+7
| | | | | | | | | | | | | | | | | | Split off default-value check from getSetCheck(). This is in preparation of extracting getSetCheck_data(). Change-Id: I869c34014a92e29a07dc08584a93a4cbba372518 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | tst_QSizePolicy: minor cleanupMarc Mutz2014-12-261-15/+2
| | | | | | | | | | | | | | Fix indention, remove unused functions, slots->Q_SLOTS. Change-Id: I30ced40dcde2650977424864399b721bbe17013c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QThreadPool::cancel() to remove individual jobs from the job queue.Nick Shaforostoff2014-12-241-0/+51
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QThreadPool] Added QThreadPool::cancel() which allows removing from the job queue a job that hasn't been started yet. Change-Id: Ib8f1c1f32a34f5eec8338c641d820b928e470164 Reviewed-by: Nick Shaforostoff <shafff@ukr.net> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | emit lastWindowClosed even if quitOnLastWindowClosed is falseShawn Rutledge2014-12-231-0/+27
| | | | | | | | | | | | | | | | | | | | | | Behavior will agree with the docs. [ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if quitOnLastWindowClosed is not set Task-number: QTBUG-32956 Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Make setting twice the very same model on QComboBox a no-opGiuseppe D'Angelo2014-12-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Basically, introduce a small check for this corner-case situation. Setting a model doesn't just store a pointer, but also resets the current index, changes the line edit completion model, and so on, and seems silly to trigger changes in such cases. [ChangeLog][QtWidgets][QComboBox] A QComboBox does not reset itself any more when setting the same model more than once. Change-Id: If028b36cdfaa5552c156dd900e123ca9a04d4e3d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QState: Added template PointerToMemberFunctionAndré Klitzing2014-12-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Added the function pointer to addTransition to take advantage of the new connect syntax. [ChangeLog][QtCore][State Machine] Added an addTransition() overload that takes a pointer-to-member for the signal triggering the transition. Change-Id: Ic97f7983839217ca0c8484b269d38221cbe804e3 Task-number: QTBUG-40293 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devGiuseppe D'Angelo2014-12-2013-10/+131
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-1813-10/+131
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| | * Prevent continuous painting with viewport QOpenGLWidgetLaszlo Agocs2014-12-181-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the source widget to the texture list (may be null for custom compositor implementations that add textures not belonging to actual widgets). This allows us to do proper checks with the dirtyRenderToTextureWidgets list. As a result paint events are only sent to a QOpenGLWidget if (1) there was an update() for it or (2) it was actually marked dirty. (2) was previously behaving differently: the widget got a paint event when anything in the window has changed. This is fine for naive animating OpenGL code but less ideal for QGraphicsView. Bool properties like stacksOnTop are now stored in a flags value to prevent future explosion of texture list fields and parameters. Task-number: QTBUG-43178 Change-Id: I48cbcf93df72ac682c9b5d64982a8b648fe21ef3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| | * Change bugreports.qt-project.org -> bugreports.qt.ioAlex Blasche2014-12-187-9/+9
| | | | | | | | | | | | | | | | | | | | | The Qt bug tracker URL changes as part of the qt.io transition Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| | * Add some debug information to tst_qwindowSimon Hausmann2014-12-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The test still fails sporadically at a new place, so this adds some debug information when it fails to may help us identify what is going wrong. Change-Id: Ife0f171299ef7e800a2d808602e76ca2f3885964 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * Blacklist ioGetFromHttpBrokenServer:no-newlineTony Sarajärvi2014-12-161-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-43388 Change-Id: Ie589d72723520152a4cdb28b2fe40e3013b0dd50 Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
| | * Fix possibly corrupted log clusters when using custom tab stopsEskil Abrahamsen Blomfeldt2014-12-151-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculateTabWidth() can trigger shaping of the item, which can cause the layout data to be reallocated, so we need to update the local pointers to it, like we do when we explicitly invoke the shaper. [ChangeLog][Text] Fixed problems with text layout when using custom tab stops. Task-number: QTBUG-43126 Change-Id: Ifaeeeb4bfb1a55e6638b12b444f53d2679d3d1e6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * Ensure that GL::updateBrushTexture() activates and binds properlyTor Arne Vestbø2014-12-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling QOpenGL2GradientCache::getBuffer() will generate the texture the first time, calling glBindTexture in the process. We did this without first ensuring that the right texture unit was active, resulting in the generated gradient texture binding onto the glyph cache mask unit. We now provide a specialization of bindTexture for a QGradient, which ensures that the right unit is active before calling getBuffer(). Unfortunately we have no way of knowing if the result of getBuffer() was a texture that was already bound, or if we need to bind the result, which means we have to do an unconditional bindTexture of the resulting texture ID. This means double-bind for the initial texture generation, but this was already an issue in the original code. Task-number: QTBUG-43039 Task-number: QTBUG-41244 Change-Id: I20c9b795c8c14f8d58be2b60a284c5a060705ec0 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * DiagLib: Add Wheel event to mouse event category of the event filter..Friedemann Kleint2014-12-111-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-42731 Change-Id: Ib0293a245ed430bd86a1ceb221628b3044ad305e Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | | Make GLX and EGL dynamic dependencies for xcbJørgen Lind2014-12-202-0/+78
|/ / | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically resolved, making it possible for one build of a plugin to use both code paths. Default is to use the GLX code path if available. This can be overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an evnironment variable. Enable qt.xcb.glintegration.debug to get debug log output of what integration is used Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | ssl: store socket in setEmptyDefaultConfigurationJeremy Lainé2014-12-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The setEmptyDefaultConfiguration test creates a socket and connects its sslErrors signal to tst_QSslSocket's ignoreErrorSlot slot. This slot expects the socket to have been stored in tst_QsslSocket's "socket" member, which was not being done. This patch fixes this problem. It does beg the question of whether having a "socket" member in the tst_QSslSocket class is a good idea as it is error prone. Change-Id: Ic59d1789c5f1ed240c3f0c37981f6ecc35572f0d Reviewed-by: Richard J. Moore <rich@kde.org>
* | Make the defaultSectionSize property of QHeaderView style dependentAlexander Volkov2014-12-111-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new enum items PM_HeaderDefaultSectionSizeHorizontal and PM_HeaderDefaultSectionSizeVertical to QStyle and get corresponding values in QHeaderView. This way we get rid of some magic constants in QHeaderView and we can have reasonable values for the default section size for high-DPI displays. [ChangeLog][QtWidgets][QHeaderView] Default section size is now style-dependent by default. [ChangeLog][QtWidgets][QHeaderView] Added resetDefaultSectionSize(). Change-Id: I44e152c5cf0bec1e5d78e1e62f47a2d1f761dfbf Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-1019-114/+286
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Attempt to make the positioning test of QWindow more reliableSimon Hausmann2014-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The part of the test that verifies that setFramePosition moves the window successfully appears to be very unreliable in the CI system. The "tested" frame position is calculated to be at (40, 40) relative to the top left of the available screen geometry, which can be non-zero due to task bars and similar system ui elements. However that position appears to be unreliable in the sense that the window manager doesn't seem to always respect that. So instead let's try placing the window (by frame position) in the center of the screen instead. Change-Id: I96fe6c37e748fc18262632b5effe5a9e90dc0028 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Diaglib: Fix another typo in .pri file.Friedemann Kleint2014-12-051-1/+1
| | | | | | | | | | Change-Id: I2888c4fb9947d61285a8a570661a29e61b10bbce Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-052-24/+15
| |\ | | | | | | | | | Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
| | * Make tst_qwindow::positioning more reliableSimon Hausmann2014-12-041-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't check for absolute counts of resize events but just check if we were resized. Also use QTest::qWaitForWindowExposed instead of QTRY_COMPARE and checking for QEvent::Expose. Change-Id: Ie383493a8ce6d88cad50bd6375d432ad1578449c Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * Make QtDBus compile without libdbus-1 headers, if dlopeningThiago Macieira2014-12-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of QtDBus already needs very little from libdus-1, so create an extra header containing the minimum API we actually need. One large advantage of this solution is that now QtDBus can always be enabled, even if the system doesn't have libdbus-1 installed. This is interesting on OS X, where libdbus-1 is often installed by Homebrew or MacPorts, which may include extra libraries we don't want in our packaging. Change-Id: I1b397121ec12eeca333ef778cf8e1c7b64d6b223 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Stabilize tst_QWindowContainer.Friedemann Kleint2014-12-041-15/+39
| | | | | | | | | | | | | | | | | | | | | Fix window/widget leaks, observe available geometry. Change-Id: I19784d34a62c6e05dbc403852364cfb5e4d12dd5 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * | QMenuBar: fix extra indent on the right with a TopLeftCorner widget.Friedemann Kleint2014-12-041-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting a left corner widget on a QMenuBar, the first action rectangle is offset by its width and thus the width should not be added to the size hint. Use QSize::expandedTo() instead. Task-number: QTBUG-36010 Change-Id: I660e3facbd0aeb5fb84fac8923db3e0c7998309d Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * | Respect the size hint signal for the column and row delegatesAndy Shaw2014-12-031-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sizeHintChanged() signal from the column and row delegates need to be connected to the doItemsLayout() slot so that the view is updated when the size hint changes. Additionally doDelayedItemsLayout() is called to ensure that this is up-to-date as the size hints may have changed when the new delegate was set on the row or column. Change-Id: I458293f05ce9ef40a03bdbcab1a6e7a10f648c89 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
| * | QLayout: Observe contents margin when positioning the menu bar.Friedemann Kleint2014-12-021-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-38152 Change-Id: I53ea6bce33057251265a7eca1651aeabca314ba9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * | QMainWindow: Observe left contents margin when positioning status bar.Friedemann Kleint2014-12-021-0/+33
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-38152 Change-Id: I4c762a113dbfe47472d1087aa34c0e327083ee16 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * | tst_qsortfilterproxymodel: remove unused member varDavid Faure2014-11-281-2/+1
| | | | | | | | | | | | | | | | | | | | | (clang warning) Change-Id: Id751443e03be4f2bd1721cbe9d9a898d9619b29b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-2711-69/+71
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.4.0 7231e1fbe24102f2a93b34dfa70e3dca884440d2 went into 5.4 instead of the 5.4.0 branch, thus the conflict. Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
| | * Adjust DBMSType to DbmsType to follow conventionsAlejandro Exojo2014-11-268-67/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | The enum was made public in f84b00c6d26eb7a3a6802210d2a8b12ddbf815aa, but this makes it follow the convention to camel case acronyms too before it's too late to change it. Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Blacklist one tst_qsslsocket testTony Sarajärvi2014-11-261-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-29941 Change-Id: Ieb3418a2d6d88ebd399964b5df20d9fe4d6ca37b Reviewed-by: Simo Fält <simo.falt@digia.com>
| | * Use camel case in PKCS#12 functionAlejandro Exojo2014-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it follow the coding style, which says to camel case acronyms too, and makes it consistent with the rest of the class. Change-Id: I4a1b21de1815530e476fc5aa8a0d41c724fc8021 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: hjk <hjk121@nokiamail.com>
| | * Blacklist one test function in tst_QNetworkReplyTony Sarajärvi2014-11-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is cherry-picked from c38f1f19b87d20f79394bca151268fc3cdcdd189 and d29d727d720fa4ac7ba046b6bfb96707586de7d3 Task-number: QTBUG-32435 Change-Id: I6dbbb668b96737a5791bc688949a00bc09f1357f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * Mark QSocks5SocketEngine tests blacklistedTony Sarajärvi2014-11-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is cherry-picked from 63ae74f36533d92c5b38df1eb2a7fcf4c586bf11 and 07f234d2a8283081aabdd1465f09b04a26bec1a3 Task-number: QTBUG-42528 Change-Id: I5f86679e62a4be48ce25afa5a4987a2b6678a357 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * Fix the %{time} printing to *not* default to the process's timeThiago Macieira2014-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default should be the actual time of day. Showing the process's time is the optional case. In the future, we'll provide a way to showing the monotonic reference time ("boot") and we should improve the detection of actual application runtime. Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | QChar: prepare relational operators for constexpr'ificationMarc Mutz2014-12-101-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the relational operators are in a constexpr'able form by removing the use of the const/non-const-overloaded unicode() function, which in the relational operators is resolved to the non-const version, which isn't constexpr'able. Replaced with direct member access for op== and op< (required making them friends) and reformulating the other operators in terms of these two. Since I managed to introduce a bug while doing this change, add a simple test for QChar operators, too. Change-Id: I69f3da849e71abc2a17152f797694950914adebc Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fixed a bug where spans did not always work in layouts.Jan Arve Saether2014-12-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the span we stored in the multiCellMap was the "effective" span (i.e. the given span subtracted with the number of ignored rows it would span). Later we used that span to distribute its size across all its cells. However, since the span now could be smaller that the given span, we could sometimes fail to distribute to the last span(s). [ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't distribute themselves to the last cells they covered. Change-Id: I31db3d850484dc8b70d62c5f02f680740578c661 Task-number: QTBUG-43099 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | ssl: merge and tighten sslErrors and peerVerifyError testsJeremy Lainé2014-12-091-60/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sslErrors and peerVerifyError test the same situation: connect to a server which is using the fluke certificate, using the incorrect host name. They connect respectively to qt-test-server:993 and the.server.ip.address:443. The sslErrors is prone to backend-dependent failures concerning the order in which SSL errors are received, just like the peerVerifyError test was until recently. This change merges these two tests into one, which is run against the same two servers as previously. It also adds a check to ensure that sslErrors and peerVerifyError emit the same SSL errors (regardless of order). This also fixes the included headers for non-OpenSSL backends. Change-Id: Ibd5f60d24f1682989378e87729389e4b8f9efac5 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QSortFilterProxyModel: honor the roles parameter of dataChangedGiuseppe D'Angelo2014-12-071-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the source model emits dataChanged, it may tell which roles have been changed. That information was lost when using a QSortFilterProxyModel -- the proxy simply dropped that argument (meaning "all roles may have changed"). It's instead a good idea to forward the roles argument, as it may minimize hits on the proxy (on unchanged roles). [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel now properly forwards the roles that have been changed when the source model emits dataChanged(). Task-number: QTBUG-35440 Change-Id: Ifa5213866ba04dfd57d50b5fbd47638f2191eb8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Fix memory leaks in tst_mocJędrzej Nowacki2014-12-071-8/+8
| | | | | | | | | | | | | | | Change-Id: Id17c4253e7e7a2e4ab7fd9b290481ca90914b782 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Fix maximal literal string limitation in moc.Jędrzej Nowacki2014-12-071-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | C++ standard advise to place 64k char limit for string literals, this patch improves moc output so it is not affected anymore. Task-number: QTBUG-36500 Change-Id: Iece630faaef45baebe8c7afe4fc51e0362c713de Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Fix QMetaProperty::write so it tries to register a property type.Jędrzej Nowacki2014-12-071-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | We can not assume that the property type is always registered, because QVariant argument may contain an instance of a different type. Change-Id: I4fc9593b826e13c401dbdacec4d60db36edc7102 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Fix DBus signature generation for complex types.Aaron McCarthy2014-12-041-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating the DBus signature of a registered custom type the marshaller appends the signatures of the map entries and array items after the map/array causing an invalid DBus signature to be generated. This happens because beginArray() and beginMap() output the full signature of the data. Fixed by suppressing changes to the signature within beginArray()/endArray() and beginMap()/endMap() blocks. Change-Id: Icaf23b2fe58a3e1f575b81e4a100f02684f68452 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Use the new warning enabling/disabling macros in qtbaseThiago Macieira2014-12-032-14/+6
| | | | | | | | | | | | | | | | | | Change-Id: I91ff06644e8047c2ca483f9768b46c1372eb6171 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Implement proper C++ type numeric promotion for QVariant comparisonsThiago Macieira2014-12-031-1/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, QVariant would try to convert one operand to the other's type, which would produce unexpected results: the results would depend in the order of the operands and whether there was data loss in the conversion. In addition, ordering comparisons were only done with signed values, yielding other unexpected results, like QVariant(LLONG_MAX / 2) < QVariant(Q_UINT64_C(0)). Instead, try to obey the C++ standard rules for type promotion in expressions. Our code is a little simpler than the standard would seem to require since we know some more details from the ABI. [ChangeLog][Important Behavior Changes][QVariant] QVariant now obeys the C++ type promotion rules when comparing numeric types (integrals, float and double), including the fact that unsigned comparisons are preferred for types of the same rank (that is, now QVariant(-1) > QVariant(0U)). Task-number: QTBUG-42722 Change-Id: Ie7b19073dcb45485354710975e561bcdb1a753f1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>