summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix define indentation in qopengl.hTor Arne Vestbø2020-07-011-5/+5
| | | | | Change-Id: I7894fcadf1a0abecbd8206abae1b035c823d52c4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Remove PPD deprecation warningTor Arne Vestbø2020-07-011-4/+1
| | | | | | | We're not going to replace these any time soon, so remove the warning. Change-Id: If020d2d3cf752e9a11558a55df5d05e2d2b3c567 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Documentation fixes for QStringTokenizerKai Koehne2020-07-011-9/+9
| | | | | | Task-number: QTBUG-85343 Change-Id: Ib647d90ba3cfa1181690dc745249637031c7ad67 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* In-class initialize QWindowsGLContext membersTor Arne Vestbø2020-07-012-16/+9
| | | | | Change-Id: Icd84e96706d5779656d7311755596110494eacd8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove explicit tracking of QOpenGLContext in QWindowsGLContextTor Arne Vestbø2020-07-012-3/+1
| | | | | | | | QPlatformOpenGLContext takes care of that via QPlatformOpenGLContextPrivate, which is set up in QOpenGLContext::create(). Change-Id: I1088c2e18efe6023c8e76f126d967a607746e980 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Add "cmake" keyword for test blacklistingAlexandru Croitor2020-07-012-1/+9
| | | | | | | | | | | | | | Certain tests fail only on CMake configurations. We need the capability to ignore these failures, without removing the qmake-built-Qt coverage for now. The keyword is enabled when Qt is built with CMake. So it doesn't matter if the final test is built with CMake or qmake. Task-number: QTBUG-85364 Change-Id: I157fe3d9254b589ef1e84022c01f4487ff834d27 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix delivery of MouseMove events to newly opened popup windowsVolker Hilsheimer2020-07-012-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Amend d934fd7f54eae24ea3f719890e2c4dbbc445049d, which was too naive in assuming that any change to the popup stack while a popup had been pressed into should result in mouse move events to be delivered without buttons. Instead, add a new flag that is set explicitly when the qt_popup_down widget is closed, and remove buttons from the move move events only when that flag is set. Add the sorely missing test case as well, even if we have to accept that not all behavior can be tested reliably. Ie. on macOS, the simulated mouse event differs from the event we do get from the QPA plugin or the system; on Xcb, some of the behavior depends on the window manager. This is something we could try to clean up for Qt 6. Change-Id: Ibf0a0a6fb7d401915057365788947e5a35aa20c3 Fixes: QTBUG-84926 Task-number: QTBUG-82538 Pick-to: 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QSslConfiguration::setCiphers - introduce the overload taking QStringTimur Pocheptsov2020-07-013-0/+35
| | | | | | | | | | | | | We had such an overloaded version in QSslSocket, it was deprecated without providing any alternative. Now this function has some use and may be introduced in Qt6, as QSslConfiguration::setCiphers(const QString &). Last but not the least - a useless and strange auto-test was removed (it was creating a list of 5 QSslCiphers each with isNull() == true). That's becasue '!MD5' or 'ALL' (for example) is not a cipher to be found in supportedCiphers. Change-Id: I47eb4c0faa9b52885e883751dd992cd9cb3d26fe Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Hard-code QT_CONFIGURE_CROSSBUILD to 0Joerg Bornemann2020-07-011-0/+1
| | | | | | | | The qmake we're building is always built for the target platform. Therefore, QT_CONFIGURE_CROSSBUILD can always be set to a falsy value. Change-Id: I0f03c4ce0c75d3b4e97be5141adf742276131dcb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Let QScreen::grabWindow's winId parameter default to 0 and add testVolker Hilsheimer2020-07-014-46/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | The platform plugins are implemented to grab the entire screen if no window ID is provided. They do not grab the entire virtual screen, just the screen the method is called on. On macOS, the implementation ignored the window parameter, and always grabbed the entire virtual screen. This change fixes the cocoa implementation. The test passes in local tests (with two displays with different dpr). Since grabbing a screen returns an image with managed colors, we need to convert it to sRGB color spec first, otherwise displaying a grabbed image will produce different results. This will need to be changed once Qt supports a fully color managed flow. The test does not cover the case where a window spans multiple displays, since this is generally not supported at least on macOS. The code that exists in QCocoaScreen to handle that case is untested, but with the exception of the optimization it is also unchanged. Done-with: Morten Sørvig <morten.sorvig@qt.io> Change-Id: I8ac1233e56d559230ff9e10111abfb6227431e8c Fixes: QTBUG-84876 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make QDebug operator<< polymorphic for QPointingDeviceShawn Rutledge2020-07-013-1/+8
| | | | | | | | | At least it will look polymorphic by doing dispatch internally. Adding pointingDeviceType avoids the need for qobject_cast, and will probably also be useful in other contexts. Change-Id: I3b6d13765bdf3add9a8208de6f0e98018e40cc42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move the EDID parser into QtGuiFriedemann Kleint2020-07-0123-54/+21
| | | | | | | | | As a drive by, fix recursive inclusion in qxcbscreen.h. Task-number: QTBUG-83255 Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: increase XCOORD_MAX to 32767Liang Qi2020-06-301-1/+1
| | | | | | | | | | Align with int16_t in xcb_create_window() and xcb_get_geometry_reply_t. Fixes: QTBUG-85275 Pick-to: 5.15 Change-Id: Ibbc0fab6b3d725a96ac4545857a4f04b026c4175 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QLoggingRegistry: remove an always true testGiuseppe D'Angelo2020-06-301-2/+1
| | | | | | | | idx has already been tested for being >=0, so it's pointless retesting it. Change-Id: I2f5d7e1b7a70097de2601c1ed83752f6aa707cd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArray::insert: do not assert that pos must be non-negativeGiuseppe D'Angelo2020-06-301-2/+0
| | | | | | | | The insert() overloads have generally a very wide contract. The very next line accepts negative positions, so remove the related assert. Change-Id: I89b67615c59287825942047a28572bf896cf30e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: do not retest if a codepoint is less than 0xFFFFGiuseppe D'Angelo2020-06-301-1/+1
| | | | | | | It's already tested in the surrounding if. Change-Id: I37e13406cfd4865731ce06ed097c03294a75c592 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRgba: code tidiesGiuseppe D'Angelo2020-06-301-1/+1
| | | | | | | Fix the signature of an assignment operator. Change-Id: I125c0129bb2607e5d8beb932da843a0393f2cfeb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* glx: Pull out screen numnber from GLXFBConfig instead of QXcbScreenTor Arne Vestbø2020-06-301-1/+7
| | | | | Change-Id: I6b87bb1c3c501613bc147c5f88e0f2d2222b0a50 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* glx: Remove assumption about supporting multiple displaysTor Arne Vestbø2020-06-301-17/+12
| | | | | | | | | We only support one display (X server connection), so there's no reason to have the user pass in the display. We can always use the one we know from the QXCbScreen (which also matches the QXcbIntegration connection). Change-Id: Ifc43dac4c74ba16490d3dee25fc3d43ee053a7d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Switch to qvla where it makes sense in rhiLaszlo Agocs2020-06-308-39/+43
| | | | | | | | | For all of these we know in advance that the vast majority of usages will not exceed a certain number of elements. Also, none of these are copied or moved ever. Change-Id: I48aedf143e221dc178d661e23454d1e4fb7a271b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QMacStyle - stop using the deprecated APITimur Pocheptsov2020-06-301-3/+0
| | | | | | | | | | | | | | | Namely, -calcSize method of NSControl (we're calling it for NSSlider). The documentation recommends overriding -layout instead, but we don't inherit NSSlider thus cannot override anything. Also, he documentation says that -calcSize call its cell's -calcDrawInfo: if needed. The default -calcDrawInfo: in NSCell is documented to be a noop and it would appear NSSliderCell does not override it. Thus we remove this call. Pick-to: 5.15 Change-Id: Ic3e8bf742b50528a0616fb73494ec340fcd57e25 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use std::memmoveSamuli Piippo2020-06-301-3/+4
| | | | | | | | ... and add include for it. Amends ffb73175e6c5b35e6367c88479cc0bf160482016 Change-Id: I709a5aed13f6f62017b9e4116a03a4dfaae4bb13 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Switch to qvla where makes sense in openglLaszlo Agocs2020-06-303-4/+4
| | | | | | | | | For all of these we know in advance that the vast majority of usages will not exceed a certain number of elements. Also, none of these are copied or moved ever. Change-Id: I265afec154939c2fd0d1f902d97a86315ec7bc20 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix formatting in QDebug operator<< for QPointingDeviceShawn Rutledge2020-06-301-1/+1
| | | | | | | | It was missing some spaces. Now looks like QPointingDevice("Wacom Intuos3 6x8 Pen stylus", type=Stylus, id=b, seat=30002, pointerType=Pen, capabilities=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt, maximumTouchPoints=1, uniqueId=4c00079) Change-Id: I4a8203a2a5ee1f8c5c53a6a85b40ec1d25a3c2c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Pass correct modifier to QCocoaKeyMapper::toKeyCode()Tor Arne Vestbø2020-06-301-1/+1
| | | | | | | | | | | | | The modifierKeyState variable is based on the Carbon modifiers, and then further mangled to match the expected format of UCKeyTranslate. But inside QCocoaKeyMapper::toKeyCode() we compare the modifiers to Qt::KeyboardModifiers. To ensure the logic works as expected we need to pass in the Qt modifiers. This fixes shortcut sequences based on "Backtab". Change-Id: I089fe601f0fe7a92f746e0a6447e2de0d974d0b2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Simplify QCocoaKeyMapper by always returning a valid keymapTor Arne Vestbø2020-06-302-17/+16
| | | | | | | | | | | | | QCocoaKeyMapper::updateKeyMap would always end up creating a valid key map, so the logic in CocoaKeyMapper::possibleKeys for dealing with missing keymaps was not needed, and was likely copied from one of the other key map implementations. Since we know that we have a key map we might as well return it after possibly updating it. Change-Id: If83974f4ddedae8b1acefbadef48da3ee326eadd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Modernize QCocoaKeyMapperTor Arne Vestbø2020-06-302-316/+284
| | | | | | | | | | | | | | | Paying off technical debt from Qt 4 times, and preparation for removing Carbon dependency. - Proper variable names (m_ prefix, titleCase, fullyWrittenOut) - Modern data structures for lookups - Removal of dead code/variables - Categorized logging - Built in constants instead of magic numbers - Typed variables instead of naked integers Change-Id: Ie14621e0da8ed61e2185fa05373047204dc4ea62 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-3011-0/+11
| | | | | | Task-number: QTBUG-85179 Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix warning about missing QT_BEGIN_NAMESPACE in qsimd.hTor Arne Vestbø2020-06-301-0/+3
| | | | | Change-Id: I80d5ec671b08e74856b27922b10e0b31007a62c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* forkfd: remove FFD_VFORK_SEMANTICSThiago Macieira2020-06-304-11/+0
| | | | | | | | | | | | | | | This will never work, not unless libc implements it themselves, since the child process is not allowed to return from the function that does the vfork(), as subsequent use of the stack would trash the frozen parent's return address, and in our case that's syscall(). Instead, we may add a vforkfd() function that takes a callback function that will be called in that context, like the glibc clone(3) wrapper does. Pick-to: 5.15 Change-Id: I1dba29bc0f454df09ca1fffd161800b453c00593 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix QShortcutMap::createNewSequences debug loggingTor Arne Vestbø2020-06-301-10/+2
| | | | | | | | We don't need to include the possible keys in the log output as that's handled by the call site in QShortcutMap::find. Change-Id: Ie0635f63a4304fde40a8b671385518dd1e42e2dc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use QList instead of QVector in guiJarek Kobus2020-06-2978-410/+420
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use QList instead of QVector in corelib docsJarek Kobus2020-06-2915-864/+348
| | | | | | | Task-number: QTBUG-84469 Task-number: QTBUG-85221 Change-Id: Ieb0ba7d82409e3c053a5788a01e92ea495505643 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move QAlertLevel and QAlertType enums into the namespace QSslTimur Pocheptsov2020-06-295-120/+122
| | | | | | | | | | Not to pollute the global namespace with rather generic names (especially in case QT_NAMESPACE is none); also drop the (now)redundant 'Q' prefix in the names. Change-Id: I57ea7e3996cced705f7ddbdbc1e0231191b31c43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QUrl::toDisplayString(PreferLocalFile) returning an encoded pathDavid Faure2020-06-292-5/+7
| | | | | | | | | | | | | It's supposed to return the same as toLocalFile(), for local files, which means passing QUrl::FullyDecoded just like QUrl::toLocalFile() does. But a few code paths were testing component formatting options without masking other FormattingOptions like RemovePassword, so this had to be fixed. Fixes: QTBUG-84594 Change-Id: I82f15148b6d93516200f9ad6258d474e7f10924a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove leftover QT_WARNING_POPTor Arne Vestbø2020-06-291-1/+0
| | | | | | | Amends ab1e0961d4718fb5e36e22c3b70dd98e776e0edd. Change-Id: I460d650e70dc5635cb377569aa976f11fc206d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QByteArray::operator[] no longer resizesAlbert Astals Cid2020-06-291-3/+2
| | | | | | | Fix the documentation Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-2955-388/+334
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix UITouch event handling on tvOSMike Krus2020-06-291-9/+23
| | | | | | | | | | | | | | | | | | | | | On tvOS touchesEnded: occasionally gets called with touches that have not been passed via the touchesBegan:. When this happens previously cached touch event (that HAVE been passed to touchesBegan:) are no longer valid. This causes a crash when testing if new touches contain old ones (since NSSet dereferences the needle which is no longer valid). Fix uses the unique (unsigned int) hash that UIKIT assigns to the UITouch instance so cached copies are never accessed. Furthermore, tvOS only supports single touch so now just clearing cache when touch has ended. Task-number: QTBUG-84383 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I7592cdde74ce834285e7b14196171f6b57736cc8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Create a Find module wrapper for OpenGLAlexandru Croitor2020-06-293-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Our .prl files embedded an absolute path to the OpenGL.tbd file. This obviously breaks their usage when used on another machine when no SDK exists. To fix that we need to use a "-framework OpenGL" linker flag instead of linking against the absolute path library. To convince CMake to do that, we have to create a wrapping OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES property. So create a FindWrapOpenGL find module to do that on darwin platforms. Adjust helper.py and our build system to use it. This tangentially amends 38cd18384f6198c5bc3ea1da9ffc0158e960a778 because it recreates the FindWrapOpenGL module, but for a different purpose. Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove some long-deprecated methods of QLibraryInfoEdward Welbourne2020-06-292-52/+0
| | | | | | Change-Id: If5e85f813921b44971ca8572858051b53e1127a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Sune Vuorela <sune@vuorela.dk>
* wasm: fix handling on int dead keys on macLorn Potter2020-06-291-12/+15
| | | | | | | | | Q_OS_MAC is not defined when building wasm on mac, so we need to use a runtime check. Pick-to: 5.15 Change-Id: I1e9c5ec4e11aae94c9d8e918b5f1f1526723c782 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: do not close QIODevice on errorLorn Potter2020-06-291-3/+0
| | | | | | | | | | | Closing it early means the user may get this message when reading data without checking for error: 'QIODevice::read (QNetworkReplyWasmImpl): device not open' Change-Id: I377fc3da68e9d9f14f8504ace5addbb4f8e3c539 Fixes: QTBUG-85176 Pick-to: 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: search emscripten key firstLorn Potter2020-06-291-8/+9
| | | | | | | | | This fixes key lookups with different keyboard layouts Pick-to: 5.15 Fixes: QTBUG-84494 Change-Id: I18f1643331961d9bfc1ac6977181f8959e76449d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove pthread storage for thread local dataMike Achtelik2020-06-281-59/+21
| | | | | | | | | | | | | | | | | The thread specific QThreadData is currently referenced as a thread_local variable and using a thread specific value via pthread_setspecific. Having both is not necessary, as the pthread value is never directly accessed and only used in the pthread destructor. Using a holder, we can achieve the same and get rid of the pthread handling altogether. This also fixes a bug, where the thread_local currentThreadData is already null, when entering the pthread destructor. In this case it would lead to a new QThreadData being created, when finishing an adopted thread. Pick-to: 5.15 Change-Id: Ib23b840f804637e6b7cebd89016672a34a575380 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Make the path variables in Qt6CoreConfigExtras.cmake relativeJoerg Bornemann2020-06-281-13/+13
| | | | | | | | | | | | | To be consistent with the Qt6HostInfo package, we're providing paths without prefix in the variables like QT6_INSTALL_BINDIR. The full path can be easily obtained by combining the relative path with the QT6_INSTALL_PREFIX variable. Also, the value of QT6_INSTALL_SYSCONFDIR was wrong. It usually is located outside of the prefix. Change-Id: I0035633a8c1c865d86d5ffc8b36565ceb2e7ea25 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Clean up modal sessions after each pass of processEvents()Richard Moe Gustavsen2020-06-271-0/+5
| | | | | | | | | | | The Qt macOS event dispatcher defers modal session cleanup until the next runloop pass. But as it stood, we never did do so for stand-alone qApp->processEvents() calls. The result was that a NSModalSession would be kept alive longer than necessary, which would impact the activation state of other QWindows. Change-Id: I054f3084132c9d20a29a3f5823c19b7123ef40bf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-262-53/+7
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QList: use =default for its default constructorGiuseppe D'Angelo2020-06-261-1/+1
| | | | | Change-Id: Id5270eac2464bf2d3810de18579d4dc295e98b38 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve deprecation message for QLine::angle(QLine)Eirik Aavitsland2020-06-261-1/+1
| | | | | | | | | | | | | | angleTo() always gives an answer measured ccw, so between 0 and 360 degrees. The deprecated angle() would give either cw or ccw, depending on which is smaller, so between 0 and 180 degrees. Help users porting by showing a simple way to achieve the angle() behavior in the deprecation message. Change-Id: I66f77d2b4e688562e443428209737aa3332a448f Pick-to: 5.15 Fixes: QTBUG-85087 Reviewed-by: Lars Knoll <lars.knoll@qt.io>