summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QTextMarkdownImporter: don't keep heading level on following list itemShawn Rutledge2019-05-244-49/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading a document like # heading - list item and then re-writing it, it turned into # heading - # list item because QTextCursor::insertList() simply calls QTextCursor::insertBlock(), thus inheriting block format from the previous block, without an opportunity to explicitly define the block format. So be more consistent: use QTextMarkdownImporter::insertBlock() for blocks inside list items too. Now it fully defines blockFormat first, then inserts the block, and then adds it to the current list only when the "paragraph" is actually the list item's text (but not when it's a continuation paragraph). Also, be prepared for applying and removing block markers to arbitrary blocks, just in case (they might be useful for block quotes, for example). Change-Id: I391820af9b65e75abce12abab45d2477c49c86ac Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Support clicking to toggle checkboxes in QTextEditShawn Rutledge2019-05-248-0/+96
| | | | | | | | | | | | | | | | | | | Add QAbstractTextDocumentLayout::markerAt(pos) for hit testing. (Qt Quick TextEdit needs it too.) Finds out whether the position corresponds to a marker on a paragraph. I.e. it finds checkboxes in GitHub-flavored markdown. This enables editor classes to toggle checkboxes by clicking them. Use it in QTextEdit to add the checkbox toggling feature. Also show the "pointing finger" cursor when hovering a toggleable checkbox. Change-Id: I036c967ab45e14c836272eac2cc7c7d652543c89 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix network build without feature.networkproxyTasuku Suzuki2019-05-271-0/+2
| | | | | | | | | | | | | | | | | | | Change-Id: I832db8e9e13b93d7613bdf890fa6c16be78b3b28 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Headers cleanup in mac styleTasuku Suzuki2019-05-122-135/+80
| | | | | | | | | | | Solve many duplication between _p_p.h and .cpp, sorted by module and header name, and move headers for each features at the end of includes. Change-Id: Ice9189c10d062bc473258b7ace279df057102167 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMessageLogContext: simplify constructionGiuseppe D'Angelo2019-05-221-10/+9
| | | | | | | | | | By using NSDMI. Change-Id: I171133b07ba2c7050e0d279caff0c393e03df182 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMessageLogContext: rename and improve copy()Giuseppe D'Angelo2019-05-272-20/+25
| | | | | | | | | | | | | | | | | | | | The "copy" name led me to mis-believe that it was a workaround to the class being non-copiable, and was missing copying a data member. This is instead deliberate; so rename the function to "copyContextFrom", documenting that version won't be copied. The function is still private API, so actually make it private; QMessageLogContext already befriended the only user. Finally, make it return *this (so that it can be chained, if necessary) and noexcept. Change-Id: I3deb3c8edc863a88ac0c37467b144ec2e20db5ca Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace QTESTLIB_USE_VALGRIND with a new feature 'valgrind'Tasuku Suzuki2019-05-287-20/+23
| | | | | | | | | | | | | | Change-Id: I851788cb1872eef86c75c7bdb2de361a0ff2af6c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* rtems: Add Q_OS_RTEMS macro to detect RTEMS OSMikhail Svetkin2019-05-281-0/+2
| | | | | | | | Change-Id: I45530cb7438a8f3ae8eac2e4be3c7d4472d9eec2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTextDocumentLayout: Avoid table border drawing artifactsNils Jeisecke2017-09-071-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As borders are always painted for single cells any rounding errors that occur when mapping from fixed point numbers to integers during raster painting will cause ugly drawing artifacts like extra pixels between cells or borders that overlap. To avoid this the following values are being rounded: - table offset - column positions and widths - row positions and cell heights For the column positions and widths the distribution constraints (total table width) are respected. Task-number: QTBUG-43589 Change-Id: I6308c113f8f9be3db8e9267629f26b5d65d2d7c7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Do not ignore exit codes of install commandsJoerg Bornemann2019-05-232-10/+10
| | | | | | | | | | | | | | | | | | | | | | | All calls to QINSTALL or QINSTALL_PROGRAM were written into Makefiles with a preceding dash which lets make ignore the command's exit code. Scripts (and users) calling 'make install' had no way to determine if an installation completely succeeded, unless they inspected make's output or the installation tree. Remove the leading dash from those commands to stop 'make install' on failure. Users who really want to ignore the exit codes can run 'make -k install'. [ChangeLog][qmake] Installation targets do not ignore the exit code of QINSTALL and QINSTALL_PROGRAM anymore. Fixes: QTBUG-18870 Change-Id: I7c072c896e6bd2b2ddba4b9c082c5bf627c90f50 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix gui build without feature.regularexpressionTasuku Suzuki2019-05-224-3/+28
| | | | | | | | | | | Change-Id: Id27fc81af8d2b0355b186540f41d75a9c8d7c7f3 Reviewed-by: David Faure <david.faure@kdab.com>
* Sequentialize install targets in debug_and_release buildsJoerg Bornemann2019-05-241-3/+36
| | | | | | | | | | | | | | | | | | | | | Debug/release install targets can potentially install the same files which leads to errors on install when running make with -j > 1. If build_all is set, make the 'install' dependent of the new target 'debug-release-install' which contains the commands of 'debug-install' and 'release-install'. Of course, debug/release is not hard-coded, but the content of the BUILDS variable is used. Change-Id: I67b504a95b83daf43bc89dcc0e3391b67e19c027 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix corelib build without feature.regularexpressionTasuku Suzuki2019-05-221-0/+6
| | | | | | | | | | | | | | | | | | | Change-Id: I208d6cb7f57a74873fae3a36fe094a92d287c2f0 Reviewed-by: David Faure <david.faure@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.13' into dev"Friedemann Kleint2019-05-2779-1547/+2484
|\
| * Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-2779-1547/+2484
| |\ | | | | | | | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| | * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Friedemann Kleint2019-05-2745-1418/+2243
| | |\
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-2745-1418/+2243
| | | |\ | | | | | | | | | | | | | | | Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
| | | | * Use appropriate encoding rather than UTF-8 when reading from a pipeEdward Welbourne2019-05-241-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qmake code to read output from dependency-generation was adding QByteArray values to a QString, thereby tacitly converting from UTF-8; this is misguided. Hopefully, the command emits its output in the same local 8-bit encoding that QString knows to convert from. Simplified needlessly verbose loops (that violated Qt coding style) in the process. Fixes: QTBUG-75904 Change-Id: I27cf81ffcb63ebc999b8e4fc57abdb9a68c4d2b3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| | | | * Doc: Clarify state of Qt XmlKai Koehne2019-05-242-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state of the module is done, not deprecated, so we shouldn't recommend users to move away from it in all cases. There's also no direct replacement for the DOM API. Fixes: QTBUG-70629 Change-Id: Ifaff9757234bd68a411a3da1403c57bbbcb94693 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | | | * QMenu size fix - Mark items dirty on screen changeThorbjørn Lund Martsum2019-05-223-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems like an optimization on the itemsDirty flag caused a bug to be re-introduced. When a popup is shown on a new screen, the itemsDirty must however be set to ensure that new correct sizes are calculated. Task-number: QTBUG-59794 Change-Id: Ifb5c233b1f9d4d38bd0cd7a9a71cc32ad3212f8c Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | | * Write an anchor-type attribute when embedding images in an ODF documentAndrew den Exter2019-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this some readers will fail to display the image or position the image at the start of a paragraph rather than inline. Change-Id: I2b9257e3193e5e68eb20112017a0c23be1d06cb0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Avoid re-encoding embedded images when writing an ODF fileAndrew den Exter2019-05-131-19/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an embedded image is already encodeded as an png or jpg write the data as is instead of decoding to a QImage and re-encoding as a new image. Change-Id: I479ae1fddbf59900a500497dd1bdf7449c21f273 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Avoid rounding of the size in QGraphicsPixmapItem::boundingRect()Alexander Volkov2019-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-75458 Change-Id: Ib240ddc0b490ae3c0348b6bfa290ad1f51b1e071 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * QHighDpi: Remove fromNativePixels()/toNativePixels() overloadsMorten Johan Sørvig2019-05-222-117/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace QWindow / QScreen / QPlatformScreen overloads with template functions that take a generic context argument. The API now no longer supports implicit conversions from QPointer<QWindow> to QWindow *, add explicit data() call to usage in qxcbdrag.cpp. Change-Id: I63d7f16f6356873280df58f4e7c924bf0b0eca5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * QCompleter: Fix completion on QFileSystemModelFriedemann Kleint2019-05-211-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the condition introduced by that determines whether a completion is started on signal QFileSystemModel::directoryLoaded() (introduced by 416ec00e7c859a844a5bcb24c7a31147aed974c / Qt 4). Observe case sensitivity and the native separator and return true for root directories. Task-number: QTBUG-38014 Task-number: QTBUG-14292 Change-Id: Ie425c04d2df256248e84250ba777793a8106a738 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * dockwidgets: Unbreak moving floating dock widgets with custom titlebarSergio Martins2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f1033567aa4 improved resize of windows with custom titlebar by adding more margin, but the check was too tight. d2d6c6f7813 tried to fix the regression, but not totally The mode is only set *after* the mouse press. It will always be NoWhere the first time, so that check will always discard the mouse press, making moving the window always fail the first time. Also, if the rect+range contains the press, then surely the mode won't be nowhere once set. There's still room for optimization, like bailing out early it was the right button instead of the left button, but that's out of scope for this bug fix, and also not worth for 5.12 branch. To reproduce the bug, simply: - Run examples/widgets/mainwindows/mainwindow - Click the red button of the blue dock widget, to make it float - Drag the title bar (not too slow). Fixes: QTBUG-66454 Change-Id: I0eebfb932dab95267ebadccd757de11a8bfe419d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Nathan Collins <nathan.collins@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | | * Update QMetaEnum::fromType()'s static assert's error messageEdward Welbourne2019-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaEnum fromType() also works for enums declared with Q_{ENUM,FLAG}_NS. This hadn't been added to the message when we added Q_{ENUM,FLAG}_NS. Fixes: QTBUG-75829 Change-Id: Ib71dae83dd8d837adf46b73cd299b8e61bdb1f64 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QPA: Prevent QPlatformWindow::initialGeometry() from returning invalid ↵Friedemann Kleint2019-05-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | geometries When trying to find the screen, the function would always try to determine the screen by checking parents, despite QWindowPrivate::positionAutomatic being false. Determine the screen from the initial geometry when QWindowPrivate::positionAutomatic is false. Bail out when positionAutomatic and resizeAutomatic are false. Fixes: QTBUG-75940 Change-Id: I3cd1b16feab16c89d29856cf3e1bccf2c89280c7 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | | * Blacklist tst_qwindow::spuriousMouseMove() on WindowsFriedemann Kleint2019-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is failing in 5.13 for unknown reasons. Task-number: QTBUG-72296 Task-number: QTBUG-72344 Change-Id: I24c1ad1b6def3096de99caeeebeee6e204cc75ca Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | | * QAndroidInputContext: Fix getTextBefore/AfterCursor() in mid. of preeditVova Mshanetskiy2019-05-081-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getTextBeforeCursor() and getTextAfterCursor() were not properly handling the case when the cursor is in the middle of preedit string (just as TODO comments inside these functions were saying). This was causing problems with Gboard when the user focuses a text editor by tapping in the middle of a word. Fixes: QTBUG-58063 Change-Id: I4a580a74d79965816557bfb342337975348d1c45 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * QAndroidInputContext: Fix most "Input method out of sync" warningsVova Mshanetskiy2019-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Android docs start == end in a call to setComposingRegion() means finish composing. But this case was not being handled properly: m_composingText was being assigned an empty string, but m_composingTextStart was being assigned the value of start, which is never -1. There is one other possible cause of "Input method out of sync" warnings, but it is tightly coupled with another bug, so it will be fixed by a separate commit. Change-Id: Ie475df84f330453ce4fc623e8b631b435d7d0042 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * Windows Accessibility: window should be focusableFrederik Gladhorn2019-05-211-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-75001 Change-Id: Iac67b9bba70317f8d28ac2d355d584417d1ffebf Reviewed-by: André de la Rocha <andre.rocha@qt.io>
| | | | * Emit QMenu::aboutToShow() before platform specific codeMassimiliano Gubinelli2019-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send the aboutToShow() signal to QMenu before synchronising the widgets for the menu items. This fixes a bug where if new QWidgetActions are added to the menu from a slot triggered by the menu's aboutToShow() signal, then such new actions do not shows up correctly on Mac. Other platforms are not affected by the change. Fixes: QTBUG-75826 Change-Id: Ic245d3fbc7ddde6944cca6cdb8e8951380c846ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * eglfs/openwfd: do not purge QSurfaceFormat fieldsLaszlo Agocs2019-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6c1d83624838362f6a3daa6c2b309fb518a25d4b Fixes: QTBUG-75673 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | | | * Windows Accessibility: Add UI Automation Window providerFrederik Gladhorn2019-05-206-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows closing, minimizing and maximizing the window. Fixes: QTBUG-74999 Change-Id: I8b3ad806a1767586c8cf7e5a1848fc0e525621cd Reviewed-by: André de la Rocha <andre.rocha@qt.io>
| | | | * Don't try to retranslate strings for native color dialogsTor Arne Vestbø2019-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the native color dialog is in use we haven't created any of the widgets and will crash when trying to update them. Change-Id: I6c43cc47359110c3b9db7cacb62581446cc6f7a3 Fixes: QTBUG-75858 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * macOS: Generate UTF-16 clipboard content without BOMTor Arne Vestbø2019-05-201-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt on macOS has traditionally not included a BOM in the UTF-16 data, but due to iOS requiring it it was changed in 4e196159. This had the unfortunate side effect of breaking macOS applications that were not prepared for the BOM, even if the public.utf16-plain-text UTI can have an optional BOM, most notably Microsoft Excel. It also resulted in the public.utf8-plain-text having a BOM, as that's automatically generated by macOS based on the UTF-16 content we give it. Having a BOM in UTF-8 is technically fine, but not required, and recommended against. The fact that iOS requires a BOM is a bit dubious, and most likely a result of applications or system frameworks decoding the data using NSUTF16StringEncoding, which assumes big-ending byte ordering if there is no BOM, as opposed to public.utf16-plain-text which assumes native byte ordering. Since we can't fix iOS our best bet is to include a BOM. For macOS though, we revert back to the old behavior of not including a BOM, since that seems to surprise macOS frameworks and applications the least, even if having a BOM in public.utf16-plain-text should be fully supported. Longer term we should look at what kind of UTIs we generate. Most apps on macOS do not generate public.utf16-plain-text, but instead generate public.utf16-external-plain-text, which differs from the former in that it assumes big-endian byte-ordering when there's no BOM. On iOS apps seem to generate public.utf8-plain-text, and do not generate any UTF-16 UTIs. Moving Qt over to these UTIs would fix the problem as well, but is a larger change that needs more research. Change-Id: I4769c8b7d09daef7e3012e99cacc3237f7b0fc1a Fixes: QTBUG-61562 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * tst_QMdiSubWindow::setSystemMenu(): Pass in High DPI/multi-screen setupsFriedemann Kleint2019-05-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window tends to grow to span screens in multi-screen setups; force it to be on the primary screen by showing it maximized in that case. Change-Id: I984ba7a4cd4abd1f862c59c8dca0e2275f44c724 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | | * Brush up tst_QMdiSubWindowFriedemann Kleint2019-05-201-170/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Use Qt 5 connection syntax where possible - Ensure top level widget list is empty after each test, delete left-over menu bars and disable menu animations Change-Id: Ieeb943ea669cd139f1835088b816802e777a9676 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * QHighDpi: Simplify top-level window handling codeMorten Johan Sørvig2019-05-142-40/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce origin(QWindow *), which returns the point around which coordinates should be scaled: the screen origin for top-level windows, and (0, 0) for child windows. The code paths for top-level and child windows can then be combined. Change-Id: I6b9cdbd9e7c2d9406e9137e325c4eb5c79e3ac9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * Windows QPA: Fix QWheelEvent::buttons() after click on title barAndre de la Rocha2019-05-185-15/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the left or right mouse buttons are pressed over the window title bar a WM_NCLBUTTONDOWN/WM_NCRBUTTONDOWN message is received. But when the button is released, no corresponding UP message is received, but only a WM_NCMOUSEMOVE or WM_MOUSEMOVE. This makes the internal mouse button state stored in QGuiApplication get out of sync with the actual state, resulting in an incorrect button state being used in QWheelEvent. This patch detects the button release condition and generates the missing release event. Change-Id: I6dd9f8580bd6ba772522574f9a08298e49c43e61 Fixes: QTBUG-75678 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * qtmain_winrt: Avoid nullptrs in str*cmp which cause crashesOliver Wolff2019-05-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When bringing an application back to foreground, args may contain NULL. These nullptrs should not cause application crashes. Fixes: QTBUG-75843 Change-Id: I642e3c359216e7706bcb13508399999a51a4fc2d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * Qt Widgets: Document CMake macrosKai Koehne2019-05-163-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-72159 Change-Id: Ib9fdf852583964cf07c4d26e0a6c74f0058e29f1 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | | | * Qt Core: Document CMake macrosKai Koehne2019-05-163-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document public macros in Qt5CoreMacros.cmake. This will replace the list in the current CMake Manual. Task-number: QTBUG-72159 Change-Id: I377412fe0c1d0a9b232162bbab88ac830d2cac80 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * Make tst_qwidget_window pass on High-DPI screens (Windows)Friedemann Kleint2019-05-161-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a fuzz check (cf 63090627220a6209652d236cf991305fbeb188b8) and a minimum size similar to tst_qwidget to make the test pass on large monitors with or without active scaling. Change-Id: I5a9e28e38e1d007057894c349c94f0e6fe12009c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * Brush up tst_QWidgetFriedemann Kleint2019-05-161-510/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Fix C-style casts - Fix redundant bool expressions - Fix else after return - Remove unnecessary casts to int from registered enums - Fix most signedness-related warnings - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Use Qt 5 connection syntax - Remove unused variables - Streamline code in some cases Change-Id: I1350b382b0b7d0f3198039fdc78892cfa1dd498d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * Brush up tst_QWindowFriedemann Kleint2019-05-151-94/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Fix C-style casts - Remove unnecessary casts to int from registered enums - Fix most signedness-related warnings - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Streamline code in some cases Change-Id: I4c9b99126cff02136def0e03accdf1129fe6d72b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | | * Brush up tst_QApplicationFriedemann Kleint2019-05-154-371/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Fix C-style casts - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Use Qt 5 connection syntax; use lambdas where applicable to remove helper slots - Streamline code in some cases - Replace helper function to convert touch points by the one in QWindowSystemInterfacePrivate - Use a logging category for the debug outpt, silencing some output Change-Id: Ia46c7ad7c08f3afc8e5869ea99b66e406de97781 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * | | wasm: fix QSGContext warning messageLorn Potter2019-05-211-2/+14
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When runing the scenegraph example sgengine, gets rid if this error: QSGContext::initialize: stencil buffer support missing, expect rendering errors Change-Id: I7f3a82409bc2cf81cf8217876e527f9c45be3bf4 Fixes: QTBUG-74694 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | wasm: fix empty body on POSTLorn Potter2019-05-221-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this also optimizes network post method handling Task-number: QTBUG-75660 Change-Id: Ibb0d01f2cc2b2bc7802598c4f6f04b04882c12ca Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>