summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | QFileDialog: optimize string handling in qt_tildeExpansionMarc Mutz2016-01-011-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of QString::split()-ing the path, just to inspect the first item in the list returned, simply find the location of the first separator and work with that. -> saves creating a QList, and its QString elements -> saves attempted detaches of that list when calling first() - When extracting the user name, don't do it in a QString, do it in a QStringRef. - When constructing the result, don't use QString::replace(), use QStringBuilder with a QStringRef into the original string. - Eradicate the out parameter, it is easily calculated from the return value. - Don't calculate userName on VXWORKS and INTEGRITY, where it is not used. Requires a different #ifdef sequence. Fixed preprocessor directives' indention as a drive-by. Costs 84b in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I61f1e8d558db7fb0c5c1170bdfd6f5ac1f1a9e62 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QHeaderView - fix broken stretchLastSectionThorbjørn Martsum2016-01-011-1/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In setStretchLastSection we restore a default section size if we no longer use stretch. That size was however not sufficient - we should restore the actual size. Furthermore we should also always stretch the last section (last visible index) - and not leave a section with a huge size and stretch another. This patch refactors stretch handling and keeps track of the last section and its size in eg. moveSection, swapSection, hideSection, showSection etc. There is an auto test showing and guarding its behavior. [ChangeLog][QtWidgets][QHeaderView] Fixed some issues (e.g QTBUG-39010) with restoring of section size after a section is no longer the last visible section (in stretchLastSection mode). Task-number: QTBUG-39010 Change-Id: Id47075b5a9dfeb250027374ecbd10eb8babbf9ef Reviewed-by: David Faure <david.faure@kdab.com>
* | Add qHash(std::pair)Marc Mutz2015-12-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | We already include <utility> in <qglobal.h>, so we might as well provide a qHash() overload for std::pair. [ChangeLog][QtCore] Added qHash(std::pair), defined in <QHashFunctions>. Change-Id: I0f61c513e82e05ce9d2e56bcf18f3be9e2da4da9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QString: add resize(int, QChar)Marc Mutz2015-12-281-0/+17
| | | | | | | | | | | | | | | | | | | | This will be used in QTextStream to speed up padding processing. [ChangeLog][QtCore][QString] Added resize(int, QChar) overload. Change-Id: Id51f8cdacb167310157100b05cacf20e9a5d2716 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | tst_collections: "explicit instantiation of 'NS::QList' must occur in ↵Marc Mutz2015-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | namespace 'NS' Probably correct. The question is just why this code has survived for so many years. Change-Id: Iaf01850476f9b066243abebb9ee6c5928d7ada19 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Refactor tst_QGraphicsWidget::setTabOrderAndReparent().Friedemann Kleint2015-12-221-62/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test produces compiler warnings in release builds: tst_qgraphicswidget.cpp: In member function 'void tst_QGraphicsWidget::setTabOrderAndReparent()': tst_qgraphicswidget.cpp:1521:89: warning: 'w2' may be used uninitialized in this function [-Wmaybe-uninitialized] tst_qgraphicswidget.cpp:1536:88: warning: 'w1' may be used uninitialized in this function [-Wmaybe-uninitialized] Use arrays instead of the variables w1,2... and rewrite the helper function compareFocusChain() to work on iterators allowing to remove some temporary lists. Also return error messages in a QByteArray ready for the Q[TRY_]VERIFY2 macros. Change-Id: I43466921af59521d1faf00b75fe943508418abb3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-1848-74/+755
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * Windows: Restore window geometry after normal->maximized->fullscreen->normal.Friedemann Kleint2015-12-171-0/+67
| | | | | | | | | | | | | | | | | | | | | | - Do not save geometry when going from maximized->fullscreen - Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the maximized geometry is restored. - Add a test for Windows. Task-number: QTBUG-49709 Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * qmake: teach findMocs to handle backslash-newline gracefully.Edward Welbourne2015-12-178-11/+103
| | | | | | | | | | Change-Id: Id71352c0cf71ab84bd81d4f3d11bb19dc7965903 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * qmake: teach moc-detector to handle C++-11 raw stringsEdward Welbourne2015-12-151-2/+1
| | | | | | | | | | | | | | | | As for the #include-parser, the moc-detector's minimal C preprocessor could be confused by a raw string into ignoring large chunks of code. Change-Id: Id688e9a1f04628ce75a51a7d15269078c734288e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * qmake: Fix comment false-alarm bug in findMocs().Edward Welbourne2015-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | If a / wasn't part of a comment-start, it and the character after it were none the less stepped over. If the character after started an enclosure, this would duly be missed, leading to mis-parsing of the subsequent text. As for similar bug recently fixed in findDeps(). Change-Id: Ie5329ec633c23a554b42a6351723c980e27fb9a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Complete a test for QFilePrivate::fileName offset on Linuxhjk2015-12-151-1/+1
| | | | | | | | | | | | | | | | This extends the test suite introduced in 497f0af1f7 for a known-to-be-good case also for 32 bit systems. Change-Id: Ia231bcb9b0102c28483d932be18767662b7a6afd Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
| * QDockAreaLayout/QPlaceHolderItem: Store geometry excluding frame.Friedemann Kleint2015-12-151-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the geometry stored for floating dock widgets in QPlaceHolderItem::topLevelRect and QDockAreaLayoutInfo::saveState() included the window frame (frame position/content area size). This does not work in the case where a floating dock widget is deleted since the geometry is determined after reparenting the widget when the frame geometry is no longer available. Change the behavior to store the geometry excluding frame to avoid such problems and adapt QDockWidgetPrivate::setWindowState() accordingly. Task-number: QTBUG-49832 Task-number: QTBUG-45780 Change-Id: I84b5c80df6e1c9e738bbb1407b9047cc84719ce0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Extend blacklisting of tst_qsettings to OSX 10.11Tony Sarajärvi2015-12-151-0/+1
| | | | | | | | | | | | | | | | | | This test is marked as blacklisted on 10.10, and it is found to still fail in 10.11. Task-number: QTBUG-49834 Change-Id: Ibddb1af6b61f3fca2b2aea18102bbaa5390a40d3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Rewrote qmake's #include-detection to be more faithful to CPP.Edward Welbourne2015-12-155-11/+126
| | | | | | | | | | | | | | | | | | | | | | The C preprocessor allows backslash-newline anywhere and allows comments anywhere it allows space. Testing wilfully perverse applications of that revealed qmake's parsing of #include directives wasn't very robust. So rework to actually follow the rules and add those tests. Change-Id: If5cc7bfb65f9994e9ab9ed216dd1ee7285c63934 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Revert "tests: fixed compilation of tst_qtextstream"Edward Welbourne2015-12-151-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 9a6a58a95af31816627550c573c1b2ac39fc404e, which was a work-around for a qmake bug, now fixed. Task-number: QTBUG-19393 Change-Id: Id467bb5907a88f03eac0e29a90f4ff7e97045423 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix compilation for WinRTMaurice Kalinowski2015-12-1419-25/+34
| | | | | | | | | | | | | | | | TEST_HELPER_INSTALLS cannot be used on platforms with no QProcess support. Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * QFileSystemModel: report special files which are not symlinksGiuseppe D'Angelo2015-12-131-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since special files have file size == -1, they were always filtered out by QFileSystemModel, even when passing QDir::System as filtering option. Keep them instead. The testcase is more convoluted than it should be because QFSM is so broken that it returns valid indexes for invisible elements in the model (such as filtered out elements). Change-Id: I023a9813dbfeed7be99dded42c66b1191afdc17e Task-number: QTBUG-20968 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QFileSystemModel autotest: fix a broken sort() testGiuseppe D'Angelo2015-12-121-7/+10
| | | | | | | | | | | | | | | | | | | | The test was comparing an "unsorted" file listing read from disk with a reference listing, checking whether the two were different. Obviously that's a nonsense test, as there's no stable order for the entries returned by readdir_r and friends. Change-Id: I1d781a6513c42bb0b585d02e57a771c5336c7df4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QLineEdit: a validator fixup() should keep it modified; add failing testGiuseppe D'Angelo2015-12-121-0/+24
| | | | | | | | | | | | | | | | | | I still have no idea how to fix this properly given the absolute mess of QWidgetLineControl. For now add a failing test. Change-Id: Ieb5ad6994c8ce7deb0cd0f2f47d51073d042244e Task-number: QTBUG-49295 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Don't ignore first character after a string.Edward Welbourne2015-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The parser in QMakeSourceFileInfo::findDeps() would step over the closing quote of a string, only to have a for loop then step over the character just after that closing quote, which was thus never studied; this could lead to problems in various ways. Fixed that and expanded findDeps() test to catch regressions. Task-number: QTBUG-17533 Change-Id: I7dec5222e38fa188495b39376ffee70bc7bbc87f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * QFileDialog test: make the right subwidget visibleGiuseppe D'Angelo2015-12-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | It makes little sense to give focus to a hidden widget; in order to make the treeview visible, we need to set the view mode to Detail. Change-Id: I453111e83593a790a656651b603a9c9b1a78dd9d Task-number: QTBUG-7690 Reviewed-by: Jan Blumschein <jan@jan-blumschein.de> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * QFileSystemModel: do not unwatch directories if removal failsGiuseppe D'Angelo2015-12-101-0/+31
| | | | | | | | | | | | | | | | | | ... otherwise we would not detect subsequent file/directories added into the non-removed one. Change-Id: I43018dfb9a9c6c0399190800da3f0d572ec5d8d8 Task-number: QTBUG-49307 Reviewed-by: David Faure <david.faure@kdab.com>
| * QFileDialog: Call reject() on Key_Escape even when itemview has focusGiuseppe D'Angelo2015-12-091-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace hide() call (present in itemViewKeyboardEvent since Qt 4.5) by reject(). Add signal spy to existing test function. QDialog doc states that reject() will always be called on Key_Escape. hide() is not enough: it makes exec() terminate and return the proper value, but the signals finished(int) and rejected() will not be sent. Task-number: QTBUG-7690 Change-Id: Ica4ae2843574478c5b9a7672f871f3ef3f16f3c9 Done-with: Jan Blumschein <jan@jan-blumschein.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * QString: where possible, re-use existing capacity in op(QChar/QL1S)Marc Mutz2015-12-081-0/+66
| | | | | | | | | | | | | | | | | | If the LHS is detached and has existing capacity that is large enough to hold the RHS, re-use the memory instead of allocating a new buffer and throwing away the old. Change-Id: I53d42825da92c264c7301e8e771cba9fb35c321b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Teach qmake's #include parser to recognize C++11 Raw strings.Edward Welbourne2015-12-084-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | Can't sensibly test unless the compiler does support raw strings, since any test that would catch qmake's (prior) inability to parse raw strings would necessarily confuse the C++ compiler in the same way. This even applies (in test app code) to any #if-ery around the raw string, since tokenization happens before preprocessor directives are resolved. So the #if-ery on Q_COMPILER_RAW_STRINGS has to be in tst_qmake.cpp, not the test app it builds. Change-Id: I4a461f515adff288b54fb273fd9996f9b906d11c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * QNetworkInterface: fix support for address labels on Linux interfacesThiago Macieira2015-12-081-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64a1448d87727878d9789906b2f4f5b9e3d74e38 (Qt 5.2) caused QNetworkInterface to report address labels (a.k.a. interface aliases) as separate interfaces. This is caused by the fact that glibc, uClibc and MUSL copy the address label (netlink address attribute IFA_LABEL) to the ifa_name field, which made QNetworkInterfaceManager think that it was an interface it hadn't yet seen. Address labels are the old way to add more than one IP address to an interface on Linux, for example: ifconfig eth0:1 192.0.2.2 Those do not create a new interface, so the "eth0:1" label maps to the same interface index as the parent interface. This has been deprecated for 10 years, but there are still tools out there that add addresses in this manner. This commit restores behavior compatibility with Qt 4.2-5.1. The Qt 5.2-5.5 behavior is incorrect because it reports more than one interface with the same index. On systems configured like the above, the tst_QNetworkInterface::interfaceFromXXX test was failing. Change-Id: I8de47ed6c7be4847b99bffff141c2d9de8cf7329 Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix constructing a QSharedPointer<const> of a QEnableSharedFromThis typeThiago Macieira2015-12-081-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | It should compile, since the std::shared_ptr does. [ChangeLog][QtCore][QSharedPointer] Fixed a problem that would cause a compilation error when constructing a QSharedPointer of a const type when the type derives from QEnableSharedFromThis. Task-number: QTBUG-49748 Change-Id: I8de47ed6c7be4847b99bffff141c84f5e0b6bea8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QVariant: retain duplicate keys when convertingThiago Macieira2015-12-081-0/+41
| | | | | | | | | | | | | | Task-number: QTBUG-49520 Change-Id: I3e15a26e0e424169ac2bffff1417e3f4398c2277 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | NEON optimized bilinear samplingAllan Sandfeld Jensen2015-12-171-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds NEON version of interpolate_4_pixels used by smooth upscaling, and bilinear sampling. The SSE2 version is reordered to match the NEON version so they have the same order of operations and a faster version that loads directly into vector registers. Testing is extended so we have a test of smoothness that can catch more possible mistakes. Change-Id: I0de4aecf5cb79468e7c8f19f421aa24b2955547c Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Sanitize JSON test datahjk2015-12-162-5/+5
| | | | | | | | | | | | | | Strings do not have to be overly specific to test parser function. Change-Id: I345dfec7fb4b8004661f6757cfd53b428ad87b6b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | tst_QChar: add a check for comparing against int/uintMarc Mutz2015-12-131-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used throughout Qt and resolves to operator op(QChar, QChar) This test makes sure we don't break those use-cases as we fix missing relational operators as found by tst_QStringBinOps. In the other direction, 0 op QChar is ambiguous, due to op(const char*, QString) etc, so only test the uint op QChar case. Change-Id: Ifae7fb65bf3269583898cfea3fc6c95547c75122 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | add a way to modify CreateProcess parametersJoerg Bornemann2015-12-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QProcess] Added method setCreateProcessArgumentsModifier to QProcess on Windows to enable users to intercept and modify CreateProcess parameters. With such a modifier, calling code can decide whether to inherit handles, modify the STARTUPINFO struct, and pass its own combination of process flags to CreateProcess. Task-number: QTBUG-390 Task-number: QTBUG-6917 Task-number: QTBUG-9350 Task-number: QTBUG-24619 Change-Id: I14757dbbacfebb1c89f52402d36fba0ba9c45f3a Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-1096-1801/+82
| | | | | | | | | | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QLineEdit: fix the shortcut override events on a readonly line editGiuseppe D'Angelo2015-12-091-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QLineEdit is readonly there's a discrepancy between key press events and shortcut override events. For instance, presses Ctrl+C copies the text unless there's also a shortcut for the same key sequence. In this case, the shortcut override event is not handled, and no text is copied. Fix it by splitting the handling of shortcut override events between "read only" access (copy, select, etc.), which still makes sense on a read only line edit, and write access (paste, ...) which doesn't. [ChangeLog][Important Behavior Changes][QLineEdit] QLineEdit will now accept certain shortcut override events even if it is read only. Change-Id: Ie5b048259b99a1eff0581129e3ad97f27a88fe86 Task-number: QTBUG-21217 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QAIV - allow users to control single step in ScrollPerPixel modeThorbjørn Lund Martsum2015-12-093-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that we scroll one pixel, but changing the behavior in 934f06220391eb0e0ebf66a2eb037f48adb4c43c to do that was not well received. People were relying on the undocumented behavior - and the new behavior was considered to be a regression. (Nobody called setSingleStep since Qt in many cases provide a reasonable singleStep - which implied that their programs scrolled with 1 pixel which was quite slow). Furthermore getting the old behavior (auto set of single step) was nearly impossible. However the revert (done in 0e69230d02813f0b7a050645fb7e443bd504ab6a) gets us back to QScrollbar::setSingleStep not working in pixel scroll mode (even without it being documented - but we should also have a working API rather than documenting that it is not working) The previous approach was directly prevented Qt from changing single step (on e.g resize) at all. This patch only prevents Qt from changing when a user explicitly has called the function QScrollBar::setSingleStep (in pixel scroll mode). That is we expect that calls to setSingleStep means that the user actually wants to set the singleStep and doesn't want Qt to control that value. Furthermore it is possible to switch back to the automatically adjusted singlestep with QScrollBar::setSingleStep(-1). [ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews when scrollMode is set to scrollPerPixel, it is now possible to change the single step. Qt will automatically adjust the single step until setSingleStep is called. When setSingleStep is called it will however respect the set and stop doing automatic changes of the value. Calling setSingleStep(-1) will switch mode back to automatic adjust. Task-number: QTBUG-7232 Change-Id: Ibfe0caa9751d3bcc11bfc6e0654a3d1ac35ac8ae Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Add PointerToMemberFunction for ctor of QSignalTransitionAndré Klitzing2015-12-081-0/+28
| | | | | | | | | | | | | | | | [ChangeLog][QtCore][State Machine] Added constructor overload that takes a pointer-to-member for the QSignalTransition. Change-Id: I80ac6e16d0edf7d2ab09882b6f6db4cbd73364e1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-084-6/+51
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * Skip testing empty window sizes on WindowsJan Arve Saether2015-12-041-1/+16
| | | | | | | | | | Change-Id: Ib4f3bc63196527583a274180c40d0f7847e13f55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * QImage pixelColor and setPixelColor must use unpremultiplied QColorAllan Sandfeld Jensen2015-12-041-0/+18
| | | | | | | | | | | | | | | | | | QColor always uses unpremultiplied alpha, but the new QImage methods were based on the QRgb versions which might be either. This patches fixes the two new methods so they treat QColor alpha correctly. Change-Id: I78a5b875ad4e78ad7fde3b811c6187482b4f6d15 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Manual dialog test: Build also when QtPrintSupport is not available.Friedemann Kleint2015-12-031-4/+13
| | | | | | | | | | | | | | Fixes the build on WinRT. Change-Id: I68510b70b61433ceed6bf06a31424f93a02230dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| * tst_QLocalSocket::threadedConnection(): Add failure message.Friedemann Kleint2015-12-031-1/+4
| | | | | | | | | | | | | | | | Introduce QVERIFY2() to get some information when exactly it fails. Change-Id: Icaddf2ecae434d0bafc90c18458c5ee067dfd506 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | QAbstractItemView: replace a QPair with a dedicated structMarc Mutz2015-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | In a QPair, the member names {first, second} have no semantic value. A simple struct, while not as featureful as QPair, can be given meaningful member names, {rect, index}, in this case. Change-Id: If1e289ecee82a1cb020ac3a854efd2ec1096493b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | qt_poll: split out into separate file and sanitize buildLouai Al-Khanji2015-12-052-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qt_poll function calls recv to query whether fds marked by select as readable should be marked POLLIN or POLLHUP in the pollfd structure. On many platforms such as QNX this requires extra link-time libraries which were not previously required by QtCore. While the qt_poll function is intended as a fallback mechanism only for those platforms which do not implement poll natively, the function was compiled unconditionally whenever QT_BUILD_INTERNAL was defined, e.g. in developer builds. Additionally the function was included on those systems that define poll in system headers so that configure determines build-time availability, but do not define _POSIX_POLL > 0 or indicate POSIX:2008 compliance via either the _POSIX_VERSION or _XOPEN_VERSION macros. On those systems a sysconf query for _SC_POLL was performed to determine at runtime whether to call the system poll or qt_poll. Both of these cases are in fact counterproductive. In the first case the sole consumer of the function is a single manual unit test. In the second, to my knowledge no platform requires the runtime fallback. Despite that, we were forcing an extra dylib in both cases. Both cases are fixed by 1) moving the implementation into its own file for the unit test to include and 2) dropping the dynamic fallback if configure determines availability of poll at compile-time. This also reverts commit 13777097118c496391d4b9656b95097ac25e4a40, which added -lsocket for QtCore on QNX. Change-Id: I2dd10695c5d4cac81b68d2c2558797f3cdabc153 Reviewed-by: James McDonnell <jmcdonnell@qnx.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-0216-139/+154
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Fix possible null pointer dereferences.Jake Petroules2015-12-021-0/+15
| | | | | | | | | | | | | | | | This follows up 130c2baa9376dcf525916620294bd9996bdf41f3. Change-Id: I2f6c9b4f995af427cec9a2162b782039debf8564 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| * Use correct test to add C++14 to the project configurationJames McDonnell2015-12-015-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | Only add C++14 to the project configuration when C++14 support is available on the platform. Adding it because the platform supports C++11 doesn't work when the platform _only_ supports C++11 (e.g., QNX 6.6.0). Task-number: QTBUG-49491 Change-Id: I15de38bb06d912a314b9dd18c80b513cc06a855e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Windows QPA: Fix window state transition from minimized to normal.Friedemann Kleint2015-12-011-4/+0
| | | | | | | | | | | | | | | | | | | | Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to ShowWindow() to enforce the window to be restored to normal state, even if the state before minimized was maximized. Task-number: QTBUG-48449 Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Use QCollator for sorting in the filesystem modelLars Knoll2015-11-301-76/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The old code was extremely inefficient, and QCollator can provide the same functionality in a much better and faster way. Task-number: QTBUG-30902 Change-Id: Iaf5dbe587d9a6ebca26885259fdee74a29d3c84f Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fix conversion QVariant(QColor) to QString.Jędrzej Nowacki2015-11-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | QVariant was using QColor::name() to convert a color to string, which by default loses alpha value. The patch is fixing the problem by always including the alpha value in the string when required. [ChangeLog][Core][Variant] QVariant(QColor)::toString() uses QColor::HexArgb format when the alpha component is different from 1. Task-number: QTBUG-37851 Change-Id: I887460c1ea151180ba99d64dd873ba9d6e2268f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>