summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Disable system provided tabbing by defaultTor Arne Vestbø2020-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | macOS 10.12 introduced automatic window tabbing, where the OS provides tab handling on behalf of the application. The feature defaulted to being on, and the release notes asked applications that had their own tab handling to disable the automatic tab handling explicitly. Qt has its own tab handling, and should therefore disable the automatic handling. We do this on a per NSWindow basis, using the tabbingMode property of the window, instead of the global allowsAutomaticWindowTabbing property on NSWindow, so that individual windows can still opt in to the automatic tab handling. Doing it via the tabbingMode property also ensures that we're not affecting the host application's behavior in a plug-in setting. Ideally Qt's tab handling should read the userTabbingPreference property of NSWindow to pick up the system preference choice of whether to open new windows as standalone windows or tabs, but this is left for a later change. An alternative would also be to use the automatic window tabbing instead of our own implementation. Fixes: QTBUG-61707 Change-Id: Icf2078b63ec16202ff7fd83ea264a48dc61978e1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Windows QPA: Add support to UiaRaiseNotificationEvent()Andre de la Rocha2020-03-041-5/+21
| | | | | | | | | | | This change adds support to UiaRaiseNotificationEvent() in the UI Automation-based accessibility code, and uses it to notify changes in string-typed values, allowing Narrator, NVDA and other screen readers to notice changes in the application state that were previously missed. Fixes: QTBUG-75003 Change-Id: I646ca3a851ab7b69817d900b002eb91a3bf607a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Don't create QMacCGContext when printingTor Arne Vestbø2020-03-041-9/+12
| | | | | | | | | We adopt the context of the print session, so the code is not needed, and would just produce a warning since QMacCGContext didn't know what to do about the printer paint device. Change-Id: I9ac079f5cb5d98022045632592d0e375710eecc3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Reduce save dialog extension filters to their last componentTor Arne Vestbø2020-03-041-19/+42
| | | | | | | | | | | | | | | | | | | NSSavePanel does not deal well with multi-part extensions, to the point where it will fail to open if that's the only acceptable extension. We follow Chromium's lead here and reduce the extension to its last component, which enables selecting and saving files such as 'foo.tar.gz'. To improve the user experience we always show file extensions when we detect a multi-part extension. This makes it clearer what the final extension will be, and avoids confusing macOS about the intention of the user when choosing a file that without the final extension also matches another known extension. Fixes: QTBUG-38303 Fixes: QTBUG-44227 Change-Id: Id0cee84f758c2cd59fcf1b339caa30f7da07dd1e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Do not constantly create new surfaces with MoltenVK on macOSLaszlo Agocs2020-03-033-7/+8
| | | | | | | | | Querying the VkSurfaceKHR for a window is expected to create the surface once and then return the same value afterwards. Task-number: QTBUG-82600 Change-Id: Ib3e99dfca4d940de1a14348eb1909d372a7dde04 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: MoltenVK: Pass in the layer instead of the viewLaszlo Agocs2020-03-031-1/+1
| | | | | | | | | | Surface creation may be triggered on a thread other than the main thread. To enable this, MoltenVK also accepts the CAMetalLayer instead of the NSView. See https://github.com/KhronosGroup/MoltenVK/pull/258 Task-number: QTBUG-82600 Change-Id: I7b925210d05235baf04441682760f09fe58d8144 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-03-035-26/+17
|\
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-295-26/+17
| |\ | | | | | | | | | Change-Id: I851c0328c3c38ea67b5ad115b205ac6a1262706e
| | * Fix geometry handling for native child windowsFriedemann Kleint2020-02-282-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't move the native child window position for native child windows. Initial-patch-by: Błażej Szczygieł <spaz16@wp.pl> Task-number: QTBUG-82312 Fixes: QTBUG-79166 Change-Id: I117ef08da13c8e90ff60cf034126c9efdc17b836 Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Android: Don't recurse into directories inside the assets when iteratingAndy Shaw2020-02-271-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | When iterating, it should only return what is in the specified path and not the contents of the sub-directories inside the given path in addition. Change-Id: Iad56f075c22fdf1c633582e37444e26520c24a73 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * Windows: Enable closing the system tray menu when clicking outside of itAndy Shaw2020-02-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for the system to close a menu when clicking outside of it or outside of the controlling window for the system tray then it needs to be at the foreground right before the menu is tracked. This makes it act like other system tray menus then. Change-Id: I663670c506cfd1e2ba59cd3e75b12e1f8ba17c33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * qwindowswindow: Fix screen changes between different DPI screens for native ↵Oliver Wolff2020-02-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows When asynchronous events are used for notifications about screen changes it is possible that we run into a race condition where the scale factor has not yet been updated for the new screen. This results in a wrong geometry being set for the window that is moved between the screens. We do not have that problem with synchronous events. Change-Id: I4eb6d2a7cb49517d271901b479f973e273a0926a Amends: 7eed1e40d4d3b6a066bac52995eed7e75d17de2d Task-number: QTBUG-65580 Fixes: QTBUG-82312 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Remove overrides of QImageIOHandler::name()Shawn Rutledge2020-03-036-37/+0
|/ / | | | | | | | | | | | | | | | | We will remove the virtual base class function in Qt 6. For now, name() returns format(). Change-Id: I1597e823b859e4db148b3e5ac0f1c15350a582eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Android: Add support for getting information about content urisAndy Shaw2020-02-282-2/+51
| | | | | | | | | | | | | | | | | | | | | | This enables things like size(), exists() to work with Android content uris with the provided uri given from a filedialog. It is expected that it is always a full path due to the nature of content uris, so relative paths will not work. Change-Id: I9c9ea42833677eb9d937b33e9dd42ee2a7d9c7c5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | SQL: Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-285-5/+5
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: Ia4c698df60648c85c8e6132641e5ea7bc553129a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Lars Knoll2020-02-275-9/+36
|\| | | | | | | Change-Id: I4212d070d5752275085e754b96f0392113604dba
| * wasm: fix texture leak when window is destroyed in a different contextAlexandra Cherdantseva2020-02-275-9/+36
| | | | | | | | | | | | | | | | | | | | Reproduce: Show first window in first canvas; Show second window in second canvas; After screens are rendered destroy first window in first canvas Change-Id: Ifbeb4824c1fdedecf24d5d20e58613d15c066420 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Rename AA_MSWindowsDisableVirtualKeyboard to AA_DisableNativeVirtualKeyboardAndre de la Rocha2020-02-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | Renaming the attribute to make it platform-independent, since in spite of currently being supported only on Windows, it may be eventually supported on other platforms where it may be useful. Task-number: QTBUG-76088 Change-Id: Id98ccd7a34e1c43b1f2274efce6ab4b4aff24f03 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-242-3/+3
|\| | | | | | | Change-Id: Ibe5b4aa249863a54007180f3684dc5ce1b23cb7b
| * Fix wrong DPI used by QStyle::pixelMetric()Friedemann Kleint2020-02-222-3/+3
| | | | | | | | | | | | | | | | | | Pass on the option or the widget in order to ensure usage of the correct DPI for High DPI scaling. Task-number: QTBUG-82356 Change-Id: I5df903a83f88adebd143e514e2fead367d39f015 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle - fix tab buttonsTimur Pocheptsov2020-02-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | not to have arrows under some conditions. NSPopUpButton had a needed color, except it also has arrow(s). Which looks quite confusing on an inactive window on a tab button. Fixes: QTBUG-82122 Change-Id: I40c57abe9ccae48fa906d592169c412f5f89f712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 0e643bf7830949ade66e76a6eefa99b4b24c422b)
* | Make xcb plugin compile with -no-feature-tableteventShawn Rutledge2020-02-201-2/+0
| | | | | | | | | | | | | | | | | | fixed1616ToReal() is used for touch and scroll events too, not just tablet. Task-number: QTBUG-82168 Change-Id: Idcdd6365b5619824b41c1278e5dc5ffb81c400f8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | wasm: do not try to resume main thread if mainloop has not started yetLorn Potter2020-02-201-0/+1
| | | | | | | | | | | | Fixes: QTBUG-81520 Change-Id: Ibd891629d1d023e47d196dd60821cc5c583a178d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QtSql: cleanup QSqlDriverPrivate and QSqlResultPrivateChristian Ehrlicher2020-02-194-127/+81
| | | | | | | | | | | | | | | | Cleanup QSqlDriverPrivate/QSqlResultPrivate and their derived classes in ODBC, MySql, PostgreSQL and SQLite. Change-Id: I52e69c00cf981b81dde7c3a0370f86f06ef756bb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2020-02-186-2/+205
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-186-2/+205
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlinkedlist.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
| | * wasm: futureproof EmscriptenMouseEventLorn Potter2020-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Future versions of emscripten will remove the timestamp, so we need to replace this with the current timestamp See https://github.com/emscripten-core/emscripten/commit/a7f058a1e6e4b72b4446a3b36f8e96f9f8f41f2d#diff-9a5d68085dc7db2938b37a2b7b05c1f5 Change-Id: I8379d1adee1df1084461fddb1dd2e71684de9657 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * wasm: guard nonthreaded builds from using threading.hLorn Potter2020-02-181-0/+2
| | | | | | | | | | | | | | | Change-Id: Ib5cd8afc4822cc89371d184ee5645ed8f496c8b0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * wasm: Specify event targets by CSS selectors; Support emsdk >= 1.39.5Morten Johan Sørvig2020-02-184-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is now on by default, which means that functions like emscripten_set_keydown_callback() now expects CSS selectors (e.g. "#canvas_id" instead of "canvas_id"). In addition, Module.canvas is no more. Add a deprecation warning in case someone is setting it and expects Qt to use it. (qtloader.js sets qtCanvasElements instead). This bumps the minimum supported emsdk version to 1.39.5. Change-Id: I38abb2a191076ea04581c29552657ee3e0b87dbc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Avoid return QImage::Format_Invalid from QPlatformScreen::format()Allan Sandfeld Jensen2020-02-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to set the pixmap format, and needs to be defined to something sane even if there is no primary screen. Task-number: QTBUG-81671 Change-Id: Ic0d41cec31ac71309123aa8bb8b840fa4a4122bb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Windows QPA: Implement IExpandCollapseProvider for submenusAndre de la Rocha2020-02-124-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Menu items with submenus should implement the Expand/Collapse UI Automation pattern in order to allow screen readers to say whether they are expandable items. Fixes: QTBUG-80550 Change-Id: I4f72d30172f76f028be5cbdeb1fd85fca6b07acf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * macOS: Tag sub-layer images with color space on flushTor Arne Vestbø2020-02-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Failing to tag the image results in costly CPU-based color-space conversions. Change-Id: Ib65547f4b99b83e10d3603c27388f50eb4d3840c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Windows QPA: Fix disabled color of menu items in dark modeFriedemann Kleint2020-02-181-3/+2
|/ / | | | | | | | | | | | | | | Replace green by the standard light color. Fixes: QTBUG-82197 Change-Id: I12477a055788cc7b6c829e315d5ae9f1577770bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix QWindow::startSystemResize() on WindowsFriedemann Kleint2020-02-171-1/+1
| | | | | | | | | | | | | | | | | | Flip broken check for Qt::MSWindowsFixedSizeDialogHint. Amends a611c632bb906cf77dd3af29ddd7b166f79ad1b0. Fixes: QTBUG-82191 Change-Id: Iada62271a2084d7482b634189f77e520dfcbe817 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | Android: fully integrate native file dialogAssam Boudjelthia2020-02-172-64/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Qt to use native file dialog to open (file, multiple files, directory) and save a file. Due to changes in file permission in Android 10, proper permissions tokens are granted after selecting a file or directory. [ChangeLog][Android] Use native file dialog by default for open and save operations. Task-number: QTBUG-82120 Fixes: QTBUG-75484 Change-Id: I92c9d08e0f214a57c4b3880fbd948adbabe39694 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: handle check permissions before any file operationsAssam Boudjelthia2020-02-171-7/+8
| | | | | | | | | | | | | | | | | | This is required because opening a Uri with no permissions can cause crashes. Some exceptions were not handled at all. Change-Id: I2e8f9505879b9fc4c1c47bdfa1bf173b39ada3ea Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Windows QPA: Add support to IsDialog UIA propertyAndre de la Rocha2020-02-132-1/+5
| | | | | | | | | | | | | | | | | | | | Adding support to the IsDialog property within the UI Automation code. This property allows dialog windows to be identified as such, which may be used by screen readers to better describe them. Fixes: QTBUG-82019 Change-Id: I6f5478dd30f63f152cba75886a9e0eb38772037a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QMacStyle - fix tab buttonsTimur Pocheptsov2020-02-131-0/+13
| | | | | | | | | | | | | | | | | | | | not to have arrows under some conditions. NSPopUpButton had a needed color, except it also has arrow(s). Which looks quite confusing on an inactive window on a tab button. Fixes: QTBUG-82122 Change-Id: I40c57abe9ccae48fa906d592169c412f5f89f712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | wasm: store and pass canvases as emscripten::valMorten Johan Sørvig2020-02-128-59/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store and pass canvases as emscripten::val instead of a QString containing the element id. This simplifies code which interacts with the canvas using the emscripten::val API, by removing the need to look up with getElementById. The Emscripten C event API does not accept emscripten::val, and using the element id is still needed here. emscripten::val does not provide a hash key suitable for use with QHash, but does provide an equality-compare in the form of val::equals(). Change the canvas->screen mapping code to use a QVector instead of a QHash. Change-Id: I1dbdbbc8fb06bb869031f1500e83ae2d64780a7f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-122-0/+5
|\| | | | | | | Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
| * Android: Fix native fileDialog not waiting for user selectionAssam Boudjelthia2020-02-102-0/+5
| | | | | | | | | | | | | | | | | | Add an event loop to wait for user file selection in native fileDialog Task-number: QTBUG-77214 Change-Id: I3d97d6c3f46cf2a8ed0ee6f98e555e8d62e12cc3 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QMacStyle: fix NSBox geometry for Aqua themeTimur Pocheptsov2020-02-081-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | Apparently vertical shift and increased height were not enough, more adjustment needed horizontally also: the default NSBox draws itself smaller in both dimensions and shifted from the origin we wanted. Thus we trick it to think it's drawing a bigger thing. It will draw a smaller one (again), but closer to what we need. Fixes: QTBUG-72365 Change-Id: Ib3a4c0b3eafb9f2f9d3b24bcbdd8335e73053622 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-02-062-1/+5
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-062-1/+5
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
| | * Android: Fix native open fileDialog crash on AndroidAssam Boudjelthia2020-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Unregister the ActivityResultListener() after the result is handled. Fixes: QTBUG-78912 Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * Fix AndroidAbstractFileEngineBogDan Vatra2020-02-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "" it's the root folder of the assets, setting m_fileName = "" will make AndroidAbstractFileEngine::setFileName to fail and it will not set the proper flags. Fixes: QTBUG-81535 Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Android: Allow requesting qtvirtualkeyboard with QT_IM_MODULEAssam Boudjelthia2020-02-062-2/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Allow Android apps to request qtvirtualkeyboard using environment variable QT_IM_MODULE. Similar to commit b46fe39d940712c5d401e731e171a7ccfadfe648 for Windows platform. Task-number: QTBUG-80357 Change-Id: I584859729e60f5d73943ca5840a9dcd169cc9ecb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | wasm: Specify event targets by CSS selectors; Support emsdk >= 1.39.5Morten Johan Sørvig2020-02-054-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is now on by default, which means that functions like emscripten_set_keydown_callback() now expects CSS selectors (e.g. "#canvas_id" instead of "canvas_id"). In addition, Module.canvas is no more. Add a deprecation warning in case someone is setting it and expects Qt to use it. (qtloader.js sets qtCanvasElements instead). This bumps the minimum supported emsdk version to 1.39.5. Fixes: QTBUG-74601 Change-Id: I8c46ce170143f969e6281824f78b1bb809c267ab Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-02-045-7/+8
|\ \