summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve pair-like class handling in testsSamuel Gaist2017-04-0611-0/+202
| | | | | | | | | | | | | | Currently when doing comparison with pair-like classes the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for QPair and std::pair to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and std::pair on failure. Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port internal class QXmlUtils to QStringViewMarc Mutz2017-04-064-28/+23
| | | | | | | | | | | | ... and adapt callers. In one case, port a use of QString::toLatin1() to QStringRef:: toLatin1() so together with this change and the addition of QString::arg(QStringView) we can drop one more QStringRef::toString(). Change-Id: Iba898af8cc2a9e1a811e271789359395f595ad32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QString: add QStringView/QLatin1String overload of (non-multi) arg()Marc Mutz2017-04-065-22/+109
| | | | | | | | | | | | | | Use the new overload directly in QXmlStream*. Saves 129B in QtCore text size on optimized GCC 6.1 Linux AMD64 builds, even though we added two more functions. [ChangeLog][QtCore][QString] Added arg(QStringView), arg(QLatin1String) overloads. Change-Id: Idf7236dcab763824593f34182e4e0b16b5ed4321 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QText{En,De}coder: mark ctors explicitMarc Mutz2017-04-061-2/+2
| | | | | | | C++11 allows these to be called implicitly. Change-Id: Ife62ce4df4c294623e84fb0c0751ae9b4f6d1020 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTextCodec: add QStringView overloadsMarc Mutz2017-04-063-3/+55
| | | | | | | | | | [ChangeLog][QtCore][QTextCodec] Added fromUnicode() and canEncode() overloads taking QStringView. [ChangeLog][QtCore][QTextEncoder] Added fromUnicode() overload taking QStringView. Change-Id: I2599f25570480d967921ccd4414e092bfc90d821 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QStringView: fix ambiguity between f(QString)/f(QStringView) with ↵Marc Mutz2017-04-061-4/+0
| | | | | | | | | | | | | | | | | QString::null args ... by removing the QStringView(QString::Null) ctor. This means that QStringView(QString::null) will now fail to compile. That's ok, since we've deprecated QString::null in the last Qt version. This will also help pulling up the QStringView definition to before the QString one in qstring.h, something that we'll require for properly adding QStringView-append/prepend/insert to QString. Change-Id: I3c836732be1e185111b13950be9d8dcd935734ff Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qmltestcase: Allow a QML-only testcase to not require a C++ harnessRobin Burchell2017-04-061-7/+13
| | | | | | | | [ChangeLog][qmake] If you use CONFIG+=qmltestcase with no SOURCES, 'make check' will now run qmltestrunner for you. Change-Id: Ie9dfaef75494c9b38f6c9a6239754858535d8657 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QStringView: use qssize_t as size_typeMarc Mutz2017-04-065-32/+33
| | | | | | | | | | Nothing changes, we've just given 'QIntegerForSizeof<size_t>::Signed' a better name in qglobal.h and now use it in QStringView API and users. Change-Id: Ibea1ae26e95b3a96708400fd4b0cd120459d57b6 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove unused function qt_mac_secure_keyboardGabriel de Dietrich2017-04-052-24/+0
| | | | | | | This function was also relying on Carbon APIs. Change-Id: I87bc942800f5f3dc4ab69cad80f3cbf06d1ad4e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove superfluous handle assignment in QLocalSocket::connectToServer()Benjamin Terrier2017-04-051-3/+1
| | | | | | | The handle is already assigned by QLocalSocket::setSocketDescriptor(). Change-Id: I695cfa31f3d14a3a9eef2fb79d23e9651616e8a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QTextLayout optimization: avoid calling [] when at() will doDavid Faure2017-04-051-29/+29
| | | | | | | | The 'lines' and 'items' containers are both declared mutable, so [] detaches even in const functions. Change-Id: I29ac74302af2fab390b3cf3f9d05ea2cace6840b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* doc: Prevent overwrite of qbytearray.htmlMartin Smith2017-04-051-0/+2
| | | | | | | | | | | | | A use of Q_GLOBAL_STATIC() tricked clangqdoc into thinking it created something called QByteArray that should be documented, so the html generator tried to overwrite qbytearray.html which had already been created for the real QByteArray. This probably means there is a bug in the clang visitor class, but I can't see it, and this change eliminates 4 qdoc errors. Change-Id: Iee333217212ce60727cd9424a19b8e96a20547b4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Docs: add platform notes to QSystemTrayIconRichard Moe Gustavsen2017-04-051-1/+3
| | | | | | | | | | | | | | | | | On macOS, DoubleClick will work if there is no context menu set. Otherwise, the context menu will open on the first mouse press, and then steal focus (which is native behavior). This means that we never get a callback from the OS for the second click. Since it sounds strange to attach a context menu, and at the same time, listen for double click, we choose here to follow native behavior and open the menu straight away. Task-number: QTBUG-5770 Change-Id: I14e08bb8ccd330eecc98e332d54ce4e551cd78fb Reviewed-by: Jeremy Whiting <jpwhiting@kde.org> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QVulkan{Layer,Extension}: various fixesMarc Mutz2017-04-052-16/+84
| | | | | | | | | | | | - don't export simple structs - make op== non-member - add op!= (required by EqualityComparable) - add qHash() (should be defined by Qt for every EqualityComparable class) - add Q_DECLARE_TYPEINFO Change-Id: Ia14ac3fea48a6a0ad1d8993c9408afe77bbe6c1a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Documentation: Add Vulkan section to Qt Gui overviewFriedemann Kleint2017-04-053-5/+41
| | | | | | | | Add section, external references and link examples. Task-number: QTBUG-55981 Change-Id: I705f8bacc9d21aff8446ac40b7a172604a18ef85 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix some issues with the QStringView docsMarc Mutz2017-04-051-6/+4
| | | | | Change-Id: Ibb6fed18c6b7aa23ffc259dc66d22d4ff0372ca0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Use (new) QStringIterator(QStringView) to avoid castsMarc Mutz2017-04-051-1/+1
| | | | | | | | | This is the only one in QtBase that casts to be able to use QStringIterator. Amends d40dcee642c69784f771aae86531ae65b458f1a5. Change-Id: I709e0285717e8d17feab9ab0020c8d0aed0dbe36 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Vulkan: Fix shadow buildsAndy Nichols2017-04-054-8/+10
| | | | | | Change-Id: I6529c76109e2d668355524b9b0d65048a6d3df2e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Mark some more functions with Q_DECL_CONST_FUNCTIONGiuseppe D'Angelo2017-04-055-40/+40
| | | | | | | Saves a mere 300byte of text. Change-Id: Ibc87a395af83757e855477a57e48e1e190504757 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStaticText: mark constructor as explicitGiuseppe D'Angelo2017-04-051-1/+1
| | | | | | | | | | | | | | | | A QStaticText object is supposed to be created and *kept* by the user, and then used repeatedly for drawing, saving the expensive layouting/rasterization process which would otherwise be done for each drawText-like call. Allowing an implicit conversion from QString is therefore surely unwanted. [ChangeLog][Potentially Source-Incompatible Changes][QStaticText] The QStaticText(const QString &) constructor is now explicit. Change-Id: Ib939a5f46638cb9a54d1cc30ff50e3a9d20be5e4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QStringBuilder: add support for (non-const) char*Marc Mutz2017-04-041-1/+6
| | | | | | | | | | | | There's support for const char[] and char[], so it seems this was simply forgotten. [ChangeLog][QtCore][QStringBuilder] Added support for (non-const) char*. Change-Id: I4b5d9039632da7721256579b7741816027321a7e Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QCocoaEventDispatcher: Remove Carbon dependencyGabriel de Dietrich2017-04-041-2/+1
| | | | | | | | | | | | QCoreApplication::hasPendingEvents() is deprecated, and so is the event dispatchers' eponymous function. (A subsequent patch will remove all of the event dispatchers' function, and add a warning in QCoreApplication.) The replacing logic is based upon QEventDispatcherCoreFoundation. Change-Id: If2c1920148dc6d910e77c1dc8ac5b4459c149e2b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-04-0498-419/+772
|\
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-0498-419/+772
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| | * Fix warnings for -no-feature-dockwidgetv5.9.0-beta1Nikita Krupenko2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This amends commit c20cd4d98ea43275bd8859581e273d69a90c3413 Change-Id: I2fa903209694cd05e0dcf31e6f92d96ed934c91d Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Ensure that tst_QFontDatabase::addAppFont() tests the whole path to an engineTor Arne Vestbø2017-03-311-2/+7
| | | | | | | | | | | | | | | | | | Change-Id: Ie22cd9d7d362de86e02b841d40d75eac46395952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Rewrite FreeType-ifdef'ed function call in QCoreTextFontDatabaseTor Arne Vestbø2017-03-312-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | Makes the code slightly less awkward to deal with. Change-Id: Ie98a04d812beecfbf0d19e77b8e784db783a19d6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * winrt: Fix dnd with non mouse input deviceMaurice Kalinowski2017-03-312-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using anything but the mouse, there is no release event sent. Instead one needs to subscribe to the ICorePointerRedirector. Task-number: QTBUG-58781 Change-Id: I664ba24bd89ea9f513f8f11b385e2f06ece42fd0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QStringBuilder: simplify QConcatenable<char[N]>Marc Mutz2017-03-311-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by delegating to QConcatenable<const char[N]>. The only thing that varied was the nested type alias 'type', which therefore got retained. Change-Id: I202f899034e1ddd23c6d1978a31be5eb7c195697 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix tst_Selftest on QEMUSami Nurmenniemi2017-03-312-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes are needed to pass tst_Selftest on QEMU 1. Pass QEMU specific env variables to the subtests 2. Ignore output on stderr on some tests when running on QEMU Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Extend blacklisting of parts of tst_QWidget to cover Ubuntu 16.04Tony Sarajärvi2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QWidget::updateWhileMinimized has been failing on Ubuntu 14.04 and was already blacklisted there. Now we extend it to cover Ubuntu 16.04. Task-number: QTBUG-46116 Change-Id: I6758657cca46bb4c76cddb0298f9b87b8a43655b Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * Prefer rvalue versions of toLatin() and toUtf8()Anton Kudryavtsev2017-03-3016-28/+23
| | | | | | | | | | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Prefer rvalue version of toLocal8Bit()Anton Kudryavtsev2017-03-304-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: I5907a2e29d7f7dac04df5bf50769b47131e175d8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * tst_qsslsocket::protocolServeSide - fix for macOS 10.11Timur Pocheptsov2017-03-301-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mixing different protocols on client-server sockets works differently on 10.11, making previously successful handshakes failing now. Failure is specific to 10.11 with SecureTransport. Change-Id: I35374b40fa3d167802775b526cf6465ae78749cf Task-number: QTBUG-48860 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Blacklist a QSequentialAnimationGroup autotestTony Sarajärvi2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-59806 Change-Id: Ib63614dbd9d57283a6394bfc4079308a3f4ddc93 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11Tony Sarajärvi2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-48860 Change-Id: Ia352378f48b9ab404d06ac5ef9bf53afa8f192fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Convert QStrings with qUtf8Printable for GTK API callsMichael Brüning2017-03-301-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for dangling pointers in 524f39 caused some problems when the QByteArray was implicitly converted to const gchar*. This is fixed by wrapping the QString in question in qUtf8Printable where possible and removing the former convenience method. Task-number: QTBUG-59692 Change-Id: I5abcf42e1c23b12c7a5c4c195d801f377fe9d138 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Use QStringBuilder moreAnton Kudryavtsev2017-03-303-14/+10
| | | | | | | | | | | | | | | Change-Id: If5283e364e921d99ffa7a8fa1abb07356a4a2682 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix warnings for -no-feature-mimetypeNikita Krupenko2017-03-291-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: I6b1239941f8fd13eec72b0874d15d821d717ddf3 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix warnings for -no-feature-itemviewsNikita Krupenko2017-03-291-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: Ia384c2b48a6eaccb424cdde00240ebcfa6fd24c6 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix warnings for -no-feature-dockwidgetNikita Krupenko2017-03-291-0/+3
| | | | | | | | | | | | | | | | | | | | | Change-Id: Id1f04f9ff6da9bec07068d4ebed15f8bd29105af Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Fix warnings for -no-feature-comboboxNikita Krupenko2017-03-291-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: I352c011b21624ae9fb9db5a608e8c2b2491a05cd Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix warnings for -no-feature-cssparserNikita Krupenko2017-03-292-1/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ib0eae1858880e3fe2b6c6abd94c7ea0bbc2649a2 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix tst_QUdpSocket for QEMUSami Nurmenniemi2017-03-291-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | QEMU does not support all syscalls needed for udp socket testing. Skipped tests that can't pass on QEMU. Change-Id: I40882207a47cfafbc3becb3dff8e7cead9676255 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Use HTTP2WasUsedAttribute for HTTP2Timur Pocheptsov2017-03-294-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1 (true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting SpdyWasUsedAttribute. Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Windows QPA: don't resize fixed sized windows when changing screenOlivier Goffart2017-03-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to give pretty good result when EnableHighDPIScaling is NOT set. But this seems to be worse when it's set. Task-number: QTBUG-58959 Change-Id: I8de5a6c3c8b6146b1cb8f89676463206af404083 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
| | * tst_QGuiApplication: Split the quitOnLastWindowClosed() testsFriedemann Kleint2017-03-291-75/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to blacklist the (newly created) quitOnLastWindowClosedMulti() if all else fails. Task-number: QTBUG-59088 Change-Id: I8c143a2017e7aefaf6cad6ada9c1464d40c952e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Doc: Add Creating C++ Classes to externalsites/qtcreator.qdocNico Vertriest2017-03-291-0/+4
| | | | | | | | | | | | | | | | | | | | | qtquickcontrols2-customize.qdoc:28: warning: Can't link to 'Creating C++ Classes' Change-Id: I7e8e84d7a0d03a84f32d860bc646640e5cf6258f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix building of qopengl test on boot2qtSimon Hausmann2017-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Only test for xcb specific sub-features if xcb is available in the first place - not the case with Boot2Qt builds. Change-Id: Iad49648ce1c8781d0c7bb2b2dcd4b7834434d51d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Set the mode for the GTK3 file chooser also in selectFileMichael Brüning2017-03-292-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the mode is not GTK_FILE_CHOOSER_ACTION_SAVE or GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER , a GTK warning will be generated which makes Qt WebEngine's Glib error handler assert. Doing so only when showing the dialog is too late. This patch moves the actual file selection to a private method that can be called from both selectFile and applyOptions in order to prevent overwriting the file chooser action potentially multiple times. Task-number: QTBUG-59692 Change-Id: Ied939248cdc3a0b4c9e8239ab61ba617a46b8496 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>