summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use native support for fp16 where availableAllan Sandfeld Jensen2017-02-166-1/+95
| | | | | | | | | | Use F16C or ARM FP16 if available at compile time. Configure check added because older clang compilers have F16C defines and flags but not all the intrinsics. Change-Id: I71f358b8fd003e70ab8fcf35097414591e485112 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: De-duplicate vtables of exported private classesMarc Mutz2017-02-162-7/+19
| | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false-negative dynamic_cast and catch evaluation. Since the classes are already exported, users of these classes are unaffected by the change, and since it's private API, we don't need to avoid adding code to the out-of-line destructor until Qt 6. While at it, de-inline also the empty default implementations of virtual (non-dtor) functions. Task-number: QTBUG-45582 Change-Id: I3e6f37eab1dee0db445f6c13638a43ca3bf6ac62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindow: prevent window reparenting into Qt::Desktop windowsTor Arne Vestbø2017-02-152-15/+22
| | | | | | | | | | | | Qt::Desktop exists to support QDesktopWidget, which predates the QScreen API. QWidget internally has checks that prevents you from reparenting a QWidget into a QDesktopWidget, so we should have the same limitations on the QWindow level. This allows platform plugins to implement Qt::Desktop as simple (possibly shared) wrappers around QScreen without having to allocate native window resources for each desktop window. Change-Id: Ia1bac506febd3d827a6e0b8ad3bfd95be0cc7f9d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean up QStringLiteral definitionMarc Mutz2017-02-151-28/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We require lambda support in the compiler since Qt 5.7, so drop the guard macro. Apart from MSVC 2013, all our supported compiler also support char16_t: - VxWorks uses GCC 4.8, which supports char16_t since 4.5. - ICC supports char16_t since v12.1; we require v14+. - ONX uses a GCC which supports char16_t in the compiler, but is equipped with a stdlib that does not sport char16_t support, which is why we revoke its Q_C_UNICODE_STRINGS in qcompilerdetection.h. But we don't need stdlib support, we only need the core language feature. This is the only platform where this patch actually changes something. It removes the, rather unfair, pessimization of the platform which could have supported the static-storage- duration implementation of QStringLiteral instead of the fallback, which uses dynamic memory (QString::fromUtf8()). - GCC and Clang support char16_t since 4.5 and 3.0, resp., which is far below our minimum compiler requirements in effect since Qt 5.7. - On Windows, MSVC supports char16_t since 2015 only, and we still support 2013, but on Windows, wchar_t is the same size as char16_t, so instead of u"str" we can fall back to L"str". So simplify the implementation of QStringLiteral by assuming that all these feature are present, adding noexcept to the lambda to make noexcept() queries return true. This allows us to guarantee: [ChangeLog][QtCore] QStringLiteral is now guaranteed to be evaluated at compile-time. The last platform (QNX) to use the QString::fromUtf8() fallback has been ported to allocate the string data statically, too. Change-Id: I7920d7a77001e5c5550e7c7d57ceb7c51c9eb443 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make some atomic counters zero-basedMarc Mutz2017-02-159-21/+48
| | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString(Ref): make toLatin1()/toLocal8Bit() null handling consistentMarc Mutz2017-02-155-11/+209
| | | | | | | | | | | | | | | | | | | | | Systematic testing in tst_QStringApiSymmetry revealed a bug in QStringRef::toLatin1(): a null input did not result in a null output, but an empty one. This is fixed, for consistency with QString::toLatin1(), and QString(Ref)::toUtf8(), which behaved correctly already. The same bug was found in QString(Ref)::toLocal8Bit(), which is particularly hideous, as it's documented to fall back to toLatin1(), which preserves null inputs. Fixed, too. [ChangeLog][QtCore][QString] toLocal8Bit() now preserves nullness of the input QString (outputs null QByteArray). [ChangeLog][QtCore][QStringRef] toLocal8Bit() and toLatin1() now preserve nullness of the input QStringRef (output null QByteArrays). Change-Id: I7026211922c287e03d07e89edbad2987aa646e51 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Correct \since for QStorageInfo::subvolume()Thiago Macieira2017-02-151-1/+1
| | | | | | | | 3e9db01a2e4be5034d10d6eeafd65d0a8609615b entered dev after the 5.8 branch. Change-Id: I4139d5f93dcb4b429ae9fffd14a349e85e62a298 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Don't hide NSWindowZoomButton when window can go into fullscreenTor Arne Vestbø2017-02-151-1/+2
| | | | | | | | | | | | | | | The button in the title bar is used both for going into full screen and maximizing (zooming) the window. We can't hide/disable it unless both Qt::WindowFullscreenButtonHint and Qt::WindowMaximizeButtonHint are off. This means that when Qt::WindowMaximizeButtonHint is off, it's still going to be possible to Option-click the button to maximize the window, but this is less of a concern than hiding the full screen button when Qt::WindowFullscreenButtonHint is set. Change-Id: I70dbe27b3197fe22c1781277f8bf9a818d71d04d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix minor typos in apidocFrederik Schwarzer2017-02-152-2/+2
| | | | | Change-Id: I5ce9599a60ea336b469807df075e491f0e6df680 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* qpa: Let platform plugins report old state for window state changesTor Arne Vestbø2017-02-154-6/+11
| | | | | | | | | | The previous logic relied on QPlatformWindow::setWindowState() being synchronous and delivering the QPA event before returning to QWindow, in which case window->windowState() would still refer to the old state. Async platforms can now report the previous state correctly. Change-Id: Ib9148fe23fb62be55b7e3a0ccf63d32c71dc2ad3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Windows QPA: Use the native algorithm to find out the window's screenOlivier Goffart2017-02-153-4/+12
| | | | | | | | | QPlatformWindow::screenForGeometry uses the screen where the center of the window is, but native application use the one which intersects with the bigger area. It might not be the same. Change-Id: I831a5fcaea0e293e9f0f93ef5e562cce57fae2f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix http2 auto-testTimur Pocheptsov2017-02-151-1/+3
| | | | | | | | | | | | | | | After it started to fail (somehow it's only OpenSUSE 42.1) again and again and after a quick re-evaluation it appears the logic testing SETTINGS|ACK is incorrect. We (client side) start by sending the preface and then continue to send our request(s). The other side (server) starts from sending its SETTINGS frame. These settings must be ACKed, but apparently it can happen, that server receives a requests and sends a reply before it receives SETTINGS|ACK, resulting in replyFinished (replyFinishedWithError) signal and event loop stopping. As a result - QVERIFY(serverGotSettingsACK) fails. Task-number: QTBUG-58758 Change-Id: I8184cf459b2b88f70c646171e0115c184237fad1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix is_iec559 assert on GHS compilerKimmo Ollila2017-02-151-0/+13
| | | | | | | | | | | GHS compiler is not fully compliant with iec559. Therefore we need to replace is_iec559 assertion with separate checks to build quint16. Change-Id: I88c57e394b8d4e7899ee7d4a13cbfbac9436b2fc Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qlocale::macDefaultLocale - remove flaky/incorrect testTimur Pocheptsov2017-02-151-2/+0
| | | | | | | | | | | | | currencySymbol == "$" does not mean negative currency values will be formatted as "($value)". With all locales I have on my mac machines (10.11/10.12) the result is different from what this test expects. Also, the results are very different for different locales. Apparently, we never saw this problem before since in our CI "macs" we never have US Dollar/en_US selected in System Preferences. Task-number: QTBUG-58784 Change-Id: Ic2c3a3172bf1e715e99092ddee8f461b216d995a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QElfParser: Fix plural form in error messageFriedemann Kleint2017-02-151-4/+6
| | | | | | | | Amends change dcec1420ea9d7e90bbd7f37be15d8e61eaf35d23. Change-Id: I54c7db012d87a55c310141debac19118e7cb284a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-1442-340/+363
|\ | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * Blacklist tst_QWaitCondition::wakeOne() on WindowsMarc Mutz2017-02-141-0/+2
| | | | | | | | | | | | | | | | | | This test was determined to be flaky on the CI. Task-number: QTBUG-58741 Change-Id: I43196d3a27f726fb96b427f5071e726b571a0404 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * Replace gstrip by strip due to ELF corruptionJulien Gueytat2017-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is an old error of the gstrip binutils. The bug has been corrected and re-introduced. The command *elfdump -d xxx* on the ELF does bring lines like those : .SUNW_syminfo: invalid sh_info: 0 Task-number: QTBUG-58814 Change-Id: I330c4031dcf4ba64297df4b333b41cf0a003914f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Doc: Updated doc QSqlDatabaseNico Vertriest2017-02-131-28/+51
| | | | | | | | | | Change-Id: I914e9bdbf6137f0e3858a57b0f59fc550fc7e317 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Windows QPA: Include GL header depending on presence of dynamic GLFriedemann Kleint2017-02-131-1/+5
| | | | | | | | | | | | | | | | Amends change 7780ee9e5f20f80ab9e053058d0b6d92586cf876. Task-number: QTBUG-58178 Change-Id: I0b6e064dfdbdafb7fba9c20c56cfd873fa594c44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * announce 'temporaryfile' feature in bootstrap libraryOswald Buddenhagen2017-02-131-0/+1
| | | | | | | | | | | | | | | | qmldevtools refers to it. Task-number: QTBUG-58819 Change-Id: Id88265bb17e4d2e9c61f77409c4163eacc4a13f3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Add the new NVIDIA specific calls to qeglstreamconvenienceDominik Holland2017-02-132-0/+18
| | | | | | | | | | | | | | | | | | NVIDIA 370 introduced new calls needed to work with eglstreams in the wayland window system Task-number: QTBUG-58299 Change-Id: I606b143d3016f365b0d5ca4bc163b99289afbea1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix QLibrary::isLibrary on Apple platformsFilipe Azevedo2017-02-122-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper support for 'so' and 'bundle' suffixes. Qt wrongly assumes .so libraries are not versioned on Apple platforms, which is wrong. Also, the shared library .bundle which is what Apple recommends instead of .so, are also versioned (not to be confound with the different Core Foundation bundles, which are directory hierarchy). For more info, see http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm. Especially the part that reads: "Loadable modules, called bundles in Mac OS X, have the file type MH_BUNDLE. Most Unix-based software ports usually produce bundles with a .so extension, for the sake of consistency across platforms. Although Apple recommends giving bundles a .bundle extension, it isn't mandatory." Task-number: QTBUG-50446 Change-Id: Iacd5136397a12d65d83821434f332eb602550b4b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * moc: remember to quote the path to moc_predefs.hThiago Macieira2017-02-121-1/+1
| | | | | | | | | | | | Task-number: QTBUG-58764 Change-Id: I4baef2edf7624ad69d96fffd14a22209a2bb90be Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Update the __xxx__ macros due to MSVC and ICC not defining them allThiago Macieira2017-02-121-1/+31
| | | | | | | | | | | | | | | | And if __AES__ or __PCLMUL__ is defined, then we expect wmmintrin.h to exist. Change-Id: I445bb15619f6401494e8fffd149db77dc513e071 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Revert "Add tests for QCollatorSortKey"Thiago Macieira2017-02-122-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b0c1e07d648caf585d2be12cf3d18eb42b86f721. The unit tests it introduced trigger errors with the macOS and Win32 implementations, which means the there's something seriously wrong with either the API, our implementation or the tests. Revert for now until this gets fixed. Blacklisting was also the wrong tool to use. The tests should have used QEXPECT_FAIL. Change-Id: Ida20c6bbe0c019835a22464535029585e8e1e367 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add tests for QCollatorSortKeyMarc Mutz2017-02-112-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | There weren't any, at all. Testing on the CI showed that the implementation is broken on macOS, and, to a lesser extent, on Windows, so blacklist the failing tests until the implementation can be fixed. No need to hold back testing the other implementations. Task-number: QTBUG-58737 Change-Id: I9ae16ab778dbe2e95a6ca5e0bae00df4bad65cb2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Use QBasicMutex in qthread_win.cppThiago Macieira2017-02-111-2/+2
| | | | | | | | | | | | | | | | It's QtCore, so we're fine. Change-Id: Ifaee7464122d402991b6fffd14a0d7ad9c09e2f2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Improve QIODevice::peek() performance on buffered devicesAlex Trotsenko2017-02-093-45/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 5.7, QIODevice::peek() implementation is based on transaction mechanism. While technically it's correct, seeking backward on a buffered random-access device clears the internal buffer that affects the performance of reading. To solve the problem, this patch implements peek mode directly inside the reading procedure. Task-number: QTBUG-56032 Change-Id: Ic5269f76e44c491a0309e13aba87fa7cf7b9259f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Refactor QIODevice::read()Alex Trotsenko2017-02-092-36/+51
| | | | | | | | | | | | | | | | | | Move device-dependent part of the code into the private function for further reusing by peek() procedure. Task-number: QTBUG-56032 Change-Id: Iedceafe4b0bab109ca5c64ad274d779efe87c27b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * rename qvector.cpp => qvector.qdocOswald Buddenhagen2017-02-096-9/+2
| | | | | | | | | | | | | | | | | | | | the file contains no code. this avoids complaints from ar/ranlib in static/bootstrapped builds. Change-Id: Iee22ffc61a5f9ea8c25f5455b7e8e017ac521624 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * make libinput axis api feature depend on libinputOswald Buddenhagen2017-02-091-1/+1
| | | | | | | | | | | | | | amends b4085e56. Change-Id: Id18a7de6496e8e9164cb247426aba1293aa4ea2e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * refuse to build EGLFS on android, darwin, and windowsOswald Buddenhagen2017-02-091-2/+1
| | | | | | | | | | | | | | | | ... instead of merely defaulting it to off on android and windows. this reflects actual reality. Change-Id: I880254138bedd07124aa00096a06dd6e1803feb9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Blacklist tst_QElapsedTimer::elapsed() on WindowsMarc Mutz2017-02-091-0/+2
| | | | | | | | | | | | | | | | This test was determined to be flaky on the CI. Task-number: QTBUG-58713 Change-Id: Ie6e6a69b8ea625e3a3102c88d52f1f0fbec242aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge several Q_GLOBAL_STATICs in qresource.cpp into oneThiago Macieira2017-02-091-4/+18
| | | | | | | | | | | | | | | | | | Since they are all used in a typical application, this reduces the number of memory allocations (thus, the overhead) as well as the state-keeping in the libc atexit() functions. Change-Id: Ifaee7464122d402991b6fffd14a0e59457ad9cb7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Avoid unnecessary creation of some Q_GLOBAL_STATICThiago Macieira2017-02-092-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If these lists weren't created in the first place, then they are empty. We don't need to create it in order to conclude that. Unlike most Q_GLOBAL_STATICS, these are almost never used and yet they were always created due to where they were checked. Since we're calling exists() before, there are two consequences: first, since the list already exists, we're not allocating memory so it cannot throw std::bad_alloc when being accessed. Second, since we've just checked it exists, we can use QGlobalStatic's operator*(), which is slightly faster than operator()(). The weird &(*list) syntax is only to avoid changing the rest of the code that used a pointer Change-Id: Ifaee7464122d402991b6fffd14a0e44f533dc3d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Remove out of date comments related to Xorg and GCCJulien Gueytat2017-02-082-12/+0
| | | | | | | | | | | | Task-number: QTBUG-56293 Change-Id: I8d2245755d08b528e2041a16aabb390f3796e545 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Remove _XOPEN_SOURCE=500 -D__EXTENSIONS__Julien Gueytat2017-02-081-18/+1
| | | | | | | | | | | | | | | | | | | | | | The value _XOPEN_SOURCE=600 should be used for C99 as we compile at least with C++11. By doing so the compilation reaches another error in a third library. Simply removing the option makes the compilation working normally. Task-number: QTBUG-56293 Change-Id: Ie040325936591958d05cc0a2d43643fa5d0c43b5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Complete solaris.conf following linux.conf templateJulien Gueytat2017-02-081-0/+7
| | | | | | | | | | | | Task-number: QTBUG-56293 Change-Id: I9e0240b3d4766f5c740a044d6eff44d21b340dc0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Update Solaris include path and library pathJulien Gueytat2017-02-083-9/+6
| | | | | | | | | | | | | | | | The path match OpenIndiana distribution based on Illumos. Task-number: QTBUG-56293 Change-Id: I44e7defa63809dc4f413b46329481b53e5e74c30 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Move configuration into includesJulien Gueytat2017-02-083-105/+45
| | | | | | | | | | | | | | | | | | Use of gcc-base.conf, g++-base.conf files and creation of solaris.conf. The content of solaris.conf should follow the content of linux.conf. Task-number: QTBUG-56293 Change-Id: I59cf9efa82ab0a2b22ea1a58f6339280460e5f92 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * don't litter configure test build dirs with .qmake.cache filesOswald Buddenhagen2017-02-081-2/+3
| | | | | | | | | | | | | | | | there should be only one, at the level of the isolating .qmake.conf. Change-Id: I25f05864d6f5c1bb5caf2fb4138adb4bb9cc2f22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * make freetype & fontconfig dependencies private againOswald Buddenhagen2017-02-083-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exporting the freetype dependency caused qtwayland to break with -qt-freetype, as the helper libraries' module pri files are not installed (for good reasons) after f9a80e06a, no actual user of FontDatabaseSupport needs access to the transitive dependencies anyway (one of the headers has a fontconfig dependency, but it's not used outside the module itself), so hiding them again is just fine. this partially reverts ec774500f. Task-number: QTBUG-56666 Change-Id: I9e68a7e0725a92833b856c9ffdbec61c8aa5fed2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * move qfontengine_ft.* from gui to platformsupportOswald Buddenhagen2017-02-0810-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | that's where the files are actually used nowadays. also removes an obsolete (and bogus) gui export. Change-Id: I4551aad798acb6ce8c0abe43a2fcb8e5ac64a2d4 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QFormLayout: take the correct row in takeRow()Marc Mutz2017-02-082-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't even try to understand what the old code was trying to do; once you're told by a user that the code is wrong, you see that it is. Fixed by just using the row as passed to takeRow() instead of trying to do some storage-index calculations. The m_matrix indexing operator does it all for us. Added a test that checks that the expected field widget gets returned. Fixed expected test data that was wrong, and just checking that the implementation behaves as implemented, instead of as documented. Amends change 8fbae648db3bc51bafacfe1f88e40561d357e60a. [ChangeLog][QtWidget][QFormLayout] The functions takeRow() and removeRow(), new in 5.8.0, now take and remove the correct row. Task-number: QTBUG-58693 Task-number: QTBUG-15990 Change-Id: I7185ccbc6c03e2579741cad5c0c821d3ed165474 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows styles/wizard: Do not invoke winId() of desktop windowsFriedemann Kleint2017-02-132-13/+4
| | | | | | | | | | | | | | | | | | | | | | Call the Win32 API GetDesktopWindow() to obtain a HWND of the desktop instead of calling QApplicationPrivate::getHWNDForWidget() for desktop windows. This allows for lazily creating desktop platform windows. Observed in some tests where no window is visible. Change-Id: I97074f69606b3d74f3fbc90acb4a077d52eeb84d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Respect QWindow::screen() when computing QPlatformWindow::initialGeometry()Tor Arne Vestbø2017-02-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setScreen() on a QWindow doesn't move the window to that screen unless the new screen is a separate virtual desktop, as the window geometry is what determines the position of the window within each virtual desktop. But when mapping a QWindow that doesn't have a position explicitly set by the user, we try to resolve a reasonable position for it. In that case we should take the QWindow screen into account, as setting it to a non-primary screen is a good indication that the user wants the window to end up on that screen. If that's the case, it should override the logic of using the transient parent or the cursor position to choose which screen to place the window on. Change-Id: I591d872a93913173b20eb3da19aa63118fcf6b12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Don't create platform window for QWindows when calling setVisible(false)Tor Arne Vestbø2017-02-132-2/+16
| | | | | | | | | | | | | | We can defer the creation until the window is shown. Change-Id: I3d5b45ae59ee0925996cf12cd46dd574c8c6ef95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | qimage_conversions.cpp: keep shared copies of gray and alpha color tablesMarc Mutz2017-02-131-19/+20
| | | | | | | | | | | | | | | | | | | | Since QVector is implicitly shared, don't re-generate the same two color tables all over again, but create them once and keep them around in a Q_GLOBAL_STATIC. Change-Id: I9a8d32021d8cc327264f2818a23beaae67fe3ee8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | qmake/nmake: Prevent overlong lines in link and lib response filesJoerg Bornemann2017-02-132-7/+35
| | | | | | | | | | | | | | | | | | | | | | Linking with too many object files could lead to "LNK1170: line in command file contains 131071 or more characters". Do not write all .obj files into one line but respect a limit of 1000 characters. If the limit is reached the object files are separated by newlines instead of spaces. Task-number: QTBUG-58710 Change-Id: Ibae1f737d6b614a9624b4e00cdd21d3722d341e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>