summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Make size grip work with high dpi scalingPaul Olav Tvete2016-12-131-1/+1
| | | | | | Task-number: QTBUG-53389 Change-Id: I6e922f0555ae296f3152d4df2598534fa73fb584 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix for horizontal scrollbarsLambert Duijst2016-12-131-2/+2
| | | | | | | | Horizontal scrollbars scroll in the wrong direction when the app has a stylesheet and the LayoutDirection is RightToLeft. Change-Id: I860cb733709e8d59a7b844f2b6ed1ee63410956e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: added spec about parameter enableNico Vertriest2016-12-122-4/+4
| | | | | | | | Err: Undocumented parameter 'enable' in QNetworkProxyFactory::setUseSystemConfiguration() Err: no such parameter 'editable' in QComboBox::setCompleter() Change-Id: Ib27b93cf74e97efd656eda1265003f33c6802005 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QMap: use std::less for defining an order between pointersGiuseppe D'Angelo2016-12-122-8/+7
| | | | | | | | | | | | | Reinterpret_cast()ing a pointer to a suitably sized integer is not guaranteed to always give the same result for the same pointer (!). Therefore the resulting integers are not comparable in a meaningful way. std::less is supposed to be used to compare arbitrary pointers, so use it. (Hopefully and reasonably, under the hood std::less does exactly what we were doing, so this isn't BiC.) Change-Id: I9960b3d6e35657fe7a25b842054f5d338280e850 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compilation with -no-pchEskil Abrahamsen Blomfeldt2016-12-121-0/+1
| | | | | | | | Q_UNUSED(cursor) was failing to compile when configured with -no-pch. Change-Id: I1da3c95c1636ca06f38a97052ee4360232520a8b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Accept ZWNJ, ZWJ and PUA characters in input widgetsEskil Abrahamsen Blomfeldt2016-12-127-28/+180
| | | | | | | | | | | | | | | | | | | | Private Use Area characters are quite valid input characters when used in combination with a custom font. Joiners also serve an important language purpose in semitic writing systems. Note that there is a hack where we disregard any character produced using CTRL or CTRL+SHIFT specifically because of German keyboards. I have chosen to keep the hack in this patch to limit the change (though I have made an exception for ZWJ and ZWNJ since both are produced using Ctrl+Shift on Windows), but it will probably have to be reverted. [ChangeLog][QtWidgets][Input] Accept characters in Private Use Area, as well as zero-width joiners and zero-width non-joiners in input in QLineEdit and QTextEdit. Task-number: QTBUG-42074 Task-number: QTBUG-57003 Change-Id: I73f3b7d587a8670de24e902dc52a51f7721dba5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Plugins: use QStringBuilder moreAnton Kudryavtsev2016-12-124-16/+7
| | | | | | Change-Id: I6f026b81fdc403d99d37dfa22ea6a27a95ead347 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDir::cd(): Handle UNC server paths correctlyFriedemann Kleint2016-12-122-37/+39
| | | | | | | | | | | | | | | | Add a bool *ok out parameter to qt_normalizePathSegments() and return false when ".." are left over for an absolute path, indicating an attempt to change above root. Factor out static helper qt_cleanPath() to be able to pass the return value to QDir::cd() and return on failure from there. Amends change 63f634322b2c0f795bd424be9e51953a10c701de, which did not handle UNC paths. Task-number: QTBUG-53712 Change-Id: I3e63a5dd0259306a0b99145348d815899582f78e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDir::cleanPath(): Do not cd above root paths (UNC, WinRT)Friedemann Kleint2016-12-121-19/+36
| | | | | | | | | | | | | | | Calling QDir::cleanPath() on "//server/path/.." resulted in "/". Factor out a function to determine the root path part of an absolute path for later use, and handle some special cases: - Consider server name of "//server/path/.." as part of the prefix. - Check on the root path for WinRT. Task-number: QTBUG-53712 Change-Id: Ibddacf06212b6fc86fa74a5e4078df6cfd5b66f5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAndroidPlatformOpenGLContext: fix adopting of existing native contextsLaszlo Agocs2016-12-093-4/+9
| | | | | | | Change-Id: I854bbc511d89578c6a893015b21358f08ed8f5a6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Don't crash on QVLA construction from an empty std::initializer_listThiago Macieira2016-12-091-1/+2
| | | | | | | | | | | | | | | | | | | | | The C++ standard says in [support.initlist.access]/1: constexpr const E* begin() const noexcept; Returns: A pointer to the beginning of the array. If size() == 0 the values of begin() and end() are unspecified but they shall be identical. So we can't assume it's non-null. I didn't want to remove the Q_ASSERT, so passing a non-null pointer to append() remains required. This patch simply won't call append() if the initializer list is empty. This was already tested, but the failure is with a compiler that is not part of the Qt CI. Task-number: QTBUG-57277 Change-Id: Iaeecaffe26af4535b416fffd1489806872b412ee Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Cocoa: Unbreak app activation on macOS SierraMorten Johan Sørvig2016-12-082-10/+18
| | | | | | | | | | | | | | | | | | Previously, we would activate the application during QCocoaIntegration construction, which means at QApplication creation time. This now seems to interfere with application startup on macOS Sierra, where the application window ends up in an unfocused state. Move application activation to applicationDidFinishLaunching, at which point the Cocoa runtime should be completely initialized. Do this for 10.12+ only to avoid regressions/ test failures on previous versions. Change-Id: Ic5f150d53f06a302b53a3ba86a4a9b18bb2a1783 Task-number: QTBUG-57044 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Disable core dumps for selftests that are meant to be crashingTor Arne Vestbø2016-12-081-0/+17
| | | | | | Task-number: QTBUG-55155 Change-Id: I26a1461f35f916f3980fcb18cdddf3502e22fc90 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* UIKit: Improve handling of private system fonts / fallback fontsTor Arne Vestbø2016-12-082-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2bc7a40048 taught the CoreText font database to populate the families lazily, and in the process added a guard to ensure that we didn't populate internal fonts (prefixed with a '.'), as these fonts would then show up in font selection dialogs. Commit 909d3f5c7 then added support for private fonts, by making it possible to filter out any private fonts from font selection daialogs. But the guard was not removed, so we were still not populating these fonts. This guard has been removed, and the filtering function has been updated to include the conditions of the guard. Next, commit e5e93345c5 used [UIFont fontNamesForFamilyName:] to verify that each family that we registered with the font database would also have matching fonts when finally populated. This is not the right approach, as [UIFont fontNamesForFamilyName:] does not handle internal fonts. Instead we trust what CTFontDescriptorCreateMatchingFontDescriptors() gives us, but make sure to register the resulting font descriptors with the original/originating font family, instead of the one we pull out of the font descriptor. Finally, as of iOS 10, we can use CTFontManagerCopyAvailableFontFamilyNames instead of [UIFont familyNames], which gives us all of the internal font families like on macOS, instead of just the user-visible families. For earlier iOS versions we manually add '.PhoneFallback', as we know it will be available even if not listed in [UIFont familyNames]. The end result is that we register and populate families like '.PhoneFallback', which is critical to supporting more esoteric writing systems. The check in tst_QFont that styles for a given family is not empty has been removed, as we can't guarantee that on all platforms, which is also documented for QFontDatabase::styles(). Task-number: QTBUG-45746 Task-number: QTBUG-50624 Change-Id: I04674dcb2bb36b4cdf5646d540c35727ff3daaad Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* xcb: Adapt QXcbWindow::startSystemResize() for touch eventsAlexander Volkov2016-12-084-3/+60
| | | | | | | | | | | | | | | | | | Window managers typically grab the pointer after receiving the _NET_WM_MOVERESIZE event. But they fail to do it for touch sequences which have a receiver. So we should reject the touch sequence before sending _NET_WM_MOVERESIZE event. QSizeGrip calls startSystemResize() on MouseButtonPress event which is synthesized by Qt on TouchBegin. We can find the id of the touch point by comparing coordinates of the synthesized MouseButtonPress event with coordinates of all TouchBegin events. Then we use this id to reject the touch sequence (it's possible only after receiving XI_TouchUpdate). Change-Id: I26519840cd221e28b0be7854e4617c9aba4b0817 Task-number: QTBUG-51385 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix inconsistent alpha masking in qConvertARGB32PMToARGB64PM_sse2Allan Sandfeld Jensen2016-12-081-0/+4
| | | | | | | | The prolog and epilog did not force RGB32 to be converted to RGB64 with alpha fully defined like the middle optimized part. Change-Id: If7c4829f2239f9a3c524f78b9ce269e2b0b5b150 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* move license check to qmake-based configure systemOswald Buddenhagen2016-12-081-6/+0
| | | | | | | | | | | | | this also removes the need for passing pre-processed options via configure.cfg, so get rid of that. a somewhat unfortunate side effect is that the android-style-assets feature had to move back to the top level, as the licensing options depend on it. Started-by: Lars Knoll <lars.knoll@qt.io> Change-Id: Id4d1e0ba18b3e3104400293b8f0c7f2f65e68dea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qdrawhelper function toRGB64Allan Sandfeld Jensen2016-12-081-2/+2
| | | | | | | | | The function was incorrectly handling green and blue color channels causing them to be dropped. This affects drawing non 32-bit images onto 10-bit per color channels formats such as RGB30. Change-Id: I9211e253b1a9da0dada5c418d592a8f531265989 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* eglfs: Add missing overrideAlexander Volkov2016-12-071-1/+1
| | | | | Change-Id: I257cfb29b919de5d4876d39e0512815c6ed24a88 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge the two features for shared memoryUlf Hermann2016-12-061-6/+3
| | | | | Change-Id: Ic7bd27b289b755c801e3c510c44b2afe9a253bd8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Cleanup convert_ARGB_to_ARGB_PM_inplace_sse2Allan Sandfeld Jensen2016-12-061-22/+37
| | | | | | | | | | Changes it to follow standard SIMD patterns so it can use ALIGNMENT_PROLOGUE_16BYTES and SIMD_EPILOGUE helpers. Should also improve performance by using aligned memory access. Change-Id: I14a48b82e3f3de83bd7572aa82bed07f28ad944c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix crash when dragging a tab off QDockWidgetGroupWindowSergio Martins2016-12-061-1/+3
| | | | | | | Crashes later in QMainWindowLayout::hover() Change-Id: Ibf1085ebfa7b0edcbd1662b0300550788b7f9c33 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix using 0 as null pointerJesus Fernandez2016-12-063-4/+4
| | | | | | | Fixes: error: zero as null pointer constant. Change-Id: I850d51075263dac6dd135d3cadc136cbd08b40ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTest::addColumn: Use nullptr instead of 0Kevin Funk2016-12-061-1/+1
| | | | | | | | Fixes -Wzero-as-null-pointer-constant warning in user code Change-Id: I59492633d14947e90e91efa7c4fcd14c33fa413e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix blending of RGB32 on RGB32 with partial opacityAllan Sandfeld Jensen2016-12-034-26/+25
| | | | | | | | | | | | | The alpha channel of an RGB32 image was not properly ignored when doing blending with partial opacity. Now the alpha value is properly ignored, which is both more correct and faster. This also makes SSE2 and AVX2 implementations match NEON which was already doing the right thing (though had dead code for doing it wrong). Change-Id: I4613b8d70ed8c2e36ced10baaa7a4a55bd36a940 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add ASTC compressionBogDan Vatra2016-12-032-0/+198
| | | | | Change-Id: I7ae3b02579eb844f109c25a0dd5467748813a558 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs: allow forcing an overlay planeLaszlo Agocs2016-12-035-28/+89
| | | | | | | | | | | | | Add a QT_QPA_EGLFS_KMS_PLANE_INDEX environment variable that applies both to the GBM and EGLDevice backends. When set to a value between 0 and the number of planes on the connector - 1, the chosen overlay plane will be used for output, meaning there will be a drmModeSetPlane to configure, and, in case of EGLDevice, the plane's corresponding EGL layer will get chosen instead of the CRTC's. Task-number: QTBUG-57386 Change-Id: I12c89472ea5730987052f39211fadc597d1302ef Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* eglfs: allow forcing an explicit connector index on DRM/KMSLaszlo Agocs2016-12-031-0/+13
| | | | | | | | | | | | | Add a QT_QPA_EGLFS_KMS_CONNECTOR_INDEX environment variable that applies both to the GBM and EGLDevice backends. Instead of specifying all uninteresting outputs as "off" in the config file in QT_QPA_EGLFS_KMS_CONFIG, this variable provides a shortcut to force one single connector and ignore all others in embedded systems with a fixed connector configuration. The index must be between 0 and DRM connector count - 1. Task-number: QTBUG-57386 Change-Id: I3f9562f48bf6b2ffaf9a0cc232e09a7e0c15645b Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* eglfs: improve EGLStream loggingLaszlo Agocs2016-12-031-1/+3
| | | | | | | | Make it possible to identify from the logs that QT_QPA_EGLFS_LAYER_INDEX was set, in order to help troubleshooting. Change-Id: Ic22825e5df9f0eeb31f817f398b9f6c000c3a00f Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* Add EGL_STREAM_FIFO_LENGTH to the helper headerLaszlo Agocs2016-12-031-0/+4
| | | | | | | | | | Parent patch introducing usage of this attribute did not add it to the EGLStream support header. This is likely not fatal, but follow the practice of defining the constants ourselves, in case they are not present. Change-Id: Ib16f9809f9c6a212570c49472bb840183232e68a Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* dbustray: Handle StatusNotifierWatcher appearing and disappearingDmitry Shachnev2016-12-024-3/+20
| | | | | | | | | | | | | If the StatusNotifierWatcher disappears and then appears again, we need to register our tray icon again with it. To do this, split the “register with watcher” part into a separate method, and call it when m_dbusWatcher emits its serviceRegistered() signal. Change-Id: Id5fc8ac81b5038a61b678514dabd3eb9c8f1c106 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* eglfs: make it possible to configure the EGLStream FIFO lengthLaszlo Agocs2016-12-011-3/+20
| | | | | | | | | | | | | | Setting QT_QPA_EGLFS_STREAM_FIFO_LENGTH to a >= 1 value changes from mailbox to FIFO mode, with the specified length. [ChangeLog][Platform Specific Changes][Linux] Added an option to switch from mailbox to FIFO mode in eglfs' EGLStream backend. This is done by setting the environment variable QT_QPA_EGLFS_STREAM_FIFO_LENGTH to a >= 1 value, the desired length of the FIFO queue. Change-Id: Ib98e2ff805f8c00ca2e224d1db5b9c1b2c9a04f0 Done-with: Pasi Petajajarvi <pasi.petajajarvi@theqtcompany.com> Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* QVariant: optimize convert() for bool caseAnton Kudryavtsev2016-12-011-2/+2
| | | | | | | | | | | | Do not create QByteArray from const char* to compare with other QByteArray, because there is an overloaded operator==. So avoid needless allocations. Reorder condition, because isEmpty() method is cheaper than string compare. Change-Id: I8d2c8a0fb247528d9ce485007431167372d62bff Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* xcb: Remove unused QXcbGlIntegrationFactory::keys()Alexander Volkov2016-12-012-24/+0
| | | | | | | | | This static method was introduced in 8758f532ae6209bcf9447e27edc4fd412c0f173d and was unused even then. Change-Id: Id0d409b7fade977bbbabfcdee0c432b7058f8ace Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0123-173/+173
| | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual' keywords. Change-Id: Ia40be0e1e60e51f9d043ab575fd6b9305ea620b0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add missing override into Qt modulesAlexander Volkov2016-12-019-44/+44
| | | | | Change-Id: I014ac8c7b590c77b054fbb01f0ab5601c44ca88e Reviewed-by: hjk <hjk@qt.io>
* QtTest: Add missing overrideAlexander Volkov2016-12-0110-71/+71
| | | | | Change-Id: Ibb924f11b82577fb67aa7a1a30b81f4d8d7d36fc Reviewed-by: hjk <hjk@qt.io>
* Add -Wdouble-promotion to headerscleanJesus Fernandez2016-11-302-22/+25
| | | | | | | | | Fixes: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion] Task-number: QTBUG-57068 Change-Id: I897a341aca83873bc6abd256a82a3b9f09409833 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix QVariant::TypeJesus Fernandez2016-11-301-1/+1
| | | | | | | | | QVariant::QString does not exist Task-number: QTBUG-56586 Change-Id: Ic5fe81fc4fc3553f9b755e067ed73c4d1bba9add Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Close popups when blocked by modal dialogPaul Olav Tvete2016-11-303-1/+3
| | | | | | | | Don't block the event that Qt depends on to close popups. Task-number: QTBUG-57292 Change-Id: Ida1f928b81868f68a7b1e19cd0b83485d2a7232e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* winrt: Add missing overrideAlexander Volkov2016-11-3012-43/+43
| | | | | Change-Id: I2f257756bc606f8eb5cad2afe67b90810a2e394c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-11-3011-80/+80
| | | | | | | We can use 'override' keyword directly since Qt 5.7. Change-Id: I31127478a0a96798a4e018d9996842204e307552 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QCommandLineOption: Remove excess close parenthesis from a warningTopi Reinio2016-11-301-1/+1
| | | | | | Change-Id: Iff197a2a00b686ad2d29a1e156389bec4639f3c0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use poll related features properlyLars Knoll2016-11-302-10/+7
| | | | | | | And get rid of related DEFINES in the pri file Change-Id: I54cf25b7cb447af22b410213759044e8018939a6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* winrt: Check for removed timers after sending eventsOliver Wolff2016-11-301-4/+7
| | | | | | | | | | | | | | | | After all the check makes sense here. If a timer was removed as a result of sendEvent and it was not at the end of the list the list is not shrunk but the timer info's id is just set to INVALID_TIMER_ID. Additionally the timer's object should be fetched before we unlock the locker as timerIdToObject is changed in removeTimer and we might access a nullptr if the timer has been removed. Reverts c83ba01f7bc542368973f3f24dfb59c6052dd78a Task-number: QTBUG-56756 Change-Id: Ib1a04c02fbfcf4c939b4891d42f954dc9e87149e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QListViewItem: add constexprMarc Mutz2016-11-301-11/+11
| | | | | | | | | | | | | | | | This class is just a record with a bit of functionality on it. To prevent pessimizing it compared to a C struct with the same contents, mark all operations constexpr and remove the point- less copy ctor (the generated one is just fine). Converge on passing QRect, QSize, QPoint by value. Was mixed cref and value passing before. Saves ~1KiB each in text and data size on an UBSan build, somewhat less, of course, on a normal one. Change-Id: Ibae16792d822ff183a0c542380501978f2108d93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix clipping of fetchTransformedAllan Sandfeld Jensen2016-11-291-24/+36
| | | | | | | | | Bound x and y to the clipping rect instead of the texture rect. This has minor effects on lancelot, but all within the 5% fuzz. Change-Id: Ia6141e4f7649dad53211bd959af1bce48372e26d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QNX: Add missing overrideAlexander Volkov2016-11-2919-97/+97
| | | | | | Change-Id: Idb6216a645f7c9791674d16665331a63da46b132 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* QtConcurrent: Add missing overrideAlexander Volkov2016-11-296-106/+106
| | | | | Change-Id: Ib8064a3c7bae68885b1adb78a55c69f7697e10db Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Clean up style selection codeLars Knoll2016-11-2927-126/+115
| | | | | | | | Turn styles into proper features and test for them using qtConfig/QT_CONFIG. Change-Id: I7e28785a46723364b90d8aa286f4d6e5ab085651 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>