summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Plugins: use reserve() to optimize memory allocationsAnton Kudryavtsev2016-10-215-0/+5
| | | | | | Change-Id: Id78ce43137e352292a9933222fe2f92d4ff4d69b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* quote regexpsOswald Buddenhagen2016-10-201-2/+2
| | | | | | | | | | | the parens aren't matched, so the syntax was bogus. amends 32a3413b13. Task-number: QTBUG-56580 Change-Id: Ic00ba50844b822c7e4524ae81fbb1bc112a158a9 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add Qt::ISODateWithMs date format, with support in QTime/Date/DateTimeTor Arne Vestbø2016-10-206-16/+44
| | | | | | | | | | The Qt::ISODate format strips milliseconds, so a new format is introduced that keeps the milliseconds. A new format was chosen over fixing the existing format due to the behavioral change of suddenly having ms as part of Qt::ISODate. Change-Id: If8b852daed068cce8eee9b61a7cd4576bc763443 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix link to qsslkey-p11 example in external-resourcesLeena Miettinen2016-10-191-1/+1
| | | | | | | Apparently, the example has been moved. Change-Id: If68e5db87321e8ff4af652a1cbbd0c3243acb515 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* make-expand cflags before passing them to $$system()Oswald Buddenhagen2016-10-191-1/+11
| | | | | | | | mac/sdk.prf puts some indirections into them. Task-number: QTBUG-56580 Change-Id: I8ffd2438309702466edd3ad5c51284c7cab4fda9 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Testlib: Move classes inheriting QBenchmarkMeasurerBase to separate headerFriedemann Kleint2016-10-195-37/+99
| | | | | | | | | | | QBenchmarkTimeMeasurer uses the 3rd party header cycle_p.h which may include windows.h on Windows (32bit). This can cause clashes in qmltest, which uses QBenchmarkMeasurerBase. Move the derived classes to a separate header to prevent this. Change-Id: I943a11c32a575594e6e79e722e8809b42de35092 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Plugins: optimize string usageAnton Kudryavtsev2016-10-188-18/+17
| | | | | | | | | | | | | Prefer QStringRef methods to avoid allocations. Use startsWith/endsWith rather than comparing substrings; and avoid substrings where references suffice. Use new QStringList::join(QL1S). Change-Id: I46c44aca96578633370006d613eb0ac13f7cfc03 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: optimize string usageAnton Kudryavtsev2016-10-181-14/+10
| | | | | | | | | | | Use QStringBuilder more. Avoid quadratic behavior when prepending zeros in a loop, prepend whole string intead. Use const API more for CoW types. Change-Id: If114107dc3d9876b9a7c77bc0071878cb6e00892 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonDocument: enable NRVO for gcc in toJson()Anton Kudryavtsev2016-10-181-3/+2
| | | | | | Change-Id: I1b639272d38f8463b17a85a406addb74bb572756 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonDocument: don't re-call QVariant::type() in if-else chainAnton Kudryavtsev2016-10-181-4/+11
| | | | | | | | Replace if-else chain with switch statement. Change-Id: Idd2d0198178685bdaf8f77fa6cae5025ea9de561 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimer: don't circumvent <chrono> safety netMarc Mutz2016-10-183-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By templating on the <chrono> types and unconditionally using duration_cast to coerce the duration into a milliseconds, we violate a principal design rule of <chrono>, namely that non- narrowing conversions are implicit, but narrowing conversions need duration_cast. By accepting any duration, we allow non- sensical code such as QTimer::singleShot(10us, ...) to compile, which is misleading, since it's actually a zero- timeout timer. Overloading a non-template with a template also has adverse effects: it breaks qOverload(). Fix by replacing the function templates with functions that just take std::chrono::milliseconds. This way, benign code such as QTimer::singleShot(10s, ...) QTimer::singleShot(10min, ...) QTimer::singleShot(1h, ...) work as expected, but attempts to use sub-millisecond resolution fails to compile / needs an explicit user- provided duration_cast. To allow future extension to more precise timers, forcibly inline the functions, so they don't partake in the ABI of the class and we can later support sub-millisecond resolution by simply taking micro- or nano- instead of milliseconds. Change-Id: I12c9a98bdabefcd8ec18a9eb09f87ad908d889de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* slightly improve logging of library probingOswald Buddenhagen2016-10-181-4/+7
| | | | | | Change-Id: Idd137251c6db5effd3571591d837d49e8fb9525d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* stop exporting the library versionsOswald Buddenhagen2016-10-183-28/+1
| | | | | | | | | | | | | | | | | | all users of this functionality have been removed, and not emitting the version info saves quite some noise from the generated files. the reason why the users have been removed is that it was unreliable in the first place: if a dependency is found without pkg-config, no version information would be available. the extraction of the version via pkg-config itself is kept in place, as configure tests could be potentially optimized by utilizing it. this reverts much of commit 48b4e0bf6f. Change-Id: I01917f3b2a56b747d7cc54955141d20d23d0990a Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* propagate the correct library variable to the private module priOswald Buddenhagen2016-10-181-1/+1
| | | | | | | | amends 310bf3f57. Change-Id: I6706e9435b7af558a3639d5824330d57430bb057 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Compile uic and qdbusxml2cpp more often against libbootstrapLars Knoll2016-10-183-3/+10
| | | | | | | | | Otherwise, those tools do not compile in configurations which exclude features that these tools require (e.g., -no-feature-textcodec). Change-Id: I9f27257221755a35a48ae2efa9df63f1a319118e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Windows: Fix rendering of MingLiU fonts at some scalesEskil Abrahamsen Blomfeldt2016-10-172-8/+24
| | | | | | | | | | | | | | | | | | | At certain sizes and scales, GDI will clip away the bottom line of pixels when rendering the MingLiU fonts. Since DirectWrite renders it correctly, we force the use of DirectWrite in this case. This also requires supporting classic GDI rendering in the DirectWrite engine, to make sure the rendering still looks correct. Note that this does not cover the corner case where the font is loaded directly from data with QRawFont. [ChangeLog][QtGui][Windows] Fixed rendering error when using the MingLiU fonts at certain combinations of pixel size and scale. Task-number: QTBUG-49346 Change-Id: Ie026c0d5932717858c4536dae077013eb6a1eafc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Disable WindowsContextHelpButtonHint for Dialogs that are not QWidgetKai Koehne2016-10-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not set WindowsContextHelpButtonHint directly in Windows QPA plugin, but instead rely on logic in QWidgetPrivate::adjustFlags for widgets. If WindowsContextHelpButtonHint is set, a '?' button is shown in the windows decoration. If pressed, an EnterWhatsThisMode event is generated that is consumed in QApplication that then calls into the QWhatsThis singleton, which changes the mouse cursor, and informs the top-level QWidgets about the state change etc. For QGuiApplications though the event is not generated, which makes the button useless by default. In addition, QWhatsThis only works with top level QWidgets, not e.g. QQuickWindows. So for apps using QApplication and QtQuick.Controls this means that the "What's this mode" is never exited. Given that the paradigm is somewhat outdated on the desktop it is unlikely that Qt Quick Controls will implement support for What's this. Anyhow, QWidgetPrivate::adjustFlags sets the hint for Qt::Dialogs, too, so there's no need to set it the Windows QPA plugin. [ChangeLog][Windows] 'What's this' button is now shown by default only for QWidget dialogs. Task-number: QTBUG-56239 Change-Id: I1ea3e92ade723b5865c8f2e19674413433658942 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMenu: don't force platform instance creation on constructionJ-P Nurmi2016-10-165-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a conflict between QGtk3Menu and QDbusPlatformMenuBar. The problem is that on Unity the type of the platform menu instance must be different depending on whether the menu is in the global menubar or a standalone context menu. Since QMenu creates a platform menu instance at construction time, it does not yet know whether it will be added into a menubar. QMenuBar checks that the QMenu already has a platform menu instance, and passes it to the platform menubar. As a result, a QGtk3Menu instance is passed to QDbusPlatformMenuBar. Currently, a standalone QMenu does not use the native platform menu instance. Only menus that are added to a QMenuBar do. Therefore we don't need to create the platform instance when QMenu is constructed, but only after it is added to QMenuBar. The platform menu instance creation is implemented in QMenuBarPrivate::getPlatformMenu(), and QMenu::setPlatformMenu() calls syncPlatformMenu() to take care of syncing the QMenu properties and actions to the new platform menu instance. The macOS-specific methods QMenu::toNSMenu() and QMenu::setAsDockMenu() rely on the platform menu instance, and must therefore create it on demand. This is a hot fix for the release blocker, not a long term solution. In the future, if standalone QMenus are made to use native platform menu instances, the instance must be created lazily when the menu is about to be made visible. Task-number: QTBUG-56526 Change-Id: I044933cabb1639406fe47908dfc4b1903af214d1 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* remove bogus qtConfig(simulator_and_device) conditionOswald Buddenhagen2016-10-161-1/+1
| | | | | | | xcode variable expansion should be done exactly when xcode is used. Change-Id: Icea8cb7bf9a51811052789bd66354b1b165127d6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* remove bogus xcode variable referenceOswald Buddenhagen2016-10-161-1/+1
| | | | | | | | | this is a vestige from an earlier version of the watchos introduction. amends 57378a108. Change-Id: I7d15149b94d12d84e041079b563175bd4e385d50 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* fix QMAKE_DEFAULT_*DIRS resolution with apple SDK, take 2Oswald Buddenhagen2016-10-166-53/+56
| | | | | | | | | | | | | | | | | | | | | | | | | the code got factored out to an own toolchain.prf file, which is load()ed from default_pre.prf, so no change at first. however, on mac, we shadow toolchain.prf, and make it load() sdk.prf first. a side effect, it has become harder to disable the use of an sdk altogether: putting CONFIG-=sdk into a project file or the qmake command line has no effect now. instead, it's possible to put it into .qmake.{conf,cache}. to make it simpler again, it's conceivable to finally add qmake -pre, which would allow setting variables before default_pre.prf is executed. take 2: there was nothing wrong with the original patch, but in 5.8, CONFIG+=simulator_and_device moved from qconfig.pri to various prf files that would do it according to the simulator_and_device configure feature, which would be way too late for the "pulled ahead" sdk.prf loading. as simulator_and_device is now gone entirely, it is safe to re-apply this patch (mostly) as-is. Task-number: QTBUG-56144 Change-Id: I6cf484982eaed8af39f7a539c60f5a087a299914 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Get rid of simulator_and_device CONFIG option (mostly)Oswald Buddenhagen2016-10-169-11/+10
| | | | | | | | | | | | | | | | A separate flag is no longer needed now that simulator and device builds are not exclusive any more (*) - both 'simulator' and 'device' being set at the same time is a sufficient indication (uikit/default_pre.prf sets this up according to the simulator_and_device feature and the QMAKE_MAC_SDK variable). (*) xcodebuild mode actually still uses exclusive builds, but this is activated locally in uikit/default_post.prf, and uikit/xcodebuild.prf implements the actual build passes manually anyway, so this change does not affect it. Change-Id: Idf173a7bfeb984498d3a49ed6b8d1a16da6c2089 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* limit ability to override QMAKE_MAC_SDKOswald Buddenhagen2016-10-161-8/+0
| | | | | | | | | | | project files may not override QMAKE_MAC_SDK any more, which seems to be no big loss. it is still possible to override the sdk on the configure command line (but note that this only ever worked for the target sdk). this simplification is preparation for subsequent changes. Change-Id: I3201629af132fa3938b13577854f3b19857a1b5a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix tvOS buildJake Petroules2016-10-162-2/+2
| | | | | Change-Id: I128605050b68787f8c9671f4aa8de0a1667301d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Explicitly mark old macros as compatibility synonymsJake Petroules2016-10-161-1/+1
| | | | | | Change-Id: Ia471fff171b3bc3de40e166e18f30e6782581611 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make self-contained test of condensed font matching and widthAllan Sandfeld Jensen2016-10-164-18/+57
| | | | | | | | | | | | Fixes the test for width of condensed fonts so it doesn't depend on the presence of the Liberation font on the system, and adds another test that condensed sub-families can be matched consistently. The latter will however not work on Windows until QTBUG-53458 is solved. Task-number: QTBUG-51335. Change-Id: Id6d046274fa21b2dce0ad6b32dce7f1c8a92a4f4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* make use of QT_REQUIRE_CONFIG() in platformsupport modulesOswald Buddenhagen2016-10-1512-29/+28
| | | | | Change-Id: I26fbe75c65c10d68454e64e306f7155367e66cf6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* rely on transitive library dependencies for freetype/fontconfigOswald Buddenhagen2016-10-1520-42/+5
| | | | | | | | | | | | | | so far, we have been delaying the linking, because we didn't want to make the monolithic platformsupport module pull in spurious dependencies. however, now that the module was split, there is no need to play such games any more. a nice effect of this is that the hideous qpa/*unixfontdatabase.prf files disappear, and finally freetype_dependency.pri also becomes trivial and is thus inlined. Change-Id: I255376d592625542310a31222eb6ac965943df99 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-15126-199/+269
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* create modularized version of qtplatformsupport moduleOswald Buddenhagen2016-10-1546-208/+463
| | | | | | | | | | lumping together all kinds of unrelated stuff has caused problems with spurious dependencies from the beginning. as the modularization infra is now in a state which supports many small private libraries just fine, take advantage of it. Change-Id: Ic40f47ce76a308bbfd32deae281f6f064fe1ef4c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* cleanup related to transitive dependenciesOswald Buddenhagen2016-10-157-17/+4
| | | | | | | | | | | | | | | | | | public uses of external libraries are automatically transitive now, so we can remove some parts which were only meant to pull in transitive dependencies manually. this is particularly good for includes() of parts of QtPlatformSupport, which actually redundantly pulled in the library's sources. this required making the freetype and fontconfig dependencies public, which is ok, as in the end, they are used only by platform plugins, so there is no point in making them private, as plugins are not linked against anyway (except statically, but there public vs. private doesn't apply anyway). Change-Id: Ia2a32f50dc0f8472285675a0903e6ecd142a03b2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* make users of qt modules inherit the modules' public QMAKE_USEOswald Buddenhagen2016-10-153-0/+6
| | | | | | | | | | | | | | | when a module makes an external dependency part of its api, the users of that module need to know the include paths (and possibly defines) of that dependency, and also need to link to it explicitly if they want to access symbols from it directly. this patch implements this via the usual qt module pri mechanism. limitation: the external library definitions are in the private pris, so technically a public module is not allowed to make its external dependencies public. we don't have (and don't anticipate) such a case. Change-Id: I2dbbdcfcfc1b200acae151a969976cd668e24f89 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* use helper libs via QMAKE_USEOswald Buddenhagen2016-10-1516-45/+49
| | | | | | | | | | | | | | | | | | | | for that, qt_help_lib.prf gains the ability to write "external module pri" files that contain suitable information for QMAKE_USE. these files have a bunch of limitations: - they are not installed, because a) they are not relocatable and b) the helper libs' headers are not installed, either - it won't work with qmake -r, which is ok, as qt5 does not build with qmake -r anyway - deps are not transitive, neither at build nor at use time the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted accordingly, and their uses replaced with QMAKE_USE instances. this also allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri files. freetype_dependency.pri remains due to its funkiness. Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* get rid of Q_FONTCONFIGDATABASE defineOswald Buddenhagen2016-10-152-3/+2
| | | | | | | | use fontconfig feature directly instead. easier to understand data flow, and less noisy compiler command lines. Change-Id: If80af4b08933049d553df685b41422d15e1e4f5c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add optimize-for-size case to ucstrncmpErik Verbruggen2016-10-141-1/+12
| | | | | | | | | | The SSE code had a case where tail-loop unrolling was disabled when optimizing for size. What would be even shorter, is to just do a straight-forward loop over the arrays and compare them. For anything else, we can just go for speed. Change-Id: Ifb31650e10e41409972a38014067dbd2927674c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix shadow builds with pre-synced headers, part 3Oswald Buddenhagen2016-10-142-3/+5
| | | | | | | | | | with the new configure system, all modules which have a configure.json also produce a private config header. the forwarding module pri needs to reflect that. Change-Id: If79e10a2643d55ad9aa9815f20297d36d9b9feec Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* don't include injected headers into linker version scriptOswald Buddenhagen2016-10-144-3/+8
| | | | | | | | | | | it makes no sense to version them, as they contain only #defines anyway. it also removes the need to special-case their location in shadow builds with pre-synced headers, which we actually failed to do anyway. Task-number: QTBUG-56286 Change-Id: I4ea717f7be56494cfea0572389bea173d7470b6e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* exclude injected headers from headersclean checkOswald Buddenhagen2016-10-141-3/+5
| | | | | | | it makes no sense to check them, as they contain only #defines anyway. Change-Id: I8b36139ee19471de0654c5eb3af262d0389a72f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* make setting OPENSSL_LIBS_{DEBUG,RELEASE} work with dynamic buildsOswald Buddenhagen2016-10-141-1/+8
| | | | | | | | | | | while it's probably not really necessary (which is why it wasn't implemented before), just ignoring the options is somewhat inconsistent and a deviation from historical behavior. Task-number: QTBUG-55530 Change-Id: I9441bf7be50ab5c997bb745e2525048ca23e4cd5 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix resolution of OPENSSL_LIBS in ssl.priKai Koehne2016-10-141-0/+2
| | | | | | Task-number: QTBUG-55530 Change-Id: Icc5ae9849e41479732eb44d01d9ea37aa3da16f8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* eglfs: clean up includes in the shared kms codeLaszlo Agocs2016-10-141-4/+1
| | | | | | | | Avoid unnecessary EGL and eglfs-specific includes in order to have a clearer view of the dependencies. Change-Id: Ifbd7dc4bd64024cc1ee48cd9f2607d1b5cdda1a2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Android: Re-enable asset extraction for stylingEskil Abrahamsen Blomfeldt2016-10-143-7/+7
| | | | | | | | | | | | | | When the new configure system was introduced, it accidentally disabled automatic extraction of style assets on Android. This patch puts it back in. Note that the style extraction is not specific to Qt Widgets, but rather Qt Gui, like other QPA options. Task-number: QTBUG-56328 Change-Id: Ica33c3562c6dd6483050075f5c8ed5d28cd621a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QPathClipper: remove homebrew 'qRemoveDuplicates' algorithmAnton Kudryavtsev2016-10-141-20/+1
| | | | | | | | Use std::unique Change-Id: Iae2e80d16b5a443ee5023224f48c325197c23029 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-1478-277/+276
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* winrt: Do not lose initial data for TCP connectionsOliver Wolff2016-10-142-9/+27
| | | | | | | | | | | | | | | | | When a client connects and sends data immediately it was possible that initial data was lost as the state was set too late. If the callback was called before the state was set the socket engine just discarded the data. So the state has to be set before the callback is registered. The new implementation needs a list of pending read operations. It can happen that the "readyRead" callback is triggered directly while "put_Completed" is called. The callback reassigns readOp which causes a "function not implemented" exception when it jumps back to the "put_Completed" call in "initialize" Task-number: QTBUG-55889 Change-Id: I5f52e3377b6176f1f90f227ac0bf52b60ee2d95a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* iOS: Take advantage of new synchronous API for QPA event deliveryTor Arne Vestbø2016-10-143-51/+43
| | | | | | | | | | | | | | | | | | By using the SynchronousDelivery specialization instead of flushing all window system events, we remove the risk of flushing an event that was added without our knowledge. For example, QGuiApplicationPrivate::processMouseEvent() used to prepend a mouse move event to the QPA queue, which is why we had a check for QWidgetWindow when flushing geometry changes. processMouseEvent no longer sends the move event via the QPA queue, so that's no longer an issue, but if it were to be reintroduced, we wouldn't need to check for QWidgetWindow, as we're not flushing all events anymore. Change-Id: Ib346ea9501cd88ddda6c2137981d3eb0922192a0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs: Fix deformed mouse cursor imageLaszlo Agocs2016-10-131-2/+4
| | | | | | | | | | | | In 5.8 cr got changed to QRect from QRectF. This is incorrect without adjusting the calculations based on it since QRect and QRectF's right() and bottom() differs by 1. Switch back to QRectF. Task-number: QTBUG-56478 Change-Id: I5bde4ee59ca9bbf62f65493c66f42707032bfc80 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* macOS: Remove workaround for including AppKit.h with slots definedTor Arne Vestbø2016-10-135-40/+25
| | | | | | | | | | The workaround doesn't seem to be needed anymore, and wasn't applied uniformly anyways. If it turns out AppKit still needs this workaround we should add CONFIG += no_keywords to cocoa.pro, instead of trying to wrap every single include of AppKit in a undef slots dance. Change-Id: Ia1b15137c03abcc92f0dd246796622772e99ca68 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Remove QNSView member m_window in favor of going via m_platformWindowTor Arne Vestbø2016-10-134-75/+82
| | | | | | | | | | | The two should never be out of sync, but by having them as separate members we risk that they do. By going though m_platformWindow for QWindow access, it's also more clear in the callsites that we're dealing with a QWindow instead of a NSWindow, as referenced though self.window. Finally, removing the member slims down memory use of a QNSView, however small. Change-Id: Iec96cebf813fae82d3af339331781419f234c28b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Use QPointer to track QNSView -> QCocoaWindowTor Arne Vestbø2016-10-133-15/+1
| | | | | Change-Id: I4de581dda03d25e781112eff34de28dfd1797a7f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>