summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Increase the maximum recursive template depth on INTEGRITYKimmo Ollila2017-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | Set the limit to 128 instead of the default 64 by adding QMAKE_CXXFLAGS += --pending_instantiations=128. This is needed by QMetaType::typeName array implementation. Change-Id: I3fd13967f862f492210572cfe7ee9ffc5e7c9745 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDir: replace QLVA<QChar> with QVLA<ushort>Marc Mutz2017-03-251-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | ... as used in qstring.cpp, too. QChar is only marked as movable, not primitive, as it should have been and ushort is, and there's some hope that the template instantiations can be shared across TUs. Saves a rather disappointing 148B in text size on optimized GCC 7 Linux AMD64 builds. Change-Id: Ic9558a4d83611a6461cd5540c9090cbd4c4f2f4e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QStorageInfo: Fix warning about unused variableThiago Macieira2017-03-231-0/+2
| | | | | | | | | | | | | | | | Happens on non-Linux, non-macOS Unix systems (got it on FreeBSD). Change-Id: Ie67d35dff21147e99ad9fffd14acc7308b5ff17e Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Windows: Register windows for touch when a device is plugged inFriedemann Kleint2017-03-223-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | Call QWindowsWindow::registerTouchWindow() for all windows when a device is plugged in while the application is running. Guard registerTouchWindow() against repetitive invocation and wrong window types. This amends the crash fix 7daae2c2c706fd5d1c1ae44ace6847bc297803a0 and touch should then work. Task-number: QTBUG-48849 Change-Id: I8b257dda144f28d60bcc5c4e369a413a90263998 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add feature.dialogStephan Binner2017-03-2225-58/+113
| | | | | | | | | | Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | xbm image format: avoid uninitialized pixels for truncated dataEirik Aavitsland2017-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | xbm bitmaps are conventionally accepted as valid even if there is not enough data to fill the declared bitmap size: both ImageMagick and GIMP do this. Qt did too, but the uncovered areas would be uninitialized, and thus contain random junk bits. This commit adds clearing of the full QImage data. Task-number: QTBUG-54169 Change-Id: I84150d54d07dbd546a4947e7ec332f83f2d7ca41 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | QMacPasteBoard - protect against dangling pointersTimur Pocheptsov2017-03-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QMacPasteboard we use converters from QMacInternalPasteboardMime, which has essentially a global QList of available converters. QMacInternalPasteboardMime and derived classes register/unregister their instances in this list (in ctors/dtors) and then QMacPasteboard is using converters from this list. Unfortunately, when we're un-registering converter (and this means we delete those objects) we do not remove dangling pointers from our pasteboard objects. Apparently, this problem can be seen only when working with macextras (thus having an access to this private API in client's code). Task-number: QTBUG-54832 Change-Id: Ie3aef4aaca8ef6c80544dc58821cf43fc26f84a1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Windows QPA/Services: Do not invoke MailToProtocolHandler of url.dllFriedemann Kleint2017-03-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | As of Windows 10, MailToProtocolHandler is set as handler for mailto URLs if there is no mail client installed. As it silently fails or brings up a broken dialog after a long time, exclude it and fall back to ShellExecute() which brings up the URL assocation dialog. Task-number: QTBUG-57816 Change-Id: Ia8c09676bc44848e0549c06c3a82c9b5cce79279 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-2233-486/+525
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-2133-486/+525
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| | * QToolBox: fix potential UB (invalid cast) in Private::_q_widgetDestroyed()Marc Mutz2017-03-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't cast an expiring QObject down to QWidget. Cast the QWidgets stored internally up to QObject to perform the comparison. The result is the same, but no invalid casts are possible anymore. Found by independent review. Change-Id: Iffa8a66cf5cab0270961befe982637ac8e4f0f7b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QMetaType & QVariant: "load" and "save" std::nullptr_tThiago Macieira2017-03-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't load and save pointers usually because the pointer value cannot be guaranteed to remain across program invocations. However, nullptr is an exception: a null pointer is always a null pointer. We don't actually have to read or write anything: there's only one value possible for a std::nullptr_t and it is nullptr. [ChangeLog][Important Behavior Changes] A QVariant containing a std::nullptr_t is now streamable to/from QDataStream. Task-number: QTBUG-59391 Change-Id: Iae839f6a131a4f0784bffffd14aa374f6475d283 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * QUrl::fromUserInput: fix handling of files with a ':' in the nameDavid Faure2017-03-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl::isRelative(str) would be false for such files, so first check for file existence before doing any URL parsing. Change-Id: I51b6229251ad94877ac408b2f8018456d3e10a36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix char format of preedit text in empty text blockEskil Abrahamsen Blomfeldt2017-03-201-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a text block is empty, and we are adding preedit text to it, we need to merge the format of the preedit text with the current format of the cursor, otherwise we will use a default format and then suddenly switch to the proper one when the text is committed. The reason this becomes a bit complex is that there are no rules preventing someone from using several ime attributes to specify formats for isolated parts of the text, and no rules defining the order of such attributes. So even if the common case is one text format attribute for the entire string, we need to make sure we also handle the other cases gracefully, e.g. when we are setting different formats for different substrings and then providing these out of order. To make sure we have these corner cases covered, we also add a set of autotests. [ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of input method text as it is in pre-edit mode. Task-number: QTBUG-59196 Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * PostgreSQL: fix datetime format when system locale doesn't use arabic numeralsMichael Jabbour2017-03-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | psql driver was previously using QDateTime::toString() function which is locale-depndent. Task-number: QTBUG-59524 Change-Id: I7f50f95b5c82e66476abfee24ad28b78b3257041 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QChar: fix ambiguous comparisons with 0, '\0', ... for goodMarc Mutz2017-03-171-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e0ea0f6178c9dbee2a8c888fde84ad1cd9670c6b optimized QChar <-> QString(Ref) comparisons by adding more overloads to avoid creating QStrings from QChars just to compare them. But these new overloads made existing comparisons to QChar ambiguous. This was known at the time for QChar/int comparisons. It has since turned out that also comparing to '\0' is ambiguous, ie. not comparing to int or char per se is ambiguous, but comparing to nullptr constants is, because QString(const char*) is just as good a candidate as QChar(char)/QChar(int). Since we allow QString/QChar comparisons, it seems logical to solve the problem by adding QChar<->nullptr overloads. [ChangeLog][QtCore][QChar] Disambiguated comparisons with nullptr constants such as '\0', which 5.8.0 broke. As a consequence, QChar<->int comparisons are no longer deprecated, as this was a failed attempt at fixing the ambiguity. Change-Id: I680dd509c2286e96894e13078899dbe3b2dd83bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Work around Linux libc overflow in mmap64Thiago Macieira2017-03-171-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mmap64 functions in all Linux libc fail to properly check that the value fits in the system call parameter. I guess the developers just said "16 PB are enough for everyone"... Change-Id: Ic39b2c4fd9c84522a8fafffd14ac91567ce09c09 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Protect better against timer ID replacementThiago Macieira2017-03-171-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timer IDs have been reused since Qt 4.5 or thereabouts, so just checking if the timer ID is in the timer dictionary is an incorrect check: our timer may have been deleted and replaced by another with the same ID. Instead of deleting the WinTimerInfo object, let's just mark it as unregistered by setting timerId to -1 and cooperate in deleting at the appropriate places. Since unregisterTimer skips deleting if inTimerEvent is true, the appropriate places are everywhere that set inTimerEvent to true. Change-Id: I057e93314e41372ae7a5ff93c467767c8a6d92ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Android: Bearer jar shouldn't be a dependency if disabledDaiwei Li2017-03-171-10/+12
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-59264 Change-Id: I960d5bff902b06ca5dda447fd60002a756a11e51 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * eglfs: fix x11 header related compile failurePeter Seiderer2017-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add egl config and QT_EGL_NO_X11 define (as all other eglfs project files do). Task-number: QTBUG-59427 Change-Id: Ifbb11eae0fdf0e58c0b7feecb9a7914a889c8f77 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Remove a Q_GLOBAL_STATIC with QMutex in favor of QBasicAtomicIntThiago Macieira2017-03-171-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Much simpler, no memory allocation, no locking. Change-Id: Iae839f6a131a4f0784bffffd14a9e70c7b62d9a7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Android: Fix Accessibility items positioning with QHighDpi enabledKonstantin Ritt2017-03-161-3/+6
| | | | | | | | | | | | | | | | | | | | | the View's position and metrics are in pixels, not points Change-Id: I285d5378db98187f54019bff9b8a1cde05dc3b35 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * Fix crash in QWindowPrivate::applyCursor when screen is nullOlivier Goffart2017-03-162-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindow::setVisible calls QWindowPrivate::applyCursor without checking if screen() returns null. This patch adds a check in QWindowPrivate::applyCursor that the screen is not null. Now that it is tested there, no need to test it from the other caller (setCursor) This patch should not change behavior of setCursor at all, it should only fix the crash when coming from setVisible Task-number: QTBUG-59528 Change-Id: I06bbdb4e04c02ac840ba637242d1f2cfde5bdd62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QChar: fix docs of (uchar) ctorMarc Mutz2017-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor is not only disabled under QT_NO_CAST_FROM_ASCII, but also under QT_RESTRICTED_CAST_FROM_ASCII. Change-Id: I7bbaf2891913d5256dff7f80c49075ea3326155a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * xcb: cleanup QXcbWindow::relayFocusToModalWindow()Gatis Paeglis2017-03-141-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | - recursion is not needed for walking up the parent chain; - use camel-case, modal_window -> modalWindow; Change-Id: I4b7697f2388fd16f11be67ba475bd63ad249d89e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix item keeping hover highlight even when mouse has left itDan Cape2017-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made change to clear the hover index when the mouse leaves the widget. This will ensure the component does not think the item still has the mouse over it. Task-number: QTBUG-46785 Change-Id: I34b7f0e171e9cf07ca23150af1b0e6e59a10a58a Reviewed-by: David Faure <david.faure@kdab.com>
| | * Use lowercase name for iphlpapi librarySamuli Piippo2017-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Cross-compilation on linux with mingw-w64 failed, since it provides all libraries in lowercase name. Change-Id: I8e82a4504d4ec9d3047af6b1d6a11945754f182d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Fix QStandardPaths values on Apple Platforms containing URL encodingJake Petroules2017-03-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects an issue where the file system paths returned for some QStandardPaths values on Apple Platforms would be URL encoded, for example having %20 instead of an actual space character. Task-number: QTBUG-59389 Change-Id: I771a44eb20b756842c324ac6fc9bdc475ce84826 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | * QLockFile: Don't deadlock if the lock file has a mtime in the futureOlivier Goffart2017-03-103-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stale Lock files in the future can happen in some situations. For exemple two computers with different clocks access the same file system. It could be that one of the timestamp is totaly off (several years into the future). [ChangeLog][QtCore][QLockFile] Fixed a deadlock occurring if a corrupted lock file's modification time is in the future. Change-Id: I8dac98a0e898c76bcef67f8c195e126c996b6add Reviewed-by: David Faure <david.faure@kdab.com>
| | * qlalr: Use forward slashes in #include directivesKevin Funk2017-03-102-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes sure we don't use backslashes on Windows systems, which could lead to the following warnings being emitted: In file included from main.cpp:43:0: repparser.h:2:10: warning: unknown escape sequence: '\.' #line 57 "..\..\src\repparser\parser.g" caused by lines like #line 57 "..\..\src\\repparser\parser.g" Change-Id: I6cfe0e39a2a58eb39f9d385ece30374bcfa09e05 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * QAtomic: pass explicit failure memory order to ↵Marc Mutz2017-03-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::atomic::compare_exchange_strong GCC 4.8 seems to get the failure memory order wrong when using the overload that only accepts one memory order and produces errors such as: bits/atomic_base.h:577:70: error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange' return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); ^ (as seen on Android). Fix by explicitly passing the failure orders corresponding to the success orders, as specified by the standard: relaxed → relaxed release → relaxed acquire → acquire acq_rel → acquire (cf. http://en.cppreference.com/w/cpp/atomic/atomic/compare_exchange). Task-number: QTBUG-59399 Change-Id: If046e735888cf331d2d6506d8d5ca9aa7402f9ad Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Bugfix in QDateTimeParser's findTextEntry()Edward Welbourne2017-03-091-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a later month-or-day were to have a name that's a prefix of an earlier one's name, the code would have selected the longer name as best match when the text matched is the shorter name, simply because it found that one first. (Found, on Turkish Cuma(rtesi)? in Thiago's recent new test, by reversing the loop that iterated the list.) Make an exact match win and a match of a full name beat any prefix match of the same length. Change-Id: I8d954b83ccc25e4f47af2e558036d714685cef5e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Simplify QDateTimeParser's shiny new findTextEntry()Edward Welbourne2017-03-091-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Decouple from the callers' offset into a larger list; just search for an entry in a list, let the caller deal with the offset. Also, defer a .tolower() to save the need to allocate a copy of each list entry. Change-Id: I748d5214c2cc6dc592fe2bd41e3f8150f71c335b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Android: Enable the usage of QPrinterAndy Shaw2017-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since QPrinter can be used to write to PDF and this was working in previous versions, there is no reason not to enable it here. Task-number: QTBUG-58376 Change-Id: I5760b74881995679e8df657b7d770bba00a33551 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * QDateTimeParser: Merge the code to parse names of months and weekdaysThiago Macieira2017-03-081-85/+51
| | | | | | | | | | | | | | | | | | | | | | | | Simplifies everything and avoids bugfixes in one not propagating to the other. Change-Id: I95c9e502ccc74af3bcf0fffd14a69f0cde60cc8c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * qlalr: Fix and re-run qlalr on its own sourcesKevin Funk2017-03-085-287/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So the generated files are up-to-date again. Generated with: qlalr --qt --no-lines --no-debug lalr.g Change-Id: I3c4adb0083be7e66fed3db92c079493b574295aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * QHttpNetworkConnection: fall back gracefully to HTTP/1.1Timur Pocheptsov2017-03-083-28/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both SPDY and HTTP/2 work with a single qhttpnetworkchannel (and this means one socket per qhttpnetworkconnection). Normally, HTTP/1.1 connection is using up to 6 channels/sockets though. At the moment a failure to negotiate SPDY/HTTP/2 leaves us with a downgraded HTTP/1.1 connection (with only one channel vs. default 6). Since we initialize channels (and establish connections) in a 'lazy' manner it's ok to pre-allocate all 6 channels and then either use 1 (if SPDY/HTTP/2 indeed was negotiated) or switch back to 6 in case of failure. Change-Id: Ia6c3061463c4d634aaed05ce0dde47bfb5e24dd8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Use the same timeout value for all QTest::qWaitForWindow*() functionsMarc Mutz2017-03-081-3/+3
| | | | | | | | | | | | | | | | | | | | | Some were 5s, others 1s. Pick one (the higher). Change-Id: I81929d4f49c2e41b4d4b75c3e2bf8ff75af868ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QWizard: use the 3-int QColor ctor instead of the string oneMarc Mutz2017-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | The value is hard-coded, there's no need to parse a string to extract the value. Change-Id: I987280d7a92b7a1eb75233b2a1f811b5177f0a63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Teach QTestLib to read QTEST_ENVIRONMENT to expand blacklist keywordsTor Arne Vestbø2017-03-211-1/+8
|/ / | | | | | | | | | | | | | | | | | | Can be used by CI system to set QTEST_ENVIRONMENT="ci", allowing test to be blacklisted only for the CI. Task-number: QTBUG-59564 Change-Id: I7088abb888c179bafc621f11191efbc45c37b179 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | QDataWidgetMapper: replace an inefficient QList with std::vectorMarc Mutz2017-03-201-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WidgetMapper is larger than a void*, so holding it in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by holding it in a std::vector instead (tried QVector, too, but that produced almost exactly 1KiB more text size). Adapt to std API. There are a few changes in there which are not strictly necessary when using std::vector, but were done as part of the port to QVector: - dropping of WidgetMapper ctors (because QVector requires a default ctor, and I didn't want to provide one manually), - marking the type as movable (no effect with std::vector, but doesn't hurt and keeps the next guy from wondering), and - marking Private::flipEventFilters() const (to avoid a detach when using ranged for loops). Changes required by the port to std::vector: - at() -> op[] (not strictly necessary, but expands to less code even when compiling, as QtWidgets is, without exception support), - append() -> push_back() Saves 40B in text size on optimized GCC 6.1 Linux AMD64 builds (for comparison: QVector had 1240B more than QList). Change-Id: Iaae81d1a8bebe8000bf69e7fb8b2bcd6c38afafd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add features.widgettextcontrolStephan Binner2017-03-206-11/+31
| | | | | | | | | | Change-Id: I6d525f70e1d54b4c8383dfa387cfd5c364fab354 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QHash: unexport the hash seed variableThiago Macieira2017-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | The only allowed way to access the variable is now via the public qGlobalQHashSeed and qSetGlobalQHashSeed functions. The variable was private API, so we're allowed to remove it. Task-number: QTBUG-47566 Change-Id: I4a7dc1fe14154695b968fffd14abd331e5810482 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | QMap, QHash: make key_iterator satisfy the DefaultConstructible conceptAnton Kudryavtsev2017-03-202-0/+2
| | | | | | | | | | Change-Id: Ifc3f481ddb902b26c217516412c93a4a39a32b1c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Set default fbo redirect correctly for QOpenGLWidget viewportsLaszlo Agocs2017-03-181-0/+14
| | | | | | | | | | | | Task-number: QTBUG-59318 Change-Id: Icf2ea4e5ebdeec31750edc8b34a9b9f6bfb64744 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix Windows DnD: Wrong qApp mouse buttons state after external DnDSerge Lysenko2017-03-181-23/+36
| | | | | | | | | | | | | | | | | | | | | | An QApplication::mouseButtons() value could stay outdated after external DnD operations, e.g. dragging an object outside Qt application or vice versa. Also user can cancel DnD with Escape key. Task-number: QTBUG-55885 Task-number: QTBUG-59539 Change-Id: Ia6deb4ae5ccfe77e6d6c2464de40cd06fc71f9b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QCocoaWindow: fix geometry issue when only minimumSize is setOleg Yadrov2017-03-183-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | When only minimumSize was set and it matched to the size NSView was created with, viewDidChangeFrame() was not called for the window and it's internal geometry value was still (0, 0) what led to unpleasant side effects such as QML content was not displayed until something caused an update. Task-number: QTBUG-58963 Change-Id: Ib12d36d405969971e7ff62b79b50c3d78928a649 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | QString: de-deplicate code of leftRef, rightRef, midRefAnton Kudryavtsev2017-03-181-19/+3
| | | | | | | | | | | | | | | | Re-use methods of QStringRef. Change-Id: I5ff719c08c54246e9cafd4f9aa0823ff6df8433b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Include missing errno.hAllan Sandfeld Jensen2017-03-181-0/+2
| | | | | | | | | | | | | | Fixes linux-clang-libc++ builds. Change-Id: Id75c35d858123193e7d29b0bbb113d2c109a7560 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | When changing screen, only update the font if dpi has changedOlivier Goffart2017-03-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally, this might avoid unnecessary work in a quite common case. But if high dpi scaling is set, the dpi (in logical pixels) does not change. However this event is sent before QGuiApplicationPrivate::processWindowScreenChangedEvent has had time to change the geometry, and might cause a problem in QMenu Amends f3a4b4258f2d207b5a8e73d62822a3afe1bf8a72. Task-number: QTBUG-59484 Change-Id: Ie4ceedcb0754613cf239ae86b225c4139b70d0cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>