summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Include moc of qnamespace.h in qobject.cppThiago Macieira2017-04-291-0/+1
| | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8bd4b39b00840 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Initialize vao variableJesus Fernandez2017-04-281-0/+2
| | | | | | | | | If vaoHelper is not valid the vao variable was being initializated with a random value. Change-Id: I44962841baeb1a1cff3124d6126e19c791feaea3 Coverity-Id: 171484 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Fix references to QIconEngineV2 and QIconEnginePluginV2Aaron Linville2017-04-281-3/+3
| | | | | | | | Fix a few lingering doc references to the old classes. Task-number: QTBUG-59815 Change-Id: Ia6b406485260c943b018422aaeb8e22ca4406e81 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* do not wrap QAbstractEventDispatcher::flush with QT_DEPRECATED_SINCEGatis Paeglis2017-04-281-3/+1
| | | | | | | | | | | | | | | | | | | ... as this would require us to remove usage of QAbstractEventDispatcher::flush from Qt source code as well. We can not do this already in Qt 5.9 as there are few event dispatchers in Qt that actually do override the ::flush (with non empty bodies). Removing this code could result in behavior changes (not very likely) for some user code. This method will be removed in Qt6. Instead mark it with a well known "### Qt{Version}" comment. This patch amends 41eefd7. The warning was: qcoreapplication.cpp: In static member function ‘static void QCoreApplication::flush()’: qcoreapplication.cpp:733:48: warning: ‘virtual void QAbstractEventDispatcher::flush()’ is deprecated [-Wdeprecated-declarations] self->d_func()->eventDispatcher->flush(); Change-Id: I48a1c68b84ff93268956205e1205e6d4b5d48664 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Export QPlatformThemeFactory, for use in qtdiagThiago Macieira2017-04-281-1/+1
| | | | | Change-Id: I0e1a09998253489388abfffd14b5ee5392b0ce52 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix build without features.networkproxyTasuku Suzuki2017-04-282-3/+10
| | | | | | Change-Id: Ie0868b2d2ec30513e870861514b252a79dff4998 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* wrap QCoreApplication::flush with QT_DEPRECATED_SINCEGatis Paeglis2017-04-281-0/+2
| | | | | | | | | ... in cpp file as well. This patch amends 41eefd7. Change-Id: Id6a4dfd3a93a600fe3bb84bb74379451ad167aa8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix build without features.style-stylesheetTasuku Suzuki2017-04-281-1/+1
| | | | | | Change-Id: Ib7cf5db6c9a49e7f359410bc0ec3d1ceadcde5cf Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix return of empty paths with multiple points on intersectionsAllan Sandfeld Jensen2017-04-281-1/+6
| | | | | | | | | | The intersection algorithm for intersection with rects, might return one edge of the rect even if that edge does not intersect with the path. To deal with that we collapse paths with empty bounding rects to the empty path. Task-number: QTBUG-60024 Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update detection of $DESKTOP_SESSIONThiago Macieira2017-04-272-7/+29
| | | | | | | | | | | | | I don't know how widespread this use is, but apparently sddm seems to set DESKTOP_SESSION to be the .desktop file that it used to launch the session (minus the .desktop extension). In that case, we should read the DesktopName entry from the file to get the actual desktop type. And since the desktop detection from QGenericUnixServices should suffice, we don't need to repeat the same code in QGenericUnixThemes. Change-Id: I0e1a09998253489388abfffd14b5eeefbd7fe740 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix build without features.shortcutTasuku Suzuki2017-04-276-2/+18
| | | | | | Change-Id: I87a7ba1a77b0671559616a3ea4722bcc233af32d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* QSysInfo: Make use of the QT_WARNING_DISABLE_DEPRECATED macroThiago Macieira2017-04-271-5/+1
| | | | | | | We have it for a reason. Change-Id: I84e363d735b443cb9beefffd14b8f355aeb8a31c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* winrt: Use list initialization for KeyInfo's membersOliver Wolff2017-04-271-12/+2
| | | | | Change-Id: Idd05d1e1332efd9afc9816a48437fee377730735 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Fix text value for key release eventsOliver Wolff2017-04-271-1/+2
| | | | | | | The text member was never filled and thus was not set in onKeyUp. Change-Id: I0d0094745c385e0942635da643d863868b010c2a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Remove wrong parameter from handleExtendedKeyEvent callOliver Wolff2017-04-271-12/+4
| | | | | | | | | | | | | | The event's count parameter is used to determine the number of keys involved in the key event, not the repeat count of the key press. The desktop windows implementation does not pass the "count" parameter, so we omit it as well. The tryShortcutOverride parameter is only used on macOS and thus can be omitted as well. Change-Id: Id7554e43cc73ec616f68444e82a38418e622e20a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QOpenGLWidget: Fix UB (invalid cast) in ~QOpenGLWidgetPrivateDyami Caliri2017-04-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QOpenGLWidgetPrivate destructor calls reset(), which accesses the Q-pointer. Calling Q_Q(Class) while still inside the private class's destructor is wrong due to the cast in q_func() which is undefined behavior at that stage. Here is the UB report: qopenglwidget.cpp:548:5: runtime error: downcast of address 0x000016d0e200 which does not point to an object of type 'QOpenGLWidget' 0x000016d0e200: note: object is of type 'QObject' 00 00 00 00 10 30 32 0f 00 00 00 00 40 e2 d0 16 00 00 00 00 80 7b 42 0f 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' 0 QOpenGLWidgetPrivate::reset qopenglwidget.cpp 656 0x607e667 1 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 570 0x60982ab 2 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 569 0x6098516 3 QScopedPointerDeleter<QObjectData>::cleanup qscopedpointer.h 54 0xcbf7058 4 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer qscopedpointer.h 101 0xcbde858 5 QObject::~QObject qobject.cpp 1042 0xcb94792 6 QWidget::~QWidget qwidget.cpp 1701 0x5e173f7 7 QOpenGLWidget::~QOpenGLWidget qopenglwidget.cpp 946 0x608d72b 8 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58237b6 9 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58238c6 Change-Id: If13932ac657afb9d1358ac82ab911a05e96cfbcd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QMenu: Display the menu title on the torn-off menu's title barGabriel de Dietrich2017-04-261-1/+15
| | | | | | Change-Id: If16e262a6c8b39dff517cc105cf55686d4c22582 Task-number: QTBUG-11693 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QXcbConnection::xi2ReportTabletEvent: use fixed1616ToRealShawn Rutledge2017-04-261-5/+3
| | | | | | | | | This should not change the result since fixed1616ToReal also divides by 65536. It's just to make it consistent with the other places that we use fixed1616ToReal. Change-Id: I96b3a07d1cbc98d7bdbe7a3b6035b196e34a5abc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix unused private fields in dbusmenu and dbustrayThiago Macieira2017-04-263-7/+3
| | | | | | | | | qdbusplatformmenu_p.h:131:9: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] qdbusplatformmenu_p.h:192:10: error: private field 'm_isSeparator' is not used [-Werror,-Wunused-private-field] etc. Change-Id: I84e363d735b443cb9beefffd14b8bc4253081145 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix warnings about unused private fields we can't removeThiago Macieira2017-04-261-0/+1
| | | | | | | | | | These are in public classes, so we can't remove them until we get to Qt 6. qtimer.h:231:20: warning: private field 'del' is not used [-Wunused-private-field] Change-Id: I84e363d735b443cb9beefffd14b8b5fb720c9e41 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix Clang build: it does not have __attribute__((optimize(x)))Thiago Macieira2017-04-261-1/+1
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8b5f3885b84d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix ICC build with Q_FALLTHROUGHThiago Macieira2017-04-261-1/+1
| | | | | | | | ICC 17 does not yet implement C++17 [[fallthrough]] nor does it support GCC's __attribute__((fallthrough)) Change-Id: I84e363d735b443cb9beefffd14b8aba60a7e3f81 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSslSocket (SecureTransport) - use anchors only from QSslConfigurationTimur Pocheptsov2017-04-261-1/+2
| | | | | | | | | | | | | | Calling SecTrustSetAnchorCertificatesOnly(trust, false) we actually extend what our user provided in QSslConfiguration as CA certificates (caCertificates, setCaCertificates) - Secure Transport will also use a default set provided by the system and SSL handshake can surprisingly (for a user) succeed. And the default content of these caCertificates, if not altered by setCaCertificates call - are those system CA certificates. Task-number: QTBUG-60233 Change-Id: I8c1094bb7eec260f5202a47085f9f75e720eda7b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix warning for -no-feature-evdevTasuku Suzuki2017-04-262-4/+6
| | | | | Change-Id: I95af276a6d21e67a980cce1d8c6e41900ece7f31 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Android: add logging to QtCore JNI_OnLoadVyacheslav Koscheev2017-04-261-0/+12
| | | | | Change-Id: I15609d14ac39f89bcba72df33d33a25ac23ad516 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Check for qApp before using it in ibus pluginUlf Hermann2017-04-251-0/+3
| | | | | | | | | | We might call updatePreeditText from the QCoreApplication dtor by running an event loop from inside a "post routine" added with qAddPostRoutine(). Task-number: QTBUG-60000 Change-Id: I04c08fe36bfa63ac345a06e50952d2ec83a78ac0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix warning for -no-feature-multiprocessTasuku Suzuki2017-04-251-0/+2
| | | | | | Change-Id: Ifa3382098c8f7c2cb1750b7ac5e583ddd71895e2 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-cursorTasuku Suzuki2017-04-251-0/+4
| | | | | | Change-Id: I58a2bd715ff1767571d076a881872bd5eab2caec Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warnings for -no-feature-animationStephan Binner2017-04-252-4/+8
| | | | | Change-Id: I624e68e96d2a673b36d9519d1189fe4a25e1fbd0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* xcb: include keyboard modifiers with every touch eventShawn Rutledge2017-04-251-1/+2
| | | | | | Task-number: QTBUG-60389 Change-Id: I9bf77dffc39b82993bc66c7c7c26e3fa9778534e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Don't use eglGetProcAddress() on AndroidPaul Olav Tvete2017-04-251-0/+568
| | | | | | | | | | | | Android 4.1 has a limitation on how many slots are available for eglGetProcAddress(). This reverts commit 7e393280e4d073930f5dd45881b68f4afbcab84e ("OpenGLES20 direct function call removed") for the Android platform only. Task-number: QTBUG-60318 Change-Id: I4a7224583e775143021735c037af07a95abbd6bf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use gdbserver command from a safe placeBogDan Vatra2017-04-251-42/+11
| | | | | | | | Removed support for old QtCreator versions (pre 3.5) Change-Id: I5ec0e965c09c8a76810144b133af3395e32fddfa Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QUrl: fix IDN conversion when the ACE form is invalidThiago Macieira2017-04-251-9/+36
| | | | | | | | | | | | | | | | We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QT_ASCII_CAST_WARN more informativeTor Arne Vestbø2017-04-241-1/+1
| | | | | Change-Id: I4b9aad9cc2f2605a01635c2760e76fde7023f92f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: fix IDN whitelist checking when the TLD is in UnicodeThiago Macieira2017-04-241-2/+2
| | | | | | | | | | The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
* Prevent busy loop in glib event dispatcherGatis Paeglis2017-04-244-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | .. when running event loop with QEventLoop::ExcludeUserInputEvents. In a properly functioning code, g_main_context_iteration is expected to block until any event source becomes ready to dispatch an event (or interrupt occurs). Qt provides several custom event sources to the Glib event loop. The bug (busy loop) was caused by faulty event source implementation when QEventLoop::ExcludeUserInputEvents is set. As long as the window system's event queue was not empty, we signaled to the event dispatcher that there is an event ready to be dispatched. This results in the dispatcher calling the relevant dispatch function (which does handle the ExcludeUserInputEvents flag correctly). As we do not dispatch user events, the window system's event queue never becomes empty and we enter a busy loop (CPU running at 100%) where we signal that we have events to dispatch, but we actually do not dispatch them and g_main_context_iteration never gets to block. This busy loop can cause blocking GTK functions such as gtk_dialog_run() never return. Task-number: QTBUG-59760 Task-number: QTBUG-57101 Change-Id: I545b7951108eeaba019614ae8f5a1168c8b26c27 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* gradle: Complete qt_attribution.json fileKai Koehne2017-04-241-0/+2
| | | | | | | | Add it to the qtcore documentation, but mark it as a tool (code does not get shipped with customer application). Change-Id: I75cc199a2bbd86f9e40a75396144645ea69a7bd1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix QSqlRelationDelegate when using quotation marksJesus Fernandez2017-04-241-3/+19
| | | | | | | | | | Strip the quotes from the field name in QSqlRelationalDelegate implementation to able to find the field in the dictionary. Task-number: QTBUG-59137 Change-Id: I2f1dc9ce3b9c91ca6cc3d3b82e61e1456c3b22c7 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Cocoa: Send correct mouse buttons for tabletsMorten Johan Sørvig2017-04-242-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | Tablet vendors allow user configurable pen buttons where the user may assign a logical mouse button to a given physical button. In the case of Wacom tablets this mapping is not reflected in the buttonMask API, which returns the state of the physical buttons. Use NSEvent buttonNummber instead, which returns the logical button number, after applying user mappings. Unifiy button state stacking with the mouse handlers. Handle a special case where buttonNumber returns 0 for tablet right mouse presses. We get these events via rightMouse* event handlers and can hardcode the button number. Change-Id: I06b9b1aa98c49b84f7e3871e694c22c7ad0169d6 Task-number: QTBUG-57487 Task-number: QTBUG-54160 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix UB in QSplitter::childEventOlivier Goffart2017-04-231-9/+10
| | | | | | | | | | | The widget might be in the QObject destructor when the event is received, so we can't static cast. There is no need to check for isWindow for ChildRemoved because it would not otherwise be on our list. Change-Id: Ifc0a2979f1f6720f1963399276a28ac4a3224fff Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix UB in QStandardItemModelOlivier Goffart2017-04-232-21/+14
| | | | | | | | | | | | | | The destructor of QStandardItem needs to access the model. So we need to destroy them before the QStrandardItemModel gets destroyed. In the destructor of the private, it is already too late because we are already in the ~QObject Since the destructor of QStandardItemPrivate is now empty, remove it completely. There is no need for QStandardItemPrivate to have a virtual table as there are no class that inherit from it. Change-Id: Id6639e21f277f1c4e85c3f9bc720b4f29eb16c2c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Deprecate QCoreApplication::flush()Gatis Paeglis2017-04-226-38/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Fix QMetaMethod::invoke and automatic type registrationOlivier Goffart2017-04-221-5/+7
| | | | | | | | | | | | | | | | | This was simply not working for two reasons: - The index passed to QMetaObject::metacall was not right (there was an offset because of the return type) - If the registration succeeded, the arguments were not even initialized. The tests in tst_moc always called QMetaMethod::parameterType before calling invoke, which was properly registering the type. So this was not seen in the tests before. [ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and types whose metatype gets automatically registered. Task-number: QTBUG-60185 Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update qopenglext.hLaszlo Agocs2017-04-221-74/+713
| | | | | | Change-Id: Ifb1d20855f0c0b9459d7ff2e01fbda1f713bff35 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update qopengles2ext.hLaszlo Agocs2017-04-221-8/+1307
| | | | | Change-Id: I03b867133a00ef6e662a05d5eac7a733747fb8be Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMacStyle: Fix scroller memory leakv5.9.0-beta3Morten Johan Sørvig2017-04-212-5/+14
| | | | | | | | | | | | | | | | | Calling initWithFrame repeatedly on the same object leaks memory since internal structures allocated on the previous init call will not be released. However, initWithFrame is the only API that can set scroller direction, which is does based on the geometry. Use two scroller objets, one for each of the horizontal and vertical cases. Task-number: QTBUG-60004 Change-Id: I5d07b62e6969a1824ab705941ac4d0340139b99c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QMacStyle: Properly flip vertical slidersGabriel de Dietrich2017-04-211-2/+4
| | | | | | | | | | | | | | Cocoa is better than us at vertically flipping views, so we use that API instead of fiddling with the graphics context transforms. But only so from 10.12 onwards. Go figure. This also fixes a one pixel offset with horizontal sliders handle on non-retina displays. Change-Id: Ia3da8431ad0499a4b6fb7bf6973ed353d91c2905 Task-number: QTBUG-59666 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* macOS: Fix crash when closing windows with raster backingstoreTor Arne Vestbø2017-04-211-1/+4
| | | | | | | | | | | | After 5b78fcd03b6 the raster backingstore tries to use the platform window to resolve the native DPR, but we might not always have a platform window. Instead we go though the window, like before, which has fallback paths for the case of no platform window, and then remove the Qt scaling factor manually. Change-Id: I19c8383b0a33f3d97aaf0d0e886ed03e14cb1592 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: correct \sa statementNico Vertriest2017-04-211-3/+1
| | | | | | | qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy' Change-Id: Ic96f834f3ca9984f626833e45e69f6322b83d12d Reviewed-by: Martin Smith <martin.smith@qt.io>
* macOS: Defer population of localized font family aliases until neededTor Arne Vestbø2017-04-214-12/+41
| | | | | | | | | | | | Getting the localized family name of a font involves quite a bit of work internally in CoreText, e.g. creating and sorting font descriptors. By deferring population of family aliases until a font match misses we shave off ~1 second of startup time for applications that use non- localized font families (most applications). Change-Id: I021952c311c0d70d7769ccf764dbf997ebf30a4b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>