summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Add missing braces in QCocoaIntegration::updateScreens()Tor Arne Vestbø2018-08-071-1/+2
| | | | | | Change-Id: I0f5009c8ba8f2f1853a968d9853dc45e8cbc2b5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_qspinbox: include actual emission count in failure messageMitch Curtis2018-08-071-1/+2
| | | | | | | | | | It's useful to know how many times the signal was emitted, because it gives us insight into why the test may have failed, especially when it's difficult to reproduce. Task-number: QTBUG-69492 Change-Id: I94796ed880512b060e0a724c87edde8c3b91bb7c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_qdatetimeedit: call setCalendarPopup(false) when cleaning upMitch Curtis2018-08-071-0/+2
| | | | | | | | | | Tests could change this property, and since the majority of the tests share testWidget instead of creating local instances, we should be thorough when cleaning up. Change-Id: I6039fb6857f4f788f809b1d1fd491b4ef34923ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_qdatetimeedit: hide testWidget when creating widgets on the stackMitch Curtis2018-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | The majority of the test reuses testWidget. While this may be faster than creating a QDateTimeEdit instance on the stack for each test, it introduces issues when certain properties aren't unset when cleaning up. This happens easily when new tests are introduced which rely on certain properties, for example. Rather than making the newly introduced step-modifier-related tests use testWidget, this patch goes with the simpler option of hiding testWidget, just like other tests currently do. Eventually we should probably switch to using local instances everywhere. Task-number: QTBUG-69492 Change-Id: I4d5625be0b7c72db793346f43fe3a7e7c1241f13 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Look for dependency XML files in all prefix pathsVolker Krause2018-08-071-2/+7
| | | | | | | | src/tools/androiddeployqt/main.cpp was moved from qttools into qtbase in 5.11. So re-apply 07bc7c02 in qttools here. Change-Id: I13a77a0c8567d07c4aa6369ed76bdb894b88f86f Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Add support for additional prefix pathsVolker Krause2018-08-071-7/+24
| | | | | | | | | | | | | | That is, paths that are searched for dependencies too, next to the Qt install prefix. So far this only covers library dependencies, dependency meta data or QML imports are subject to subsequent patches. src/tools/androiddeployqt/main.cpp was moved from qttools into qtbase in 5.11. So re-apply 14013829 in qttools here. Change-Id: I5649e518cfa3deeac429b4142e6292cb514ef104 Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Fix apkPath for gradle 4.0+BogDan Vatra2018-08-071-3/+8
| | | | | | | | | | | This change keeps the compatibility with old gradle. It is needed for projects that must use the old gradle version. src/tools/androiddeployqt/main.cpp was moved from qttools into qtbase in 5.11. So re-apply c03f5673 in qttools here. Change-Id: Iaa669c6bf12277cb0cde422228a5c653b6bcf433 Reviewed-by: Volker Krause <volker.krause@kdab.com>
* qdoc: Fix \fn commands for QCborxxx member functionsMartin Smith2018-08-073-12/+14
| | | | | | | | | | Severa qdoc function comments had incorrect signatures. This update corrects them to match the declarations in the header file. A \keyword command was also added for linking to the generic algorithms header file page. Change-Id: I997f7f2c7e4d0c3fcd269ee2c89a2836fecd4927 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SecureTransport - fix verifyPeerTrust for the renegotiation caseTimur Pocheptsov2018-08-071-22/+23
| | | | | | | | | | | Also remove unneeded and now wrong check (was marked with TODO) which was a copy and paste from OpenSSL counterpart. There, testing if peerCertificateChain.isEmpty() makes sense, since there we potentially call storePeerCertificates() twice during the handshake. Change-Id: I946e6876adb3f9504e93c06ac90ff36dd44aca4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make qcoreapplication_win compile in mingw g++ 8.2Mårten Nordheim2018-08-061-2/+2
| | | | | | | | | "type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]" And preemptively fix Clang nagging about repeated type. Change-Id: I2253b032d1867aa9976b4bdfc0f45023198f917c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix potential out of bounds read in qpkmhandlerEirik Aavitsland2018-08-061-1/+1
| | | | | | | Off-by-one bug in the validity test of the texture type field. Change-Id: I46ded85a0ad93166aa886e71f0c391f27e79f64f Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Be more explicit about the effects of swapBuffers() on the current contextTor Arne Vestbø2018-08-062-2/+4
| | | | | Change-Id: I7ab9e4e7323d49cf19774bfd0c51f8516ecb842d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add private helper class QMacScopedObserverTor Arne Vestbø2018-08-061-0/+44
| | | | | Change-Id: I993ce32c1f6a6eabdce8d5b2b52d8edb28ca2bfa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist tst_Gestures::graphicsItemTreeGestureJoni Jantti2018-08-061-0/+2
| | | | | | | | This autotest fails on the new Ubuntu 18.04 platform. Task-number: QTBUG-69648 Change-Id: I08bd892e2b6a733f3cda32091463745e8b8feed7 Reviewed-by: Simo Fält <simo.falt@qt.io>
* Simplify QUrlPrivate::appendHostJesus Fernandez2018-08-061-7/+3
| | | | | | | | Coverity-Id: 191128 Change-Id: I70f2d8b2e0063783851c1520862c2845c8908321 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Robbert Proost <robbert.proost@outlook.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass parameters by const-referenceJesus Fernandez2018-08-061-2/+6
| | | | | | Coverity-Id: 178810 Change-Id: I996955543c32907a54bf095bf52f242dbb7d5400 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Windows QPA: Fix clang-tidy-warnings about class definitionsFriedemann Kleint2018-08-0627-66/+66
| | | | | | | | | | - Use ' = default' for trivial constructors/destructors - Remove unneeded destructors - replace virtual by override or add override where applicable - Add Q_DISABLE_COPY Change-Id: Ic7a61579dbc845769beada4fc79bb5dd310e5e52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QTextureFileData: Fix build with -no-openglJüri Valdmann2018-08-061-0/+1
| | | | | | | Need to include <QSize> for operator<<(QDebug, const QSize &). Change-Id: I4857e9b43918243af66cc09ff352619595c081c9 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Windows QPA: Fix some clang-tidy-warningsFriedemann Kleint2018-08-0615-69/+59
| | | | | | | | | | | | | | | | - Replace index-based loops by range-based for - Change else if to if after return/break/continue or simplify - Fix indentation - Do not check for non-null before invoking delete on pointer - Use isEmpty() instead size() to check for empty containers - Remove C-style casts - Use raw string literal - Do not repeat type in return, use {} instead - Reference local variables by const ref where applicable Change-Id: I5cc4b4026a10bddb561ba1ba8ec137e0d4119f94 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLabel: Use nullptrAndre Hartmann2018-08-061-13/+14
| | | | | | | Also, change an old-style-cast while touching its line. Change-Id: I7b4a38994fb7f52fb7fb02826a71ef4b3698aa34 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* QByteArray: Fix documentation for toDouble() and toInt()Andre Hartmann2018-08-061-2/+2
| | | | | | | | | | The character 'g' is only a valid format when converting numbers to strings, but not other way round. Amends dc133765ec47e9625c49701f0ffd762b0ee1ad48 Change-Id: I98d1a4d4cf0665f6e4da6861243e41cd63d7d4b5 Reviewed-by: Martin Smith <martin.smith@qt.io>
* winrt: Fix QWinRTCursor::posOliver Wolff2018-08-061-5/+14
| | | | | | | | | | On winrt top level windows are always considered fullscreen and the core window's bounds are considered the bounds of QScreen. Thus When checking the mouse cursor's position the window bounds have to be taken into consideration. Change-Id: I39f24399bbaeade58d547abc770d4b3094174160 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Fix tst_QGraphicsItem::cursorOliver Wolff2018-08-061-15/+7
| | | | | | | | | By making the test independent of fixed top level widget sizes, it can also be run on platforms, that do not support this feature. Task-number: QTBUG-68297 Change-Id: I6945d259801360a9819b9b631d0a7497d3d27a9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* winrt: Add mouse event loggingOliver Wolff2018-08-061-1/+51
| | | | | | Change-Id: I4b2e0cd19969cf44a2de65bd0e52a32fc8e535b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Implement QPlatformCursor::setPosOliver Wolff2018-08-067-9/+112
| | | | | | | | | | | | Additionally to setting the cursor position we have to make sure that enter and leave events are triggered. As WinRT at the moment only supports maximized/fullscreen native top level widgets, an enter or leave event has to be triggered, every time the cursor enters or leaves the core window. Same as is done on Windows desktop an enter event is immediately followed by a move event even for emulated mouse events. Change-Id: I4b9a7b07f8e24b7887619f96979a064d933788aa Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Add a few overrides in Qt CoreAlessandro Portale2018-08-0513-103/+103
| | | | | | | | | Clang-tidy says: warning: annotate this function with 'override' or (rarely) 'final' [modernize-use-override] Change-Id: Ic2304cf35f4132ba1f55714493db93836f8b413d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QSharedPointer: raise the timeout for running qmake and makespecThiago Macieira2018-08-041-7/+13
| | | | | | | | We had 30s and 60s only, which isn'tenough for the Qt CI. Task-number: QTBUG-69741 Change-Id: I00e04a465fcf4fc1a462fffd154782999e84ef8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Don't make QCocoaGLContext current unless we have a drawableTor Arne Vestbø2018-08-041-3/+5
| | | | | Change-Id: I12ac982aa977c69af936f503369c91bac88492a9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Modernize and clean up QCocoaGLContext::updateSurfaceFormat()Tor Arne Vestbø2018-08-041-97/+76
| | | | | | | | | | The updateFormatFromContext function that read GL state has been merged into updateSurfaceFormat(), we're using AppKit classes and functions instead of Core GL, and the logic has been simplified by using attribute/parameter helpers. Change-Id: Iec6717f457a0b4dbc8e34c3e15fcbcc42895b23e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Add note about high-resolution workaround in QCocoaGLContext::makeCurrentTor Arne Vestbø2018-08-041-0/+2
| | | | | Change-Id: I0b82ef95c1a058586e8005665e1e2cab3f975833 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Simplify and clean up QCocoaGLContext constructorTor Arne Vestbø2018-08-043-34/+36
| | | | | Change-Id: Ie16256282784926506355012a735511b98118614 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Clean up and rename QCocoaGLContext::pixelFormatForSurfaceFormat()Tor Arne Vestbø2018-08-042-24/+27
| | | | | Change-Id: I1a439d8cec950cb23c977eedfcc1b8810c6cd1c5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QToolTip::mouseMoveEvent(): always call base classChristian Ehrlicher2018-08-041-7/+7
| | | | | | | | | QLabel::mouseMoveEvent() only called the base class implementation when a rect was given to showText which could lead to inconsistent behavior. Change-Id: I3e537ba5ae7c3c67715975624d1ee9f0c04fa9a7 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QAbstractItemDelegate: only handle as json when type is QMetaType::QJsonValueChristian Ehrlicher2018-08-041-11/+14
| | | | | | | | | | | Only handle QVariants which has the type QMetaType::QJsonValue as json values. Otherwise other types like e.g. QMetaType::Long/LongLong will also be converted to a QJsonValue and maybe end up being displayed in scientific notation. Task-number: QTBUG-65082 Change-Id: I5d6458cd7e48fec262cda00b584a1a3c45404400 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QHeaderView: respect min/maxSectionSize in setDefaultSectionSize()Christian Ehrlicher2018-08-042-0/+11
| | | | | | | | | | | | | The min/max section size was not checked when setting the default section size. This was an oversight when the check for min/max section size was added to resizeSection(). [ChangeLog][QtWidgets][QHeaderView] setDefaultSectionSize() now checks if the given value is inside min/max section size Task-number: QTBUG-69431 Change-Id: I1b5704282927ce5a8520f52174ebf91d9840bc8a Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Blacklist flaky tst_QSpinBox::stepModifierPressAndHold on OpenSUSETor Arne Vestbø2018-08-041-0/+2
| | | | | | Task-number: QTBUG-69492 Change-Id: Ic24bad5a6b0c085e82f95e0b418d4d57405de4ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* macOS: Disambiguate use of native handles in QCocoaGLContextTor Arne Vestbø2018-08-034-16/+10
| | | | | | | | | We only need the QVariant native handle when creating the context, so there's no need for a getter, and we then rename the NSOpenGLContext getter to match e.g. QCocoaScreen::nativeScreen(). Change-Id: I041e0eff39af9c8836d8ecd560ea07e92dc63e03 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Remove GL defines from QCocoaGLContextTor Arne Vestbø2018-08-031-20/+0
| | | | | | | They should be available in all SDKs we build against and support. Change-Id: I799492e0b21a877717fb3a8391bcbad0f8581628 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Don't mess with native handle for QOpenGLContextTor Arne Vestbø2018-08-031-3/+0
| | | | | | | | | | | | QOpenGLContext::setNativeHandle() is documented as: "configuration settings, like format(), are ignored since this QOpenGLContext will wrap an already created native context" We should respect this and not apply QT_MAC_OPENGL_SURFACE_ORDER. Change-Id: Idfdf3eac0e9f9d0a86f1b23aa475c3e4f12127e2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Remove unneeded auto-release-pools in QCocoaGLContextTor Arne Vestbø2018-08-031-3/+0
| | | | | | | | The makeCurrent one was not explained in the commit message that introduced it, and doesn't make any sense, while the constructor one is no longer needed. Change-Id: I67e2f2aaff5d8602781b27f122f415068a1f2301 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Add more logging to QCocoaGLContextTor Arne Vestbø2018-08-031-1/+11
| | | | | Change-Id: I6e93934b466f86b7607c9ad30c4c28a9c0f40fd7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Propagate [NSOpenGLContext setView:] failuresTor Arne Vestbø2018-08-035-55/+25
| | | | | | | | | | | | | | | | | Instead of trying to mask situations where [NSOpenGLContext setView:] will fail (such as calling it for a view that's not part of a window yet, or part of a window that hasn't been shown), we report the error up through the API, so that QOpenGLContext::makeCurrent() will return false. This is documented to occur e.g. when "the surface is not exposed, or the graphics hardware is not available due to e.g. the application being suspended." QGLWidget was taught how to deal with this situation in cc27a50e. Other Qt APIs seem to handle it fine, but if regressions occur they should be fixable though the same logic as in cc27a50e. Change-Id: I92775fc165444696b6c5b44fa0e28ce3c4ad2190 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Make screen property changes more verbose and granularTor Arne Vestbø2018-08-036-12/+31
| | | | | | | | We only update the properties that have actually changed. Change-Id: If711530c6118d2550d5a0e968ee02c903b44fd04 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Windows: Refactor the debug operator for the MSG message structFriedemann Kleint2018-08-031-388/+254
| | | | | | | | | | | | | | | | | - Fix spelling - Use noquote - Make helpers static - Remove C-style casts - Remove Borland-specific code - Streamline code - Use QString::fromWCharArray() - Remove #ifdefery and undefined macros - Fix replicated base "wParam(0x0x0)" caused by formatting "(0x%p)" (MSVC) - Replace the flag/enum lookups with variadic arguments by extending the lookup struct used for messages and helper functions Change-Id: I04d861775f3c306e6d449c5a9b423eb244e99a36 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows: Fix QEventLoop::ExcludeUserInputEvents for pointer eventsFriedemann Kleint2018-08-031-13/+18
| | | | | | | | | | | | Factor out the check for user input events from QEventDispatcherWin32::processEvents() to a small helper and add pointer messages (by value as to avoid MinGW issues). Task-number: QTBUG-60437 Task-number: QTBUG-69687 Change-Id: I38bf227f862fcc44177a5027cafe1df49a10a919 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* uic: Fix clang-tidy warningsFriedemann Kleint2018-08-0310-73/+58
| | | | | | | | | | - Simplify/streamline if statmenents - Change else if to if after return/break/continue - Use isEmpty() for containers instead of checking size() - Replace index-based loops by range-based for Change-Id: I008228a99082a4d0e27be9f6c6af392602140b2f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Enable QPluginLoader test for static buildsSimon Hausmann2018-08-032-2/+32
| | | | | | | | | | | The majority of tests use QPluginLoader::setFileName implicitly, which refuses to do any work in static builds. Therefore the majority of tests are skipped. But in the future we'll get tests here that for example use QPluginLoader::staticPlugins() and for that we want to include the sub-directory in the build and test run. Change-Id: Ib8ec274e22ac8050feaca8967eb8626b53876b92 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QUrl: Add qustrchr() and use it to speed up the fast URL full decodingThiago Macieira2018-08-033-107/+106
| | | | | | | | | | | | | The character search in the findChar() static function in qstring.cpp is more efficient than what we had in qurlrecode.cpp and there's no point in duplicating it. It also has a Neon implementation. So make the implementation available for use in QtPrivate::qustrchr(). This also simplifies the implementation. Change-Id: Ib48364abee9f464c96c6fffd152eedd0cd8ad7f8 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move the createUnixEventDispatcher() function to a namespaceThiago Macieira2018-08-032-1/+4
| | | | | | | | Easier than renaming it with a "qt_" prefix everywhere it's used (it's in a lot of plugins). Change-Id: Ie01831ddac5446fdbdeefffd15468918f3bc2238 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove member function from CentralFileHeaderThiago Macieira2018-08-031-12/+11
| | | | | | | | | I could have placed the class in an unnamed namespace. That would mark the member function as a local symbol too. But I preferred to move outside so I could make it static. Change-Id: Ie01831ddac5446fdbdeefffd154688c0883ed653 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>