summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QString::section: scope a variable betterMarc Mutz2015-04-051-2/+1
| | | | | | | Improves code clarity. Change-Id: If77eb644b1505c84783c907333526a4f08bb75a9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Optimize QString::section(QString)Marc Mutz2015-04-051-4/+3
| | | | | | | | | | | | The port from split() to splitRef() speeds up typical section() calls (where the separator is included) by ca. 1/3. The complete truth includes that section() calls where the separator is not found seem to have gotten twice slower. But that's a corner-case. Change-Id: I7e957cb65fccfd095ac522d523aef3464425e4e4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add Q_DECL_RELAXED_CONSTEXPR to QCharOlivier Goffart2015-04-051-3/+3
| | | | | Change-Id: I7c5a951bcd952ce5c1aaa62e107a800d49038f22 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QChar: plaster API with Q_DECL_NOTHROWMarc Mutz2015-04-052-137/+137
| | | | | | | | | | | | | | | This is mostly straight-forward, but some things are worth noting: 1. Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. 2. The decomposition() functions, returning a QString, can throw (bad_alloc). Consequently, they're not marked nothrow. they're the only ones. Change-Id: Iae50283aaa2d0596a265b7e2652c9fb04cedc706 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QChar: move definitions of inline methods into the class bodyMarc Mutz2015-04-051-48/+31
| | | | | | | | | | | | | | | | | | This hopefully prevents buggy compilers from choking on the definitions outside the class as inconsistent, even though they are consistent. Also helps developers, as the rather lengthy attribute lists for C++11 functions does not need to be repeated. This is in preparation of plastering the QChar API with Q_DECL_NOTHROW. I had to keep operator== and operator< outside the class because Clang on OS X 10 didn't find it when called with types implicitly convertible to QChar. Change-Id: I8bd634bc756d1bf5d208d7a2ce7e7ded73c4ce56 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray: add {const_,reverse_iterator}, {c,}r{begin,end}()Marc Mutz2015-04-052-0/+69
| | | | | | | | | [ChangeLog][QtCore][QVarLengthArray] Added rbegin(), crbegin(), rend(), crend(), and reverse_iterator and const_reverse_iterator typedefs. Task-number: QTBUG-25919 Change-Id: Ifda5d420802a3594c3181f54036279f16a7da16e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray: add relational operators <,<=,>,>=Marc Mutz2015-04-052-0/+78
| | | | | | | | | | std::vector has them, too. [ChangeLog][QtCore][QVarLengthArray] Added relational operators <, <=, >, >= if the element type supports operator<. Change-Id: I69e16d361fd4738a56b292ebfa78316d28871eda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: add {const_,reverse_iterator}, {c,}r{begin,end}()Marc Mutz2015-04-052-0/+86
| | | | | | | | | [ChangeLog][QtCore][QList] Added rbegin(), crbegin(), rend(), crend(), and reverse_iterator and const_reverse_iterator typedefs. Task-number: QTBUG-25919 Change-Id: Icce870c22931e68cdcedd1519651bfa374ac44af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: add relational operators <,<=,>,>=Marc Mutz2015-04-052-0/+78
| | | | | | | | | | std::vector has them, too. [ChangeLog][QtCore][QList] Added relational operators <, <=, >, >= if the element type supports operator<. Change-Id: Id2bd905e92c0365ad9f439d49908045c8df309c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize QString::section(QReg*Exp*)Marc Mutz2015-04-021-6/+6
| | | | | | | | | | | | | | Instead of creating lots of temporary QString objects, use QStringRefs. Together with the two other (micro) optimizations before, this speeds up section() by up to 2x (section_regex(IPv6)). No test has become slower. Change-Id: I514667004f82ddc1518fe3ee699ec5fbf96bb82f Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add missing QString::prepend(QStringRef)/(const QChar*,int) overloadsMarc Mutz2015-04-022-0/+18
| | | | | | | | | | | QString::append(QStringRef) exists, and so should prepend(). QString::append(const QChar *,int) exists, and so should prepend(). [ChangeLog][QtCore][QString] Added prepend(QStringRef) and prepent(const QChar *, int) overloads. Change-Id: I3eca41045f7c481be473507e23e92690f3ed7ba3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add QString::insert() overloads for QStringRef, const char*, QByteArrayMarc Mutz2015-04-022-0/+53
| | | | | | | | | | | | The corresponding QString::append() overloads exists, and so should insert(). [ChangeLog][QtCore][QString] Added insert(int, QStringRef), insert(int, const char*) and insert(int, QByteArray). Change-Id: I1cf43fe8908319e2a57415945718b72e69ca0fb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* QString: preserve embedded NULs when converting from QByteArrayMarc Mutz2015-04-021-17/+17
| | | | | | | | | | | | | | | Unearthed an off-by-one error in a QByteArray::fromRawData() call in tst_qtextdocumentfragment. Fixed by porting to QStringLiteral. [ChangeLog][Important Behavior Changes] All conversions from QByteArray to QString now preserve embedded NULs. This is done in order to provide a faster conversion from QByteArray to QString that does not involve a call to strlen. If you need the old behavior, convert from QByteArray::constData() instead. If you are porting from Qt 4, we suggest to make your source compile with QT_NO_CAST_FROM_BYTEARRAY before porting to Qt 5. Change-Id: Ibca40f503920fee6f3a5f0d74a04b38b8849796f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString::from{Utf8,Latin1,Local8Bit}(QByteArray): preserve nullness of argumentMarc Mutz2015-04-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, calling these functions with a null QByteArray will return a non-null QString because QByteArray::data() never returns nullptr. This behavior leads to inconsistencies between QString::append overloads, in particular the QByteArray vs. all others (null + null test always returns a null QString, except for the QByteArray overload before this change). It also is inconsistent with the const char* overloads of these methods, which explicitly preserve nullness (as verified by test cases). Fixed by an explicit check for nullness and return of null QString. Alternative would have been to check for nullness and pass nullptr instead of ba.data() to the _helper() functions, which do the correct thing in that case. But since we'd have the check anyway and with the chosen strategy we can avoid a call to a non-inline method, I opted against that. [ChangeLog][QtCore][QString] fromLatin1(), fromAscii(), fromUtf8() and fromLocal8Bit() now return a null QString when called with a null QByteArray. Change-Id: I5f2c0bad27fb73c7d535085af0271823bf6ed1da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVector: add {const_,}reverse_iterator, {c,}r{begin,end}()Marc Mutz2015-04-022-0/+86
| | | | | | | | | | | [ChangeLog][QtCore][QVector] Added rbegin(), crbegin(), rend(), crend(), and reverse_iterator and const_reverse_iterator typedefs. Task-number: QTBUG-25919 Change-Id: I8dea52a08e7b1a4442e034c22b83be4d25dc2303 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVector: add relational operators <,<=,>,>=Marc Mutz2015-04-022-0/+78
| | | | | | | | | | | std::vector has them, too. [ChangeLog][QtCore][QVector] Added relational operators <, <=, >, >= if the element type supports operator<. Change-Id: I0bcb22dfcc43cb0362f17b4e06154ce18646580a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Hurd: Implement QStorageInfo for HurdPino Toscano2015-04-021-4/+5
| | | | | | | | | | | | | | Make use of the Linux implementation for Hurd as well, as the mntent API is available there too (including getmntent_r, specific to GNU libc). Since PATH_MAX is not available on Hurd, and the current bufferSize is a lot more larger than it is needed, restrict bufferSize to 1024 bytes, which should be enough to cover 3 paths in mtab and it is usually used also in other projects. Change-Id: Ied43be2ab1eb95b48eb9f55a92064e7549efaefd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-0126-12158/+13568
|\ | | | | | | | | | | | | | | Conflicts: src/testlib/qtestblacklist.cpp src/widgets/accessible/qaccessiblewidgets.cpp Change-Id: If032adb9296428f62384ed835dbf41ee7a0b886c
| * Make Creator happy with qobjectdefs_impl.h parsingThiago Macieira2015-03-311-0/+1
| | | | | | | | | | | | | | This is just so the Q_COMPILER_xxx macros get defined properly. Change-Id: Iee8cbc07c4434ce9b560ffff13d066aa0a8671cc Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Use Q_NULLPTR for the null pointers used in macrosThiago Macieira2015-03-302-4/+4
| | | | | | | | | | | | | | | | | | User code should build with -Werror=zero-as-null-pointer-constant Task-number: QTBUG-45291 Change-Id: Iee8cbc07c4434ce9b560ffff13d0031979b4c2fe Reviewed-by: Matthew Woehlke <mw_triad@users.sourceforge.net> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Fix invalid characters count in QBig5hkscsCodec::convertFromUnicode()Maks Naumov2015-03-301-0/+1
| | | | | | | | | | | | | | Change-Id: I3b06361f93e7ab6a3336b2c432e0a163a34ccb43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Android: Only take ownership of threads we explicitly attach to.Christian Strømme2015-03-301-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we would take ownership of all threads when attempting to attach it to the VM, regardless if it was already attached or not, to avoid expensive re-attachments in our own code. The downside of this approach is that we might hijack threads the user wants to control themselves, and the later detach the thread while it still in use, e.g., after the QApplication instance is destroyed. This change does not add any infrastructure to enable more advanced management of attached threads, so threads might still be hijacked if the user make a call directly or indirectly through the QJNI API's on a thread that's not attached. Task-number: QTBUG-45110 Change-Id: I30f7faa2d8c2c35151e2ac8875ebf839bcd6c7c6 Reviewed-by: Sergey Galin <s.galin@2gis.ru> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * QItemSelectionModel: Make selectedIndexes a Q_PROPERTY.Stephen Kelly2015-03-272-1/+7
| | | | | | | | | | | | | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~124 (Make the QItemSelectionModel::selection a property., 2015-02-25), this should be a property instead of a Q_INVOKABLE so that it can participate in persistent bindings. Change-Id: Ib9a7900dfa3acbd6f9f7df7b6f00deb6e05c3937 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Add QT_Q_FLAG for Qt::MouseEventFlag.Friedemann Kleint2015-03-271-0/+1
| | | | | | | | | | | | | | Enable formatting it in debug streaming operators. Change-Id: I92efb70471653bbd4d91588f333ee132b392bf0c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Re-generate the time zones database from CLDR v.27Konstantin Ritt2015-03-271-954/+974
| | | | | | | | | | | | | | [ChangeLog][QtCore] QTimeZone data updated to CLDR v.27 Change-Id: Ic25229d86ac4752ed70f5a729fd33c1a837241dc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix time offset for several time zonesKonstantin Ritt2015-03-271-6/+6
| | | | | | | | | | | | | | They are in UTC-03:00, not in UTC+03:00 (just a C&P typo). Change-Id: Ib342b65967404b8756c62953258b17421b9245af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Update CLDR to v27Konstantin Ritt2015-03-274-4519/+4952
| | | | | | | | | | | | | | | | | | | | | | | | | | + A bunch of fixes in the locale data + New scripts from Unicode 7.0 + New locales - Some locales disappeared (aa_DJ, aa_ER, st_LS, ss_SZ, swc_CD, tn_BW) - Some locales lost their contents (i.e. en_Dsrt_US) [ChangeLog][QtCore] QLocale data updated to CLDR v.27 Change-Id: Iba8c7884f8087e577cbb25a8fc106dd7bd3ebb5d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * [QLocaleData] Extract defaultContent localesKonstantin Ritt2015-03-271-1795/+1822
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds some locales missing in the common/main/ directory, namely: bss_CM, cch_NG, dv_MV, gaa_GH, gez_ET, ha_Arab_NG, iu_Cans_CA, kaj_NG, kcg_NG, kpe_LR, ku_Latn_TR, mi_NZ, ms_Arab_MY, mn_Mong_CN, nds_DE, ny_MW, oc_FR, sa_IN, sid_ET, tk_Latn_TM, trv_TW, tt_RU, ug_Arab_CN, wa_BE, wo_Latn_SN See http://www.unicode.org/reports/tr35/tr35-info.html#Default_Content for more info. Change-Id: I6b3082d370a21da64fbd5e72ab6344e1d7a6a3c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Re-generate Unicode data tablesKonstantin Ritt2015-03-272-6294/+7321
| | | | | | | | | | Change-Id: I289537377f37c36f88de9662bbb7ad108bdc9383 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Update Unicode data up to v7.0Konstantin Ritt2015-03-273-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Two newly adopted currency symbols: the Azerbaijan manat and the Russia ruble * Pictographic symbols (including many emoji), geometric symbols, arrows, and ornaments originating from the Wingdings and Webdings sets * Twenty-three new lesser-used and historic scripts extending support for written languages of North America, China, India, other Asian countries, and Africa * Letters used in Teuthonista and other transcriptional systems, and a new notational set, Duployan For more details, see http://www.unicode.org/versions/Unicode7.0.0/ The Properties struct's .*Diff members were narrowed down to signed 15 bits and the unicodeVersion has been expanded to 8 bits. [ChangeLog][QtCore] Unicode data updated to v.7.0 Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Add Qt::WindowFlag to signal that maximizing should cover full screen geometryTor Arne Vestbø2015-03-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally when maximizing a window it will cover the available geometry of the screen, as represented by QScreen::availableGeometry(), which typically excludes status/menu bars and application launchers. On some platforms it may still be possible to place windows in the areas of the screen that are outside of the available geometry, but this will result in the window being partially covered by (possibly) transparent system UIs. The new flag allows the user to specify that when maximizing the window it should try to cover as much as possible of the screen geometry (in contrast to going full screen, which would typically hide any system UIs). For iOS this is a common use-case, as the status bar is transparent, and the user-interface guidelines for iOS7 and up recommend taking advantage of the full screen space, while keeping any user-interaction elements still inside the available geometry of the screen. Change-Id: I86d7fc937916d9cae245f7a3f9ae46abd92cdd29 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * QDateTime: remove unused parameter from localMSecsToEpochMSecs()Marc Mutz2015-03-261-10/+4
| | | | | | | | | | | | | | | | ...a namespace-level static function. The ok parameter was never set by any caller. Change-Id: I668f78fe198f09fb0a9a52c10c8dea2fab070653 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QDate: further optimize toString()Marc Mutz2015-03-261-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | Factor the TextDate and ISODate legs into separate functions and replace a chain of QString::arg() with QStringBuilder. Saves 76B in text size. More importantly, restores (N)RVO for these code paths. Change-Id: I8b99bb672f5a4b5506d53487eca189d48b4025e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove extra semi-colons: clang doesn't like itThiago Macieira2015-03-261-8/+8
| | | | | | | | | | | | | | qdebug.h:373:81: error: extra ';' outside of a function is a C++11 extension [-Werror,-Wc++11-extra-semi] Change-Id: Iee8cbc07c4434ce9b560ffff13cb759805b64dfc Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * Update strtoll and strtoull from upstream FreeBSDThiago Macieira2015-03-262-215/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There appears to be at least one fix, related to sign- or zero-extension in the call to isspace(). So it's a good idea to update again. This also brings the behavior to match strtoll and strtoull on Linux, including the fact that strtoull will parse negative numbers. For that reason, qstrtoll and qstrtoull are now wrappers that try and keep the behavior that we used to have. This update also changes the code from a 4-clause BSD license (bad) to a 3-clause BSD license (good). Change-Id: I73b01b02ebd1551bf924599d52284ad25cc1def0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Make QAbstractProxyModel API invokable.Stephen Kelly2015-03-251-4/+4
| | | | | | | | | | | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~123 (Make some QAbstractItemModel API invokable, 2015-02-25) Change-Id: If0bf3a756ab1031f906c5bf9c823aafae4c3873c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
| * QAbstractItemModel: Make the match() method Q_INVOKABLEStephen Kelly2015-03-251-4/+4
| | | | | | | | | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~123 (Make some QAbstractItemModel API invokable, 2015-02-25) Change-Id: I77c72f7bb856a1eee966b45950384fe03a8eaac6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * QDateTimePrivate: replace out parameters with return-by-value in getDateTime()Marc Mutz2015-03-252-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | Compilers don't like out parameters. Effects on Linux GCC 4.9 stripped release builds: text -584B data +-0B relocs +-0 Change-Id: Ie00c89b9edaced3a6adeb2707734c8f5238e67c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QDateTime: prevent aggressive inliningMarc Mutz2015-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function getDateFromJulianDay() is simple arithmetic, but still ~400 bytes in executable size. Yet GCC inlines this everywhere I looked, which makes some sense, as different users of the class only use parts of the return value and the optimizer has a field day removing all that dead code. However, that function has only one conditional, so presumably it executes at full pipeline speed and it doesn't matter that it calculates too much in some cases. More important is to use the I-cache more conservatively. That's what not inlining the function achieves. The function returns its result in registers and doesn't spill registers when called (at least on AMD64), so the effect on runtime should be negligible. Effects on Linux GCC 4.9 stripped release builds: text -1536B data +-0B relocs +-0 Change-Id: Ia16838102d29ad67ee5efdc8b7b0a26f2f921df1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QTime: optimize toString()Marc Mutz2015-03-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a QString::arg() cascade, which creates tons of temporaries, use good 'ol sprintf(). Effects on Linux GCC 4.9 stripped release builds: text -308B data +-0B relocs +-0 Change-Id: I348577491d1399b5040f7ed9e9f6b111a9528e5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Micro-optimize QDate::{long,short}{Day,Month}Name()Marc Mutz2015-03-251-32/+28
| | | | | | | | | | | | | | | | | | Save one return statement per function. I don't see why the compiler can't fuse these itself, but apparently it cannot, since this transformation saves 72B in text size. Change-Id: I3a661456554bf451ed53110ad546946ff7b84ec5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QDate: don't spend code size covering the impossible caseMarc Mutz2015-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | All other similar functions in QDate just return an empty string in case none of the switch labels would trigger (which would now cause a compiler warning, after removing the default case label), so do that here, too. Saves 44B in text size. Change-Id: I80ee4975082706adcd15fe89511d08c67e149324 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QDate: remove some useless default case labelsMarc Mutz2015-03-251-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | They're pure whitespace, since in each case there is a fallback after the switch, anyway, and their presence prevents compiler warnings about unhandled enumeration values in switch statements, which is nice-to-have, when adding to the enum, eventually. No change in executable code size. Change-Id: I77aecaeff990601f957ec9ee827eff5ead25aaa1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Adds qFindFirstSetBit() and qFindLastSetBit().Glen Mabey2015-03-282-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | Two new function families have been added: qFindFirstSetBit() and qFindLastSetBit() for a variety of integer sizes. Fast implementations are included for most platforms. [ChangeLog][QtCore][QtAlgorithms] Added qFindFirstSetBit() and qFindLastSetBit(). Change-Id: I89d9d1637ea26070aee5a60be95be1b51bfc84dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-03-2424-59/+80
|\| | | | | | | Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
| * QVarLengthArray: Do not require operator!= for element comparisonKai Koehne2015-03-231-5/+4
| | | | | | | | | | | | | | | | | | | | The documentation claims that operator== is needed, not operator!=. While at it, we can also replace the loop with std::equal, which might even allow STL implementations to choose a hand-optimized version of the algorithm for C++ builtin types ... Change-Id: I988b326d6af3b767526952e303468e18ff6594f9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QVarLengthArray: Add initializer_list constructorKai Koehne2015-03-232-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement an initializer_list constructor, which was probably just forgotten so far. Technically this is a SC incompatible change, since QVarLengthArray<int> array = {10}; will now create an array with one element 10, instead of an empty array with a reserved size of 10. Anyhow, keeping the inconsistency with the STL / other Qt containers here would certainly do more harm than good in the long run. Task-number: QTBUG-45047 Change-Id: I4675880f93e141181250939942fa32300916b0e3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Report a correct Unicode version used by QtKonstantin Ritt2015-03-232-3/+3
| | | | | | | | | | | | | | The version bump was forgotten in edfce46a6c0406af749ca7ef659df6315e36cd5d Change-Id: I99501bb314baab68f037417db4b3b14e11f2de02 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Build bundled PCRE copy as qt_helper_libKonstantin Ritt2015-03-201-6/+2
| | | | | | | | | | | | | | We already have an infrastructure for that. Change-Id: I9110b74dcf7f93362586687da6f112e72cb663a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Introduce icu_dependency.priKonstantin Ritt2015-03-201-13/+2
| | | | | | | | | | | | | | Simply to hide the magic bahind the scenes. Change-Id: I69a159eb14712e68117f10e78745bdfbad46b6f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>