summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Shift positions for lineBreakTypeKonstantin Ritt2012-06-072-6/+8
| | | | | | | | | | | | | | | | | | | to keep them consistent with positions for all other flags. This changes the internal behavior so that attributes[0].lineBreakType now means "break opportunity at start of the text (before the first character in the string)" and is always assigned with HB_NoBreak to conform rule LB2 (see http://www.unicode.org/reports/tr14/#LB2). The current implementation is based on the sample implementation from tr14 that aimed to be as simple as possible rather than to be optimal. From now, we can use pieces of the attributes array "as is" without having to adjust some positions. Or we can analize some long text by chunks (e.g. paragraph by paragraph) and consume less memory. This introduces a minor overhead that will be eliminated shortly. Change-Id: Ic873a05a9d5203b1c3d5aff2e4445a3f034c4bd2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QTextBoundaryFinder: Consider soft hyphen as line breaking opportunityKonstantin Ritt2012-06-072-5/+11
| | | | | | | SoftHyphen enum value was added to specify such a boundary reason Change-Id: I4248909eed6ab8cbca419de4dcf9fe917620a158 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Set the whiteSpace flag outside the grapheme and the line breaking loopKonstantin Ritt2012-06-071-7/+21
| | | | | | | | | | | | | | | The white spaces determination doesn't belong to the text breaking algorithm. A proper breaking implementation shouldn't assume spaces are break opportunities (actually, space is allowed to be a grapheme base); However, the whiteSpace flag should never be checked alone while iterating over the text to find the space sequence; the grapheme boundaries should always be taken into account. This covers the SMP code points in UTF-16 text and graphemes that consist of a space followed with one or more grapheme extenders. This introduces a minor overhead that would be eliminated some later. Change-Id: Ic2cc7f485631fd0b436fc256ce112ded5f94fc07 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Deprecate the use of QWeakPointer to track QObjects.Stephen Kelly2012-06-073-52/+28
| | | | | | | | | | | | | | The main problem with using QWeakPointer to track QObjects is that it has API to convert to QSharedPointer, which is undefined behavior. There is no need to overload the meaning of QWeakPointer with QObject tracking. QPointer is more suitable and should be used instead. Because QPointer is implemented in terms of QWeakPointer, we need to add some overloads which are not deprecated. Change-Id: If0333e4800c9fd277629cc69185c9ca3e4e7e81d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expand the 'existing target guard' in generated CMake files.Stephen Kelly2012-06-071-4/+1
| | | | | | | | | | | | | | | | | | | | This way the target will be created and have its properties populated only one time. I tried wrapping the whole file in an 'include guard', but that broke the unit test in tests/auto/cmake/pass1 (and the qt5_use_module function), because the function causes the variables in the Config file to not exist outside of the scope (eg for include directories), and yet, Qt5${Module}_FOUND is still true even when the find_package was previously called in a function, so it is not found and processed again. The change in Qt5CoreConfigExtras.cmake does not need to be guarded as it is only ever included from Qt5CoreConfig. Change-Id: Iaa016563db5eb61294360ac9e003c9c923393d8c Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* get rid of "uninitialized member" gcc warningKonstantin Ritt2012-06-071-2/+1
| | | | | Change-Id: I486212829ec9309239645222e7f03f36ae4847f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Rename QSystemLocale::fallbackLocale() to QSystemLocale::fallbackUiLocale()Mike FABIAN2012-06-066-8/+8
| | | | | | | | | | Suggested by Oswald Buddenhagen. This function is about the (main) UI language, not about other locale features like number formatting etc. It not in the public API anymore in Qt 5.0 so it can be renamed. Change-Id: I2a23892c67e5813de4c0e57330749568777e9ee6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Check LANGUAGE as well in QSystemLocale::fallbackLocaleMike FABIAN2012-06-061-0/+13
| | | | | | | | | | | | Because QSystemLocale::fallbackLocale() is about UI languages, it makes sense to check LANGUAGE as well if appropriate. Adapt tst_qlocale.cpp accordingly. Suggested by Oswald Buddenhagen. Change-Id: Ib2c9674081809e3251be4e34456b05210eebc010 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use LC_MESSAGES instead of LC_NUMERIC in QSystemLocale::fallbackLocale()Mike FABIAN2012-06-061-3/+1
| | | | | | | | | | | | | | | | | commit b9790a04eeba664ecdf9ace24911094a71b5f0bd (https://codereview.qt-project.org/24304) introduced the problem that the country gets initialized from LC_NUMERIC and the language from LC_MESSAGES. For example, if LC_NUMERIC=ru_RU and LC_MESSAGE=fr_FR, then QLocale::system().name() returns "fr_RU". It is not nice to mix the values of two LC_ variables there. Therefore, revert this change and use LC_MESSAGES instead of LC_NUMERIC in QSystemLocale::fallbackLocale(). This was also suggested in the changelog of b9790a04 and it looks like a better way to fix the problem. Change-Id: I8fa6fec2b33e9f1f5a31c4b288503a658dad6d30 Reviewed-by: Denis Dzyubenko Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* statemachine: Make delayed event posting work from secondary threadKent Hansen2012-06-063-17/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | postDelayedEvent() and cancelDelayedEvent() are marked as thread-safe in the documentation. Unfortunately, they didn't actually work when called from another thread; they just produced some warnings: QObject::startTimer: timers cannot be started from another thread QObject::killTimer: timers cannot be stopped from another thread As the warnings indicate, the issue was that postDelayedEvent() (cancelDelayedEvent()) unconditionally called QObject::startTimer() (stopTimer()), i.e. without considering which thread the function was called from. If the function is called from a different thread, the actual starting/stopping of the associated timer is now done from the correct thread, by asynchronously calling a private slot on the state machine. This also means that the raw timer id can no longer be used as the id of the delayed event, since a valid event id must be returned before the timer has started. The state machine now manages those ids itself (using a QFreeList, just like startTimer() and killTimer() do), and also keeps a mapping from timer id to event id once the timer has been started. This is inherently more complex than before, but at least the API should work as advertised/intended now. Task-number: QTBUG-17975 Change-Id: I3a866d01dca23174c8841112af50b87141df0943 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fixed QJsonObject::find()Denis Dzyubenko2012-06-061-0/+1
| | | | | | | | | | The function returns mutable iterator on the object that can later be passed to e.g. erase(), hence it should detach() to be consistent with QJsonObject::begin() which also detaches. Change-Id: Id79e8e012fd5469e06b68fbc9eecb7c6848ce9c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* normalize the process arguments to Normalization Form D on macKonstantin Ritt2012-06-061-18/+6
| | | | | | | | | | QFile::encodeName() does this for us + simplifies the code a bit Change-Id: Id2ca2615e20408229dd021c26587fefd60365352 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove support for Qt 4 style pluginsLars Knoll2012-06-067-374/+26
| | | | | | | | | | The new plugin format allows us to avoid loading the plugins in all cases. Remove the old format, as we could get bad behavior with the old format if Qt would try to dlopen a Qt 4.x plugin. Change-Id: I2193e6874d6cca3c0b12298c2b9beb4105a42fd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update of the plugin documentationLars Knoll2012-06-062-27/+15
| | | | | | | | Moved the plugin overview from qtdoc to qtbase. Updated the docs to describe the new plugin mechanism. Change-Id: I1b92d5099aeaa3a166c1f7698176d811d47c3392 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove references to QtSharedPointer::InternalRefCountThiago Macieira2012-06-061-4/+0
| | | | | | | | | | | | | This class does not exist, is not needed and has never been published in a released version of Qt. It existed during the development of QSharedPointer, when internal reference counting (also known as intrusive counting) was a goal. That goal was abandoned when use with forward-declared classes was preferred. Change-Id: If3a5a29c07fc71e2001d6ba64b90ddd241ab8ae3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-055-5/+5
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QIODevice::seek() return false for sequential files.Mitch Curtis2012-06-051-7/+9
| | | | | | | Task-number: QTBUG-18173 Change-Id: Ie3a96d3a6f60995b8ba7823153778869d0c2dc58 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Expose the plugins meta data in the plugin loaderLars Knoll2012-06-052-0/+19
| | | | | | | | | add a metaData() method to QPluginLoader so that applications can query the plugins meta data without having to load the plugin. Change-Id: Ic3ebb35fd3c403926326e8dd1de4176b0c48dbef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QTemporaryFile::open() failing after remove().Mitch Curtis2012-06-051-1/+9
| | | | | | | | | | | | | If a QTemporaryFile is constructed using a template file path, the path is generated in QTemporaryFileEngine::open() and then filePathIsTemplate is set to false. If remove() and then open() are called on the same QTemporaryFile, the path is not regenerated. This change ensures that if the file path was generated, it will be generated again in the scenario above. Task-number: QTBUG-2557 Change-Id: I718ceb89daa9a9d46fdbe811fecc3d57d6dc08c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QString("inf").toFloat() return inf instead of zero.Mitch Curtis2012-06-051-2/+10
| | | | | | | | | | | Currently, QString::toFloat() returns 0 (and sets ok to false) if you try to convert "inf". This is because inf is greater than QT_MAX_FLOAT and there is currently no check to handle inf. Task-number: QTBUG-8629 Change-Id: I498daf4a7a6f880f928461fca628fcaf7d1d6d08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Rename QVector::realloc and QVector::free.Jędrzej Nowacki2012-06-051-13/+13
| | | | | | | | These names were confusing and conflicting with standard C memory management functions. Change-Id: I6efe20665d2ec7ad3e00f3a806cc1843a57374d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: Add accessors for program and arguments.Christian Kandeler2012-06-052-6/+30
| | | | | | | | Task-number: QTBUG-24550 Change-Id: I1ce26e584e39b0b58b1c9f78d8027b2479f2d92c Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QDeferredDeleteEventBradley T. Hughes2012-06-054-12/+38
| | | | | | | | | | | Use this to store the loop-level counter needed by QCoreApplication when determining when it is safe to delete an object. This removes the hack to hijack the QEvent::d pointer (even though the pointer is unused). Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow 24:00:00 for ISO dates in QDateTime::fromString().Mitch Curtis2012-06-051-2/+10
| | | | | | | | | | | ISO 8601 section 4.2.3 states that "The end of one calendar day [24:00] coincides with [00:00] at the start of the next calendar day", so fromString() was updated to account for this. Task-number: QTBUG-25387 Change-Id: I391db0da755dbc822ba0820c302a2c10391e1f3b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enter initial state before QStateMachine::started() is emittedKent Hansen2012-06-041-1/+3
| | | | | | | | | | | | | | | The documentation says that started() "is emitted when the state machine has entered its initial state", but the implementation didn't adhere to that. The consequence is that if you e.g. emitted a signal from a slot connected to started(), and that signal was used by a transition from the initial state, the signal would effectively get ignored and the state machine would remain in the initial state. Task-number: QTBUG-24307 Change-Id: Ibbeb627d517eaff821d88e256a949eacf6aae350 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix typos in QState sorting functionsKent Hansen2012-06-041-4/+4
| | | | | | | | | | | | | | A QObject can't be a child of itself, so the comparison always returned false. In practice, this was causing the entry/exit order of parallel states to be random. QObject::children() is documented to contain the children in the order in which they were added, so this fix actually achieves deterministic behavior. Task-number: QTBUG-25959 Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix endian detection for winceAndreas Holzammer2012-06-041-1/+1
| | | | | | | | | | | As the qsystemdetection.h is not included so Q_OS_WINCE is not defined here, so use the define from the mkspec. Change-Id: Ic170725d0da89f0c0e675c62bd2aa5c58803de9f Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change testlib signal dumper hooks to use signal index rangeKent Hansen2012-06-042-8/+6
| | | | | | | | | | | | Another step towards getting rid of the class method offset computation in QMetaObject::activate(). Since QMetaObjectPrivate::signal() is private API, this also required adding a testlib dependency on core-private (and getting rid of the duplicated QSignalSpyCallbackSet struct). Change-Id: I0d830f35392a6b44fc321c5285877ec0bf437100 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Change QConnectionSenderSwitcher et al to use signal index rangeKent Hansen2012-06-032-6/+17
| | | | | | | | | | | | | First step towards getting rid of the signal_absolute_index variable from QMetaObject::activate() (which requires computation of the class's method offset). This also required changing the implementation of the public function senderSignalIndex() so it still returns an index in the full method range. Change-Id: I58571eb3c8099ea5b673682872c53875f5ea8c13 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use QMetaObjectPrivate::signalOffset() where appropriateKent Hansen2012-06-031-19/+6
| | | | | | | | computeOffsets() was unnecessarily computing the method index, when only the signal index is needed. Change-Id: Id682d4447ba283a44cf0ea15cc47bd30edccb57b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Pashto uses Arabic script and is written right to leftMike FABIAN2012-06-021-0/+1
| | | | | | | | | QLocale::textDirection() was missing Pashto as a right to left language. Change-Id: I1623abf711597a26f283a86708dc756696790b7d Reviewed-by: Lars Knoll Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Simplify the QObject::dumpObjectInfo() implementationKent Hansen2012-06-011-14/+1
| | | | | | | Use the new signal index-based API. Change-Id: If44e02e71b718bca5c18c486ca9ab95f836cd0f1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Simplify connectSlotsByName() implementationKent Hansen2012-06-011-8/+3
| | | | | | | Use the new signal index-based API. Change-Id: I89263f5366726ef8213e45e5ab6575ebd6eab04a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add private API for working with meta-methods in signal index rangeKent Hansen2012-06-013-17/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, QObject and QMetaObject already leave out non-signal methods when working with signals. This is possible because the signals always come before other types of meta-method in the meta-object data. Ignoring irrelevant methods is faster and can save memory. QMetaObject provides internal indexed-based connect() and disconnect() functions. However, these functions currently take an absolute method index as the signal specifier, instead of an absolute _signal_ index. Hence, QMetaObject and friends must convert from the method index range to the signal index range. By providing an API that only considers signal indices, clients of the index-based QMetaObject::connect()/disconnect() can provide the proper signal index directly. Similarly, for the qtdeclarative integration (QDeclarativeData hooks) the signal index can be passed directly. This will eliminate most of the conversions back and forth between signal index and method index, and some other redundant work done by qtdeclarative's custom connection implementation. There are some places where the behavior can't be changed; for example, QObject::senderSignalIndex() will still need to return an index in the method range, since that function is public API. Changing QMetaObject::connect()/disconnect() to take an index in the signal range will be done in a separate commit; this commit is only an enabler for porting existing usage of those functions to the new behavior. Change-Id: Icb475b6bbdccc74b4e7ee5bf72b944b47159cebd Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Socket FD are now of type qintptr.Jonas M. Gastal2012-06-012-2/+2
| | | | | | | | | | This should've been done together with the bulk of other changes in: bdce61002255b5f8b3213e93175cefdfebfde2cc and bf7f17060773803f332e8c729a70f47b94243890 Task-number: QTBUG-19004 Change-Id: I6d95a29140c1de5e6800812add9d7882511b909a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix a bug in the case conversion codeLars Knoll2012-06-011-8/+4
| | | | | | | | | | | Chars that have a case conversion that converts them into several characters can't be handled by QChar::toUpper() etc and should get ignored. The code didn't do that correctly. Change-Id: I281d122e90bf49187b6449088d2fccef2ef75e86 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix the QVector build with C++11 initialiser listsThiago Macieira2012-06-012-5/+5
| | | | | | | | | | | | Initialiser lists were not tested before in the QVector rewrite, so the older malloc call was left behind. Also, std::initializer_list has const iterators returning const data and broke the build in a few places where const qualifiers were missing. Change-Id: I3c04e58361989aa7438621cda63c7df457d7dad8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Make QVector compile with QT_STRICT_ITERATORS againThiago Macieira2012-06-012-86/+92
| | | | | | | | | | | | Move the iterator classes into QArrayTypedData and add constBegin() and constEnd() to that class. I also had to add an operator T*() to the strict iterators, since there are many places that expect the iterator to behave like a pointer (including in QVector itself). Change-Id: Icc5ed56ad47b013664a48eef9d31b5273aecb4e3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Allow compare QLatin1String to QLatin1StringKonstantin Ritt2012-06-011-17/+17
| | | | | | | even if QT_NO_CAST_FROM_ASCII is defined. Change-Id: I8c4deceedb6f3e3cd5bdf72d6e9d189c509c9ff3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing QT_NO_CAST_FROM_ASCIIKonstantin Ritt2012-06-011-2/+2
| | | | | | | | | | | | to QLatin1String's compare operators that takes const char *s or QByteArray. Such comparison leads to a potential misuse since QByteArray could contain any arbitrary data in any arbitrary encoding and QLatin1String is used to only contain strings in UTF-8 - they are just a different beasts aimed for different purposes, and since QT_NO_CAST_*_ASCII disallow indirect conversions and require the user to know what he's doing, let's be consistent here too. Change-Id: I9bf5f326495157db8a6af064d6154961b7861a7e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unconditionally enable Q_OF_ELF for any ELF platformPino Toscano2012-06-011-3/+1
| | | | | | | Just enable ELF stuff on any platform which uses ELF format, instead of a selected subsets of those. Change-Id: I0753c020c718bc67b4b50c3957fe8dc10afd2c61 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add clear() to QPointer for QWeakPointer compatibility.Stephen Kelly2012-06-012-0/+13
| | | | | Change-Id: I9efc162bf56775c7ebcff4e3b79a997edc4ceaeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some gcc warningsKonstantin Ritt2012-06-011-4/+4
| | | | | | | | | | | | These are: "enumeral and non-enumeral type in conditional expression", "comparison of unsigned expression >= 0 is always true", and "address requested for 't', which is declared 'register'" Change-Id: Ia9bab2e1e2c212a2889197e8dd5f7295dda9dadd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Get rid of MSVC compiler warnings from QVector codeFriedemann Kleint2012-06-011-2/+10
| | | | | | | Change-Id: I39b849721f3ba790c4a9197d69ac48e98cc2f5bd Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove debugging code from QVectorJędrzej Nowacki2012-06-011-9/+1
| | | | | | | It was depending on internals of Q_ASSERT Change-Id: I3dfc0ae0438135a30961f36808dbfc3e663a5538 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QStringBuilder when concatenating data-less QLatin1StringChris Adams2012-06-011-4/+8
| | | | | | | | | Previously, the append functions in QConcatenable in the QStringBuilder dereferenced the data() pointer of the argument QLatin1String without performing null check. Change-Id: I629f19fbce3113f1f80f4272fa7ae34e1dbc6bee Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Move implementation of QObject::senderSignalIndex() to QObjectPrivateKent Hansen2012-06-012-11/+20
| | | | | | | | In preparation of changing the implementation to return an index in the signals-only range, not all-methods range. Change-Id: Ib743a4bc9da27ad776ade262b215ebf988e7ab28 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix To-Do in qstatemachine (use QObject::senderSignalIndex())Kent Hansen2012-06-011-8/+2
| | | | | Change-Id: Id8a541878918f27a34595ff297d0f41b79275a96 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove the unnecessary comment about operator== not being necessaryThiago Macieira2012-05-312-9/+4
| | | | | | | | | | The mysterious comment was just suggesting that they weren't necessary. Turns out the comment is wrong: they are necessary for non-strict iterator modes. Task-number: QTBUG-25063 Change-Id: I20ada17035642ee656c431d6bf2152a5243cecdb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix the confusion caused by the QT_ALWAYS_HAVE_xxx macrosThiago Macieira2012-05-313-6/+30
| | | | | | | | | | | | | | | | | | | | The QT_ALWAYS_HAVE_xxx macros are gone: they were hard to use and not defined properly. It indicated that the compiler was producing code that required that particular instruction set, so we could use it in our code unconditionally. Instead, let's use the GCC-style __SSE2__ and __ARM_NEON__. MSVC does not generate the __SSE2__ macro, so let's do it for the compiler. Also, define __AVX__ and the macros for the technologies leading to it when we manage to detect an /arch:AVX build (currently not possible, see note in the header). ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all uses of the intrinsics are either in specially-built files, protected by runtime checks, or they are unconditional (qstring.cpp). So we only use the intrinsics when the compiler was instructed to generate code for that instruction set anyway. Change-Id: If8382f30422cee0e5831d051b003acf036824abf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>