summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QUrlQuery: fix a very expensive always-true checkMarc Mutz2015-12-301-1/+1
| | | | | | | | | | | | | In a non-const function, if (d), d being a QSharedDataPointer, will resolve to if(d.data()), which detaches and returns a pointer to an unshared copy of the data. Thus, the test if (d) is always true. Fix by explicit use of constData(), as in other QUrlQuery functions. Change-Id: Ib926abdcdb069d69e34c3202c4cf451b7fc6a329 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* moc: replace a QStack<QByteArray> with std::stack<QByteArray, QByteArrayList>Marc Mutz2015-12-301-2/+3
| | | | | | | | | | | | | | | | A QByteArrayList is almost as efficient as a QVector<QByteArray>. More importantly, the QByteArrayList case can share code with the myriad of other QByteArrayList users, in particular because std::stack is but the thinnest of wrappers around its underlying container. For moc, saves almost 1KiB in text size on optimized GCC 4.9 Linux AMD64 builds. For qdbuscpp2xml, which re-uses moc code, saves ~1.6KiB. Change-Id: I861e92b3c79e47e0ce892ccf54c9041182aaf212 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QComboBox: use NRVO from QAIM::match() and prevent a detach attemptMarc Mutz2015-12-301-2/+1
| | | | | | | | | | | | Receiving the QStringList return value through RVO instead of move-assigning it saves 48b in text size on optimized GCC 4.9 Linux AMD 64 builds. Marking the QStringList const saves another 112b because the following first() doesn't need to attempt a detach. Change-Id: If6f25399e80de12114ce41c557bff6ee8c24938b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add qHash(std::pair)Marc Mutz2015-12-302-0/+26
| | | | | | | | | | | We already include <utility> in <qglobal.h>, so we might as well provide a qHash() overload for std::pair. [ChangeLog][QtCore] Added qHash(std::pair), defined in <QHashFunctions>. Change-Id: I0f61c513e82e05ce9d2e56bcf18f3be9e2da4da9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Optimize string building in QCommandLineParserPrivate::helpText()Marc Mutz2015-12-291-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't detach QCoreApplication::arguments() by calling first(), call constFirst() - Use QString foo; foo += initial; instead of QString foo = initial; where 'foo' receives more appends later (does not force an initial capacity that is known to be too small). - Use QStringBuilder more - Don't use QStringLiteral in QStringBuilder expressions - Reserve optionNameList. Its max. size is known ahead of time. - Don't create optionNameStrings for hidden options. The result was never used, they just served as placeholders for the lock-step iteration that followed and wrapped the text. - Don't create a QStringList to join(), append to the result string directly. - Cache the return value of option.valueName(). Not only is this faster, it also saves more than 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Id1d88f3c36a521ac71f3a7436810ed31319077ae Reviewed-by: David Faure <david.faure@kdab.com>
* QTimeZone: don't iterate over QHash::keys()Marc Mutz2015-12-291-3/+3
| | | | | | | | | | | | ... iterate over the hash directly. Prevents hash lookups and the creation of a temporary QList. Saves over 376b in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I7f1a22da33b94bc91bec89f62c471f8279a5d702 Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
* QMimeDatabase: return a sorted list from d->mimeTypesForFileName()Marc Mutz2015-12-291-4/+2
| | | | | | | | | | | | All but one of the callers sorted the list in at least one code path, with code paths that use the list unsorted looking suspiciously non-deterministic. The one caller that doesn't sort the list doesn't use it at all (but uses the out parameter, which none of the other callers do, suggesting that the function be split into two at some point). Change-Id: I178c1476919e4877ef4f4a3cc8934dbd04bd7a58 Reviewed-by: David Faure <david.faure@kdab.com>
* QLoggingRegistry: don't iterate over QHash::keys()Marc Mutz2015-12-281-4/+4
| | | | | | | | | | | ... but use the new key_iterators instead. Saves creating a temporary QList just to iterate over it and ~1.3KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Id5223fc5fcb4a4e7c012718c1bb2674b8ea0439d Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
* QTextStream: use new QString::resize(int, QChar) for paddingMarc Mutz2015-12-282-20/+26
| | | | | Change-Id: I17c90ea32614c45f038f5f3386749dfa74bad438 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QString: add resize(int, QChar)Marc Mutz2015-12-283-4/+22
| | | | | | | | | | This will be used in QTextStream to speed up padding processing. [ChangeLog][QtCore][QString] Added resize(int, QChar) overload. Change-Id: Id51f8cdacb167310157100b05cacf20e9a5d2716 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDBusIntegrator: fix quadratic behaviorMarc Mutz2015-12-271-8/+7
| | | | | | | | | | Calling QVector::erase(it) in a loop consitutes quadratic behavior (O(N) function called O(N) times). Fix by using std::remove_if(), which is linear. Change-Id: I39c11231d604bc2d9506427bc3411b71d71b5569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix double close.Frank Meerkoetter2015-12-261-3/+1
| | | | | | | | resetTty() already does close the fd. Fixes coverity CID89074. Change-Id: I2d5fe9bf40b03ed5c249713c64f1dc2ae58ea84b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QGLShaderProgram: replace a Q_FOREACH with qDeleteAll()Marc Mutz2015-12-261-4/+2
| | | | | | Change-Id: I81a7a3accdcbd3229aeb1dc6fcda5b4ae5cd1a7b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QGLShaderProgram: hoist some constant expressions out of a loopMarc Mutz2015-12-261-5/+6
| | | | | | | | | | | d->programGuard and its ID don't change when calling a GL function, so check them only once, before entering the loop, instead of once per iteration. Cache d->programGuard->id(). Change-Id: I398da7a76823b2eb854b7b9d5af512adf9969fc9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QCommonStyle: Multiple icon sizes for more Windows stock iconsFrank Richter2015-12-241-7/+5
| | | | | Change-Id: I842270b922e019bdef0bb65efaf4a08db10c511e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QWindowsTheme: Preferably obtain stock pixmaps via SHGetStockIconInfoFrank Richter2015-12-241-12/+41
| | | | | Change-Id: I5dd958ce572a34f5ccf0d9df2a93486cc68c527b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QtPrintSupport: eradicate all Q_FOREACH loopsMarc Mutz2015-12-236-16/+21
| | | | | | | | Saves more than 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds, iow: ~0.5% of the total library size. Change-Id: I84e1dc208da13eefdf1573c9b7ac7c9d76a7f5c7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QGraphicsView: replace some Q_FOREACH loops over const locals with C++11 ↵Marc Mutz2015-12-233-19/+19
| | | | | | | | | | | | | | | | | | | | | range-for This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that cannot happen, because all containers are local and marked as const (either by this patch or before). Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves ~1.8KiB of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I5c58658937ac4323594161bf94a2fce3c5667914 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QGraphicsView: replace some Q_FOREACH loops over rvalues with C++11 range-forMarc Mutz2015-12-236-45/+78
| | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that trivially cannot happen, because all containers are marked as const when being assigned the rvalues previously found on the rhs of the Q_FOREACH. The new code thus does exactly what the old code did: take a const copy, then iterate over it. Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves almost 4K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: Ida868b77d078cbfa0516d17e98e6f0a86fcdb7a3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix resource leak/fix broken file open checkFrank Meerkoetter2015-12-221-2/+4
| | | | | | | | | | | Also marking the error path as unlikely while I am on it. Fixes coverity CID154482. Change-Id: I069fa7753e364ff1b8a4449b7008dfa8aee73de5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Optimize a code path in QGraphicsScenePrivate::cancelGesturesForChildren()Marc Mutz2015-12-221-19/+20
| | | | | | | | | | | | | | | | | | | | | | | If ev.isAccepted(), since list is gestures.toList(), the first foreach loop would clear 'gestures', one item at a time. The second foreach loop would then not execute at all. Make this case clearer by not executing either loop if ev.isAccepted(). Make it more performant by not iterating twice, but once, simply skipping those gestures in the second (remaining) loop which would have been removed by the first one. Also iterate over the equivalent QList instead of the QSet, because the former is way more efficient. Text size savings are present, but minimal. The runtime savings are signficant, of course. Change-Id: I3d5bfe99c5d3fcbe4c98816577846551c632f315 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix OSX namespace build.Erik Verbruggen2015-12-221-1/+1
| | | | | | | Again. Change-Id: I76956dce609693da2adad7f809a5ff0aadb61f98 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QGraphicsSceneBspTreeIndex: simplify the code of items()Marc Mutz2015-12-221-16/+13
| | | | | | | | | | | | | | | | | | | | | | The old code dealt with a lot of special cases, probably to avoid detaching. But the only case where deep copies are avoided is if a) there're no freeItemIndexes b) there're no unindexedItems c) the sort order is neither AcendingOrder nor DescendingOrder, which is funny, since those are the only two values for Qt::SortOrder. The code checks for SortOrder(-1), but nowhere in Qt is such a sort order created. Ergo, the deep copy was _never_ avoided. So simplify the code by always building the result list from the two input lists by copying all non-null items. Saves over 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I8e739fb78896b2ad0bec45d05e86a76fe1ede04a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QGraphicsScene: don't build a temporary QList just to iterate over itMarc Mutz2015-12-221-7/+4
| | | | | | | Iterate over the original list instead. Change-Id: I7be154c0e19074033df6f6e01f68d21a8904d2ee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QGraphicsScene: prevent lots of detaching d/t editing of copiesMarc Mutz2015-12-222-4/+4
| | | | | | | | | | | | | | | | | | | QTouchEvent::touchPoints() returns a const-&, but the old code took a copy, over which it then iterated, modifying the touch points, causing (necessary) detaches of both the list and the touch points. Befriend QTouchEvent and modify the list in-place, avoiding all detaches in the likely case that QTouchPoint contains the only copy of the touch point list. This is all the more important as the function is called once for every item-under-mouse in sendTouchBeginEvent(). Port to C++11 range-for as a drive-by. Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Qt5CoreMacros: Sync with CMake project counterpartKevin Funk2015-12-211-4/+4
| | | | | | | | | | | | | | | | | | | Port of CMake commits: commit 2622bc3f65162bf6d6cb5838da6999f8b5ca75cf Author: Rolf Eike Beer <eike@sf-mail.de> Date: Sun Apr 6 21:30:00 2014 +0200 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex) commit 7beba98652212c7a44f291b51dd03681e5193c49 Author: Robert Maynard <robert.maynard@kitware.com> Date: Thu Apr 3 11:27:58 2014 -0400 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function Change-Id: I5b928d114adb393ed9370163609311b7486e4a36 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QListViewItem: Remove pointless copy ctorSérgio Martins2015-12-211-3/+0
| | | | | | | Fixes static analyzer warning. Change-Id: I4f1bec1da5b2e90a1aeae699a9e3e329f1cc9199 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtWidgets: de-inline some more virtual dtorsMarc Mutz2015-12-216-1/+24
| | | | | | | | | | | | | | | | | | | | Helps pinning the vtable to a single TU, which can prevent false negative RTTI (incl. dynamic_cast and catch()). But mostly because it's rather pointless to have dtors of polymophic function inline. Most of the time, the code will be called through the vtable indirection, anyway (which also means that an out-of-line copy of the code needs to exist in any case). The inline method will only be used when the compiler can prove the dynamic type of an object. Saves ~1.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Ic4ce96da559252c8abc29d880530c84035db2306 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets: de-inline some Private ctorsMarc Mutz2015-12-216-97/+113
| | | | | | | | | | | | Saves ~7KiB text size on optimized GCC 4.9 Linux AMD64 builds. Drive-by fix: properly init QGraphicsProxyWidgetPrivate::proxyIsGivingFocus. Change-Id: Iac923f0f2a9cdc0349f706c5760883a210be36f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Don't re-evaluate QTextCharFormat::font() all the time in ↵Marc Mutz2015-12-211-5/+7
| | | | | | | | | | QAccessibleTextWidget::attributes() Saves ~100b in text size. Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Boris Dušek <me@dusek.me>
* Remove a use of a QMap in QAccessibleTextWidget::attributes()Marc Mutz2015-12-211-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMap<QByteArray, QString> was only used to hold key/value pairs until they were serialized into a QString at the end of the function. Serialize into QString directly instead, dropping the temporary QMap. The problem is that we'd like to keep the line formatting central while at the same time harnessing the power of QStringBuilder. This is possible with a templated function with an input/output parameter: format_attr(QString &result, const char *key, T &&value) format_attr(result, text-foo, str + str2 + str3); Or with return type deduction: formatted(const char *key, T &&value) -> decltype((expr)) { return expr; } result += formatted(text-foo, str + str2 + str3); I don't like out parameters, and we can't rely on auto return type deduction, yet, so I opted for a miniature expression template solution that can only match the expression attr[key] = value; where 'key' is a const char* and 'value' can be anything that QStringBuilder supports. This allows to keep the syntax of a map while at the same time serializing to QString immediately. The only behavioral difference to the old code is that the attributes are no longer sorted, but order doesn't matter. Saves more than 10KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QLineEdit: hold SideWidgetEntry in std::vector, not QVectorMarc Mutz2015-12-213-14/+22
| | | | | | | | | | | | | | | | | | | This is private implementation, so there's no BC issue here. The collections ported here also do not benefit from CoW, because they are never copied. Adapt to STL API and replace foreach with C++11 range-for loops, because the former deep-copies STL containers. Also replace index-based for loops with C++11 range-for, to evade the int/size_t problem on MSVC. Saves a bit more than 1KiB in text size on optimized GCC 4.9 Linux AMD64 builds, not all of which can be attributed to the ports to range-for. Change-Id: I240030180bd1b2ca40c002b03ab72319a99a87c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Make use of new QHash::erase(const_iterator) overloadMarc Mutz2015-12-1910-33/+31
| | | | | | | | | | Drive-by changes: - use auto for iterators - add Q_UNLIKELY for conditions leading to a qWarning etc Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
* QHash/QSet: add erase(const_iterator)Marc Mutz2015-12-194-14/+43
| | | | | | | | | | | | This is the signature the functions have in C++11. For the std containers, this is just convenience, but for Qt containers with their implicit sharing problem, the combination of erase() with constFind() can delay a detach until absolutely necessary. [ChangeLog][QtCore][QHash/QSet] Added erase(const_iterator). Change-Id: I2fc841c664cd7515b0f56fd7210fcd17c37f9014 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix linux-clang build.Erik Verbruggen2015-12-191-0/+1
| | | | | | | | | Clang's integrated assembler does not accept this assembler syntax, so tell it to only run the preprocessor, and pipe everything through the system assembler. Change-Id: I6bd884473e634837b47480546a1d1d8d62e7a2b6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix namespaced build on OSX.Erik Verbruggen2015-12-191-1/+1
| | | | | Change-Id: I1fc2195792eeea1addcb262aca37e59107a131c5 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Use qEnvironmentVariableIntValue() instead of qgetenv().toInt().Sérgio Martins2015-12-183-5/+5
| | | | | | | It's much faster. Change-Id: I55e0a23f9086fe2e7872e81dc0f5e10105ed124a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* De-duplicate QGraphicsItemPrivate vtableMarc Mutz2015-12-182-2/+8
| | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. Since QGraphicsItemPrivate is already exported, users of this class are unaffected by the change, and since it's private API, we don't need to avoid adding code to the out-of-line destructor until Qt 6. Also saves ~2.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Task-number: QTBUG-45582 Change-Id: Ibb404a43d5464e8e280ccebd5f95719852f5a986 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2015-12-1870-339/+831
|\
| * Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-1870-339/+831
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| | * Windows: Restore window geometry after normal->maximized->fullscreen->normal.Friedemann Kleint2015-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not save geometry when going from maximized->fullscreen - Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the maximized geometry is restored. - Add a test for Windows. Task-number: QTBUG-49709 Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * Windows: Clear key recorder when application becomes inactive.Friedemann Kleint2015-12-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | When keys are pressed and the application becomes inactive before they are released, the stored state becomes inconsistent. Task-number: QTBUG-49930 Change-Id: Ide86b1d9052df060f30f7c02b81a4f2ae15d28e7 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * Windows: fix fullscreen OpenGL window issues with an opt-in functionAndy Shaw2015-12-175-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows automatically disables DWM for opengl windows that have the exact dimensions of the primary screen. This causes numerous issues, such as menus and popups not showing up, and alt+tab misbehavior. Adding a one pixel border via WS_BORDER solves all of these issues. This is done by a QWindowsWindowFunctions to make it opt-in as turning it on can cause an unwanted change in the look of the window so it is up to the user to decide if they want this. [ChangeLog][Platform Specific Changes][Windows] Add a function to QWindowsWindowFunctions to enable working around a limitation with showing other top level windows when showing a fullscreen OpenGL based window. Task-number: QTBUG-41309 Task-number: QTBUG-41883 Task-number: QTBUG-42410 Change-Id: I8c5c785f5024737cd034b2b703671632a8102700 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Use Q_CONSTRUCTOR_FUNCTION instead of doing the same manuallyAllan Sandfeld Jensen2015-12-172-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | Use the macro we have that does exactly what we want without the boiler plate code. Change-Id: I25c67a71f83f91f50128c8a54033ee53ad28e88a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| | * iOS: Clear focusObject if first responder is set to nullMarkus Goetz2015-12-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | In certain cases we were still showing a cursor in a TextInput even though the keyboard was hidden programmatically. Change-Id: I48ebb6b8bc0382236b1ea5835e68eae48ece2b4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * iOS: Don't hide keyboard on "Done" button when focus object has changedMarkus Goetz2015-12-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the focus object changed programmatically for example to the next input field in a window, we want to keep the keyboard open. This strangely only worked if the inputs had different IM hints because this made the keyboard appear again. Change-Id: I52e66bb7d2ff97ae7084173769d9b5c2d0c549b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * iOS: notify application when edit menu is closedRichard Moe Gustavsen2015-12-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The edit menu will also close if the user taps outside it, not only when selecting a menu item. But we never caught this case, which left QMenu to belive that it was still open. Change-Id: Iae071b4fc5fdc44d7d05b4dd767042907e337957 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * iOS: include marked text when reporting IM textInRange and endOfDocumentRichard Moe Gustavsen2015-12-171-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [UITextInput textInRange] is sparsely documented, but it turns out that unconfirmed marked text should be seen as a part of the text document. This is different from Qt IM (ImSurroundingText), which handles marked text on the side. The reason we can assume this is that the range we are given as argument to textInRange exceeds the documents length when having marked text appended to the end, suggesting that it tries to read / verify the current marked text. In addition, keyboards like Japanese-Kana will not update and function correctly unless marked text is included. Note that the docs seems to imply that you cannot have marked text and text selection at the same time, unless the selection is contained within the marked text (using the dedicated selectedRange argument to setMarkedText). If this turns out to be incorrect, we might need to adjust the methods dealing with selection to also include marked text as well. Task-number: QTBUG-49946 Change-Id: Ifedd792ec66db435806f57fca157e1abbbf121a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * Android: Fix crash at exitBogDan Vatra2015-12-173-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay the exit call until Java part finishes the execution. We must be sure all the threads are stopped (hanged), when we call exit, otherwise java thread will try to use static vars that are freed by the qt thread. We also need to call exit from Qt thread, otherwise Qt will complain about it. Change-Id: Ia1e7a4d7d56c39d38313f040aab618ec5a68dfb6 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| | * QOpenGLTexture: fix the number of faces returned by faces()Giuseppe D'Angelo2015-12-161-0/+2
| | | | | | | | | | | | | | | Change-Id: I7bf08eee357fb9641ff9118edcf97809f98605b7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>