summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | Fix link to sched_setscheduler in QThread documentationMitch Curtis2016-03-161-2/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I38412a119d2a91685b3fd2e4a459d33a60b154b0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * | Correct qt_defaultDpi X/Y with just a QCoreApplicationAllan Sandfeld Jensen2016-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the 96DPI attribute check avoid undefined behavior by using QCoreApplication::instance() directly, instead of calling through qApp, which performs an invalid cast to QGuiApplication. Change-Id: Ib86e7d2461b462a2d623f1364414f7d4d2293f22 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | WinRT: Fix QTimeZone transitions by switching backendMaurice Kalinowski2016-03-163-5/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously WinRT was using the UTC backend which fails on all platforms for some QDateTime autotests related to timezone items. Hence switch to the Windows implementation for WinRT as well. However, the windows backend does query the registry heavily, which is not supported on WinRT. Instead use the API version provided by the SDK. Long-term we might want to switch to this version on desktop windows as well, as direct registry access would not be required and we could harmonize the codepaths for both platforms. Change-Id: I620b614e9994aa77b531e5c34c9be1da7e272a30 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | winrt: process all triggered timers in processEventsOliver Wolff2016-03-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If only one timer is processed in there it is possible that a reoccuring timer which has a very low timeout blocks all the other timers from being triggered. This high frequency timer might be the only one to be triggered in every processEvents call. Task-number: QTBUG-51888 Change-Id: I8a0026d1e8519171ab60d1b47c494a15d30328b3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| | * | Remove handle duplication code from QWindowsPipeWriterJoerg Bornemann2016-03-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no apparent reason why the handle should be duplicated. Change-Id: I8ff2cde2f050934ed0dd9ab2d39a1b1efa327a17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * | xcb: Initialize all xcb_client_message_event_t members before useShawn Rutledge2016-03-154-1/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: I01e4b69b138fd19fc7e67751d93adebc1326b2f9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| | * | QRect: fix UB (int overflow) in center()Marc Mutz2016-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRect::center() should be defined for any QRect(x1,y1,x2,x2), INT_MIN <= x1, x2, y1, y2 <= INT_MAX because the average of two signed integers is always representable as a signed integer. But not when it's calculated as (x1+x2)/2, since that expression overflows when x1 > INT_MAX - x2. Instead of playing games with Hacker's Delight-style expressions, or use Google's patented algorithm, which requires two divisions, take advantage of the fact that int is not intmax_t and perform the calculation in the qint64 domain. The cast back to int is always well- defined since, as mentioned, the result is always representable in an int. Fix a test-case that expected a nonsensical result due to overflow. [ChangeLog][QtCore][QRect] Fixed integer overflow in center(). This fixes the result for some corner-cases like a 1x1 rectangle at (INT_MIN, INT_MIN), for which the previous implementation could return anything (due to invoking undefined behavior), but commonly returned (0, 0). Change-Id: I1a885ca6dff770327dd31655c3eb473fcfeb8878 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * | Compile with -no-openglMorten Johan Sørvig2016-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCocoaBackingstore::toImage() can only be Q_DECL_OVERRIDE if QPlatformBackingStore::toImage() is present, which it isn’t for NO_OPENGL builds. Change-Id: Ib116f40fd26defb29a8d520d3e3fb104d8da8d57 Task-number: QTBUG-51694 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * | Revert "Handle the QWidgetPrivate::mapper structure"Marc Mutz2016-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 90de48493be283b9afb249f6a0fd8dbd8958517d. The call isn't necessary, but invokes undefined behavior. It invokes undefined behavior because deleteTLSysExtra() is called from deleteExtra(), which is called from ~QWidgetPrivate(), which is called from ~QObject(). Thus, by the time we call q->windowType() within setWinId(), q is no longer a QWidget, but only a QObject, and calling a QWidget member function then is UB. UBSan confirms: qwidget_p.h:300:5: runtime error: downcast of address 0x2afdd4053620 which does not point to an object of type 'QWidget' (the Q_Q macro) 0x2afdd4053620: note: object is of type 'QObject' qwidget.cpp:1712:93: runtime error: member call on address 0x2afdd4053620 which does not point to an object of type 'QWidget' 0x2afdd4053620: note: object is of type 'QObject' It is also unnecessary: deleteTLSysExtra() is called from two places: QWidget::destroy() and deleteExtra(). deleteExtra() is only called from ~QWidgetPrivate() which is only called from ~QObject() called by ~QWidget(), which, however, already calls QWidget::destroy(). QWidget::destroy(), in turn, unconditionally (for non-desktop widgets, at least) calls setWinId(0) itself. So fix the UB by removing the call without replacement. Conflicts: src/gui/kernel/qwidget_qpa.cpp Change-Id: Ib3a8cc9d28a096183f1d3dfd1941ea5fdc6a4aac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | QRawFont: fix UB (misaligned load) in fontTable()Marc Mutz2016-03-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qrawfont.cpp:618:60: runtime error: load of misaligned address 0x2acee92a5569 for type 'const quint32', which requires 4 byte alignment Fix by using MAKE_TAG(), like everywhere else, instead of a load through a type-punned and misaligned pointer. Change-Id: I52b88ca05a57f7d8c5e5bce953384de49514079b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * | tst_QSqlQuery: fix UBs (invalid downcasts, member calls)Marc Mutz2016-03-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code derived a helper class from QSqlResult and overloaded two protected functions as public ones so the test could call them after casting QSqlResults to that helper class. Both the cast (which is a C-style cast, but with combined static_cast and const_cast semanics) and the following member function call are undefined behavior. Fix by making the test class a friend of QSqlResult, and dropping the casts. Change-Id: I09de2e2b46976d01cfce25892aec6ad36881d3eb Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| | * | QCosmeticStroker: fix several UBs involving << with a negative LHSMarc Mutz2016-03-151-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left-shifts of negative values are undefined in C++. In particular, they don't behave arithmetically. Reported by UBSan: qcosmeticstroker.cpp: 72:15: runtime error: left shift of negative value -14/-19/-32/-33/-34/-37/-38/-63/-64/-192/-384/-1280 qcosmeticstroker.cpp:444:20: runtime error: left shift of negative value -64 qcosmeticstroker.cpp:451:26: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:483:26: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:762:20: runtime error: left shift of negative value -64 qcosmeticstroker.cpp:774:26: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:813:47: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:839:20: runtime error: left shift of negative value -64 qcosmeticstroker.cpp:851:26: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:889:47: runtime error: left shift of negative value -1 qcosmeticstroker.cpp:932:27: runtime error: left shift of negative value -64 qcosmeticstroker.cpp:995:27: runtime error: left shift of negative value -3/-64 Fix by using ordinary multiplication instead, because negative left-hand-side values don't look like they are an error. Change-Id: Icbebd41f6ddd3dca4abd385585fc0f82064fe8b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * | Remove Qt::WA_OutsideWSRange flag even if the widget is not yet visible.Błażej Szczygieł2016-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show the widget when its initial size is 0 and the layout changes the size during showing. Task-number: QTBUG-51788 Change-Id: I3251ac27328f9715ff13d96e1b82fbf824d9e79d Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| | * | Cocoa: Fix crash on screen disconnect.Morten Johan Sørvig2016-03-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain virtual siblings list on screen deletion. QCocoaIntegration::updateScreens() has a loop which will delete all non-current QScreen objects using QPlatformIntegration::destroyScreen(). destroyScreen() vill eventually call QWindowPrivate:: setTopLevelScreen() which accesses the virtual siblings list for the deleted screen. This can cause a stale pointer access if the virtual screen list is not up to date, especially when disconnecting two screens at the same time. Change-Id: Ia6b9d01edf8e5eea25b64604a2b3b28b173125f7 Task-number: QTBUG-48275 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * | Don't include by default ciphers that are not supportedAntonio Larrosa2016-03-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There could be cases (mostly when compiled on old systems, since modern openssl versions don't include such insecure ciphers) in which defaultCiphers included a cipher that wasn't in the supported ciphers list. With this patch we make sure that defaultCiphers is a subset of supportedCiphers Change-Id: I545ea21f5fd3a6ed13b366cdd56a1393233f9fc9 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * | Do not send the trailing dot of a hostname as part of the SNIRichard J. Moore2016-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SNI extension must not include the trailing dot, even though this is legitimate for the host header. Task-number: QTBUG-51821 Change-Id: Ib7a7d8b1f8f98bc99ae745b03d2b97e507adefaf Reviewed-by: Daniel Molkentin (ownCloud) <danimo@owncloud.com>
| | * | QNetworkHeaders: fix UB (invalid enum value) in Private::parseAndSetHeader()Marc Mutz2016-03-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qnetworkrequest.cpp:1016:19: runtime error: load of value 4294967295, which is not a valid value for type 'KnownHeaders' KnownHeaders does not contain a failure state, and no negative values. -1 is therefore not a valid value for an object of type KnownHeaders, so loading one is considered UB. Fix by returning the result of parseHeaderName() as an int, only casting to KnownHeaders after checking for the failure case. Change-Id: I6b165fe2b15c747344a9b2750bb753582c5bcbeb Reviewed-by: Richard J. Moore <rich@kde.org>
| | * | Cocoa: Improve native view lifetime accuracy.Morten Johan Sørvig2016-03-111-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally all native NSWindows and NSViews owned by QCocoaWindow should be deallocated during the QCocoaWindow destructor. In reality this does not always happen since Cocoa is free to hold references to the views after Qt releases its reference. We can help Cocoa clean up: - Clear the first responder for the NSWindow under the ~QCocoaWndow() autoreleasepool. - Use an autoreleasepool to clean up temp objects from [NSWindow orderFront:] immediately. Together this makes the QNSView lifetime be contained by the QCocoaWindow lifetime, at least for simple QWindow usage. It also fixes the observed memory leak reported in QTBUG-51766 Change-Id: Idd224f54ebd6f61f274461a204ff30c666b22768 Task-number: QTBUG-51766 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * | winrt: Fix painting glitches when orientation changesMaurice Kalinowski2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to handling the pure rotation enforce a size change as well. This way content is redrawn for the correct orientation. It was done for Windows Phone 8.1 already, we only need to extent this to Windows 10. Task-number: QTBUG-50336 Change-Id: I6b3b964f44b631757ea856331c50f53c39ed9ec3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | winrt: add logging to QWinRTScreenMaurice Kalinowski2016-03-111-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-38114 Change-Id: Id653487a03ca2920c46cf16e45f28677a69fa570 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | Ported Qt 4 fix when getting an invalid native key on WindowsSamuel Gaist2016-03-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-36061 Change-Id: Ibde65735d861af4e1ef768e9e4314d30fed534a1 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | QLocalServer/Win: Fix race condition in listen().Joerg Bornemann2016-03-101-30/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose a client connects while the QLocalServer is still in the loop that calls addListener. The connection would SetEvent(eventHandle), but every call to ConnectNamedPipe would ResetEvent(eventHandle). Thus, the connection is never detected by the notifier on eventHandle. Callers of addListener must check the connection state of every listener to make sure that no client connected while setting up listeners. Task-number: QTBUG-49254 Change-Id: Ia961927ea76973708e6e3f73510695eb5d6a0e4c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * | Deduplicate a condition to make clear that several cases ask it.Edward Welbourne2016-03-101-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkAccessManager::createRequest() had three checks relevant only to GET and HEAD requests; rather than testing for this in each of the cases, test for it once and skip all three if it fails. Tidied up the residue of conditionals in the process. Change-Id: I7baee8067a03afdc7cb0a77f1a50759dc4233843 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * | Skip spurious .toLower() on returns of QUrl::scheme()Edward Welbourne2016-03-105-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl::setScheme() parses and canonicalises the scheme, so that scheme() always returns a lower-case string anyway; no need to .toLower() it. Change-Id: Ied00814b63f159386a42552dcf06346ee56f9f97 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * | Add argument names to the function signatures in headersOlivier Goffart2016-03-103-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, in the .cpp, the declaration has the argument name in comments because it is not used (instead of using Q_UNUSED). The old qdoc could parse that, but once clang is used, these comments are not seen anymore. So add the argument names to the headers. This is also good for things like auto completion, which uses only the header to know what the argument name is. I grepped for " */)" and made sure all the functions that are documented have the right arguments. I also added the name to all the function around for consistency. Change-Id: I1aaa37e25a1985f7f51653f047a1ac2633242b56 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | | Remove dynamically-loaded use of DNS lookup feature for INTEGRITY.Rolland Dudemaine2016-03-211-2/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Static libnet is enough for DNS resolution. This commit specializes the removal of dynamic DNS library load, but this should probably also be done when using a static build. Change-Id: I597bdd528649849844a0ee46d0706f22d6f595d4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QWheelEvent: Make NoScrollPhase publicGabriel de Dietrich2016-03-218-27/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts d5fde514106f5479f9c929c8a165aced4a1b2c84 and makes that enum value the default for QWheelEvent::phase() with non phase-aware mice. [ChangeLog][QtGui] QWheelEvent::phase() returns NoScrollPhase with non phase-aware mice. This is most mice and input devices except, for now, Apple's trackpads and Magic Mouse. Change-Id: I929fb39889cf116e89dcd134c1b1ec6587b8f05e Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | Add GHS pretty print for compiler versionRolland Dudemaine2016-03-181-0/+2
| | | | | | | | | | | | | | | Change-Id: I6376de7c33b73f5efcfc7ffc7ac6ad3a260fc3a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Remove inclusion of -lm for INTEGRITY.Rolland Dudemaine2016-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | Math functions are linked in by default on INTEGRITY. Change-Id: I737ae87c02b2321caca3975f69525731e839d1a7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Add GHS toolchain supportRolland Dudemaine2016-03-181-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Note that while GHS C/C++ is using EDG as a frontend, _BOOL is only defined when using the C++ driver, and not when building third-party C code like libpng and friends. Change-Id: Ife19bd09e4c9f3efea6383c0eede9e0947265ca2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QPlatformTheme: added EditorFontNikita Krupenko2016-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Which is needed by Qt Labs Controls. Task-number: QTBUG-51203 Change-Id: If5f39d59c5c88de37c9b034b784c38b976759439 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | iOS: Use composeAndFlush() to flush all backing store updatesTor Arne Vestbø2016-03-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformBackingStore::composeAndFlush() handles an empty texture list just fine, and results in the same blitting of the backing store image as we're doing today using the OpenGL paint engine, except the compose and flush code path is a lot more optimized. Among other things it clears the render buffer as the first step (as recommended by Apple on iOS), doesn't re-create the backing store texture each pass just because the image has changed, and respects the flushed region for both the texture upload (using glTexSubImage2D) and when blitting the texture. The result is a 10x increase in frames per second when blitting full screen updates. Change-Id: I163fab473751f8201758a5684b18d80bb90d42fb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | QAbstractSocket: do not fail writing on read buffer overflowAlex Trotsenko2016-03-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | canReadNotification() could return 'false' if either the socket has been closed, or the read buffer has reached the maximum size. Because of this duality, waitForBytesWritten() should not fail as a result of a canReadNotification() call. Change-Id: I9a15fa174a3b982a7ce404913caa38fc19f64622 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* | | Make QOpenGLTexture a Q_GADGETPaul Lemire2016-03-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to register the enums as Q_ENUM which in turn will allow Qt3D and future other modules to access these enums from QML if QOpenGLTexture is registered as an uncreatable type Task-number: QTBUG-51491 Change-Id: I037a4585cd44c7429b63f06b704f0386df842777 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | QtTest: Add formatting for QColor.Friedemann Kleint2016-03-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a QCOMPARE of values of type QColor fails, their name will now be printed. Task-number: QTBUG-51124 Change-Id: I76565daa338f038ea4f452e47705e638d94eaeee Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | QMenu: Add showTearOffMenu()Gabriel de Dietrich2016-03-172-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is incomplete since we can't show a tear-off menu programatically. This could be useful when restoring the application state on launch. Change-Id: Ice1911b44a5b973680f67b0150efacf3d023c2c5 Task-number: QTBUG-47974 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | Make pcre sljit build with GHS toolchain.Rolland Dudemaine2016-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This commit should also be pushed to pcre main repo, but is necessary to build Qt. Change-Id: I647e784feca09c13260f938823c2bcf5adec2a00 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Disable some features for INTEGRITYRolland Dudemaine2016-03-171-0/+7
| | | | | | | | | | | | | | | | | | | | | Specifically, this is a single-process build. Change-Id: I1b2cc33641df0ef73f1f26f388c1af3d954ce6e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Dedupe QMetaObject::castSean Harmer2016-03-151-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | By implementing in terms of QMetaObject::inherits(). Change-Id: I39a039539b05a20bc1713bd450d8a998c78433aa Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add a function to QMetaObject to check for inheritanceSean Harmer2016-03-152-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is analogous to QObject::inherits() but only requires the metaobjects rather than pointers to a QObject instances. This is needed for type checking on the backend of Qt 3D where we do not have access to QObject pointers. Change-Id: I14d26c4cbb5cc3fbecb57725f2c14ee0ffda4a11 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | QMimeTypeParser: replace a QString::arg() chain with QString::asprintf()Marc Mutz2016-03-151-2/+6
| | | | | | | | | | | | | | | | | | | | | Saves ~250b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Ic92c4ac1bb20230cfbb929bdf5c7f385d7b604e5 Reviewed-by: David Faure <david.faure@kdab.com>
* | | update bundled sqlite to 3.11.1.0Mark Brand2016-03-134-8407/+5632
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.7 has dropped WinCE, including WEC2013, the patch for WinCE is no longer needed. The source code for the sqlite3 shell, shell.c, is not required for building the qsqlite driver or anything else in Qt, so there is no reason to keep bundling it with Qt sources. Change-Id: Id0b03945451f9e843a0424c9fe510d79555717fc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Roth <gunnar.roth@gmx.net>
* | | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-13148-768/+889
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-11148-768/+889
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * | Xft antialias settings must not override requested NoAntialiasAllan Sandfeld Jensen2016-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Xft enabled font antialiasing, QFont::NoAntialias would have no effect as it would be overridden. Change-Id: I4dae264bc6674ae81f181cc9ce85851174d42544 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| | * | QMimeMagicRule: fix UB (misaligned load) in matchNumber<T>()Marc Mutz2016-03-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const short unsigned int', which requires 2 byte alignment qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const unsigned int', which requires 4 byte alignment Fix by using new qUnalignedLoad<T>() instead of a load through a type-punned pointer and misaligned pointer. Change-Id: I6b876f1ce7e01369fbb25a51263d1ad04be07d52 Reviewed-by: David Faure <david.faure@kdab.com>
| | * | Fix debug operators for QPageSize/QPageLayout.Friedemann Kleint2016-03-102-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove placeholder formatting and add noquote. Change-Id: I4a89f88778caf007ce42bbf57edfb514fe76bcdb Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| | * | QJsonParser: fix UB (misaligned store) in Parser::parseNumber()Marc Mutz2016-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qjsonparser.cpp:741:30: runtime error: store to misaligned address 0x0000019b1e94 for type 'quint64', which requires 8 byte alignment Fix by using the qToLittleEndian() overload that can store to misaligned memory. Change-Id: Ib84bd30b13c68f7fdb8870c9fbbfac15cff0112d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | Wheel event widget: Harden logic an extra bitGabriel de Dietrich2016-03-092-25/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite an unlikely scenario, but not impossible. It could be that the wheel widget is destroyed during an update phase event. In that case, wheel_widget would be a dangling pointer for any subsequent wheel event. We protect against this with a QPointer. However, that would mean that if the next wheel event were to be an end phase event, that event would be lost. So we go through the usual code path, except that we won't set wheel_widget in the case of an end phase event. Change-Id: I59a912b845dcc249e1edc60b4dc28bf308d807d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| | * | QObject: fix GCC 6 warning about qt_static_metacall's 'hidden' attribute useMarc Mutz2016-03-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is triggered when we try to apply the Q_DECL_HIDDEN attribute to a class in an unnamed namespace. Such classes are already not exported. qobjectdefs.h:175:108: warning: ‘visibility’ attribute ignored [-Wattributes] qobjectdefs.h:198:108: warning: ‘visibility’ attribute ignored [-Wattributes] Added a test on gadgets (and QObjects) in unnamed namespaces, because qtbase currently does not contain such Q_GADGETs. Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ic747cc2ab45e4dc6bb70ffff1438c747b05c5672 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>