summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* Disable ELF interpreter check when cross-compilingHarald Fernengel2011-10-141-1/+1
| | | | | | | | It's not a good idea to look at the host's /bin/ls when cross-compiling Change-Id: I1fe67b17abd92f01c1d89146227c5419eaa3242f Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-115-29/+12
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Rename QMetaType::construct() to create()Kent Hansen2011-10-115-41/+45
| | | | | | | | | | | | | | | | | | | | | create() is symmetric with destroy(). Also rename the internal methods and fields to be consistent (qDeleteHelper already had the "right" name, though!). This change will allow us to use construct() and destruct() for something else: Placement new-style allocation (QTBUG-12574). The old construct() is still kept for now, until the other repositories have been updated to use create(). Change-Id: Iceb184af6cffcb0a634359cfc3516c718ba0c2f5 Reviewed-on: http://codereview.qt-project.org/6342 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add qmetaobjectbuilder to qtbase.Lorn Potter2011-10-113-0/+2931
| | | | | | | | | | | | | | Use the QMetaObjectBuilder code from declarative and add it to libQtCore. Consolidating various QMetaObjectBuilder implimentations to avoid code duplications in those modules. This is currently still a private API only. Change-Id: Ie363b4fd769c41efbb3caa7fb1d6f77af13c3c9c Reviewed-on: http://codereview.qt-project.org/6287 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Bradley T. Hughes2011-10-101-4/+4
| | | | | | | | | | Change Ie3271abd1728af599f9ab17c6f4868e475f17bb6 didn't build on Mac in debug mode. This commit fixes the build. Change-Id: I925af83ea577228b60679af804aa7875a779ec3f Reviewed-on: http://codereview.qt-project.org/6331 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QUnifiedTimer: Add callback for timer ticks. Used for profilingChristiaan Janssen2011-10-102-1/+12
| | | | | | | | Change-Id: Ia7cf823dee7f0b491db2f041d29cdfc0e385f18e Reviewed-on: http://codereview.qt-project.org/6253 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Enable using the new Qt::ScreenOrientation enum as flagsJani Uusi-Rantala2011-10-101-5/+10
| | | | | | | | | | | | | Going to be useful later on in multiple places... - Respecified Qt::ScreenOrientation as bit values - Added Qt::ScreenOrientations QFlags definitions Change-Id: Ib7648d23de79ea5f88d617015bc98efcf903a8f3 Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com> Reviewed-on: http://codereview.qt-project.org/6268 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clean-up a macro for CocoaMorten Sorvig2011-10-101-5/+0
| | | | | | | | | Remove the usage of Q_MAC_USE_COCOA and Carbon code paths. Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112 Reviewed-on: http://codereview.qt-project.org/5100 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Added Orientation API to QScreen and QWindow.Samuel Rødal2011-10-072-0/+21
| | | | | | | | | | | | QScreen now has a primary and current orientation, and a QWindow can set its orientation as well. The current screen orientation is just a hint to the application. Change-Id: I4635982cfac2d16634d4edd5c6ab78e9d0ac55a4 Reviewed-on: http://codereview.qt-project.org/5988 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QChar::isSpace() to handle codepoint U+0085Konstantin Ritt2011-10-062-2/+4
| | | | | | | | | | | according to the Unicode specs, code point U+0085 should be treated like a white space character (an exceptional Cc one) Change-Id: Ib17ae0c4d3cdafe667cafa38b645138ef24c238c Merge-request: 32 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-on: http://codereview.qt-project.org/6158 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix incorrect QFileInfo permissions on windowsShane Kearns2011-10-061-1/+1
| | | | | | | | | | | | | | | Requesting the write permission marked the read permission as known without having retrieved it. A subsequent request for read permission would return false. Task-Number: QTBUG-20714 Reviewed-By: mread (cherry picked from commit bf69c7e0af67ec877da4fee244386e538fa1c01d) Change-Id: I74fd118fcdd3b222098eda2718823a36931424a1 Reviewed-on: http://codereview.qt-project.org/6159 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Merge fixes for QDir::operator==Shane Kearns2011-10-062-2/+22
| | | | | | | | | | | | | | | | | | There were two fixes in 4.8 which each fixed a part of the problem. Comparing canonical paths is more correct, but is only possible where both directories exist. If neither directory exists, then compare absolute paths instead. Changed a regression test, because /tmp is a symbolic link on MacOS. I.E. "/tmp/.." is canonically "/private" and not "/" as expected. Task-Number: QTBUG-20495 Reviewed-By: joao (cherry-picked from ad35d25e78c8252a72108a4ba931934047c4707e) Change-Id: Ia4986e8337f0e512e1a3398a5a4dd36e62680b9c Reviewed-on: http://codereview.qt-project.org/5813 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix QDir::operator==(const QDir &) constJoão Abecasis2011-10-062-3/+4
| | | | | | | | | | | | | | | | | | | We can't rely on absolute paths when comparing directories for equality as these don't take into account symbolic links and may also bypass ../ and ./ simplification. Instead, canonical paths must be computed and can then be compared according to the case sensitivity rules for the platform or file engine, as is done in QFileInfo. Task-number: QTBUG-20495 Reviewed-by: Prasanth Ullattil (cherry-picked from dcee6e1371d899eb79717b8e3f3eec08b765db82) Change-Id: Ib5f2a6ee11311c55782ea5dd0e9c3b45f9231686 Reviewed-on: http://codereview.qt-project.org/5812 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove duplicate check in utf endian detectionKent Hansen2011-10-061-14/+12
| | | | | | | | | | | This was excessive paranoia. Task-number: QTBUG-20482 Change-Id: Ia0c76651773e12f25ec5d62675d6f317b8d2df13 Reviewed-on: http://codereview.qt-project.org/6045 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove redundant assignment in QXmlStreamReaderKent Hansen2011-10-061-1/+0
| | | | | | | | | | Setting tos to 0 once should be enough for everyone. Task-number: QTBUG-20482 Change-Id: I7aa46ff5d4ed8064e3fb2cebc3dfcaa4e73741f8 Reviewed-on: http://codereview.qt-project.org/6053 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Don't use implicit QAtomic* casts in QFreeListBradley T. Hughes2011-10-051-9/+9
| | | | | | | | | | | | | | | Pair the _next.testAndSetRelease() call in QFreeList<T>::release() with _next.loadAcquire(), to ensure that the update to the bucket being released is properly fenced. QFreeList<T>:next() does not need a release fence, only an acquire fence, which is placed on the memory bucket address load. Change-Id: Ib5b9d6ef6107f87aa8e3ea2dd3a7f9116c75da70 Reviewed-by: Thiago Macieira Reviewed-on: http://codereview.qt-project.org/5802 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix boolean logic issues in qcoreapplication_winKent Hansen2011-10-051-3/+3
| | | | | | | | | Task-number: QTBUG-20482 Change-Id: Iadbde59953a86d5f74d68c7cdc36b7706525612c Reviewed-on: http://codereview.qt-project.org/6046 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add missing Q_OBJECT macro to GoToStateTransitionKent Hansen2011-10-051-0/+2
| | | | | | | | | | | The missing macro caused qFindChild() to return any QAbstractTransition. Task-number: QTBUG-21813 Change-Id: I80507aa86c8c32d7fa59a1b5ae551043f5f90315 Reviewed-on: http://codereview.qt-project.org/6044 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Don't crash by modifying read-only shared_nullBradley T. Hughes2011-10-045-6/+6
| | | | | | | | | | | | | | | | | | | Functions that modify the d-pointer must detach or otherwise take measures to not modify the const, read-only shared_null. The setSharable(bool) function takes care to detach when setting sharable to false, but should avoid setting the sharable data member unless d is not the shared null. Similarly, QMap<Key, T>::setInsertInOrder() needs to detach if it is shared with the shared_null (the logic has been updated to be the same as setSharable()). Change-Id: Ida5cb9818b86695f1b9f0264418b955c56424898 Reviewed-on: http://codereview.qt-project.org/5929 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Prevent QPixmapCache potentially growing indefinitely.Samuel Rødal2011-10-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPixmapCache has until now refused to throw out shared pixmaps, i.e. ones that still have shallow copies lying around. This leads to problems when someone inserts two shallow copies using different keys, causing the cache itself containing multiple shallow copies and thus forever refusing to throw out those entries. It's rather easy for this to accidentally happen in a user application since QPixmap::load() or QPixmap(const QString &fileName, ...) automatically cache the pixmap in the QPixmapCache, thus if the user then calls QPixmapCache::insert() on the same pixmap or a shallow copy it is locked in the QPixmapCache forever. The only reason for not throwing out a pixmap that's shared would be to prevent re-loading a pixmap from file when a user has a direct reference to it in his application, but in that case the user is unlikely to re-load the pixmap from file in any case. Therefore it seems the best fix is to get rid of this limitation. Task-number: QTBUG-21359 Reviewed-by: John Brooks Reviewed-by: Olivier Goffart (cherry picked from commit 7ab0bed3a56d46c386e65abc381264c57137cb43) Change-Id: I46dce19227e19a25e0287cf7372177430da15a66 Reviewed-on: http://codereview.qt-project.org/4563 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-0314-68/+67
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add placeholders for loadAcquire and storeRelease in the atomicsThiago Macieira2011-10-031-0/+10
| | | | | | | | | | | | | This should be replaced later with proper loadAcquire and storeRelease functions in the architectures that require them. The code right now is enough for x86, x86-64 and IA-64. It's probably not good for ARM and MIPS. Change-Id: Iaa28a18cad64772539662439c2c14690ec26940f Reviewed-on: http://codereview.qt-project.org/5029 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the remaining traces of QT3_SUPPORTLars Knoll2011-10-031-5/+1
| | | | | | | | | | The only place that now still knows about it is moc, so it can still parse old headers. Change-Id: Iafec080f99c67560974e9ebc0cbfb27d9a4b2d6f Reviewed-on: http://codereview.qt-project.org/5755 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename Qt::escape to QString::toHtmlEscaped, add compat methodDavid Faure2011-09-292-14/+24
| | | | | | | | | Merge-request: 56 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I46bbb2df10968e88b5eb5ef8dae182a651b622b8 Reviewed-on: http://codereview.qt-project.org/5793 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Move Qt::escape to QtCoreDavid Faure2011-09-292-0/+36
| | | | | | | | | | Merge-request: 56 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I25c5f46cf53a653db26dbeb92865e61f69980bfd Reviewed-on: http://codereview.qt-project.org/5792 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* QTemporaryFile: use QCoreApplication::applicationName() as base filenameDavid Faure2011-09-281-13/+31
| | | | | | | | | | Merge-request: 57 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I2a29b2ba925ea92a5299272b80164658775e9c0e Reviewed-on: http://codereview.qt-project.org/5713 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Update QHash for Qt 5Bradley T. Hughes2011-09-262-46/+9
| | | | | | | | | | | Dealt with all necessary changes that are marked in the code: removing methods left only for binary compatibility with earlier Qt 4 versions and other methods marked for removal. Change-Id: I47109ccd9ed40addc345416be9e172570723955e Reviewed-on: http://codereview.qt-project.org/4534 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* "empty translation" does not mean "no translation"Oswald Buddenhagen2011-09-261-2/+2
| | | | | | | | | | | | this makes QCoreApplication::translate() consistent with QTranslator::translate(), and is semantically cleaner. users wishing to shrink their QM files can do that properly by using lrelease -removeidentical. Change-Id: I2b367314cfb985c3d130c7c6347e2742311f497a Reviewed-on: http://codereview.qt-project.org/5165 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
* Make QVectorData::shared_null constBradley T. Hughes2011-09-262-6/+6
| | | | | | | | | | | | | Similar to QByteArray and QString, keep the shared_null in shareable memory and never modify it. Since QRegion uses the internals of QVector, we need to make sure that QRegion also never modifies the shared_null. Change-Id: I809e5873fe414138f97d501e05458b73c04b18fb Reviewed-on: http://codereview.qt-project.org/4529 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QMapData::shared_null constBradley T. Hughes2011-09-262-8/+8
| | | | | | | | | | Similar to QVector, QByteArray and QString, keep the shared_null in shareable memory and never modify it. Change-Id: I062825684b79f2b01ec7ce65e0cf74f417b760b8 Reviewed-on: http://codereview.qt-project.org/4530 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make QListData::shared_null constBradley T. Hughes2011-09-262-8/+9
| | | | | | | | | | Similar to QMap, QVector, QByteArray and QString, keep the shared_null in shareable memory and never modify it. Change-Id: I2b4bb8de564080021043f6ede6c903d567c686cf Reviewed-on: http://codereview.qt-project.org/4531 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make QLinkedListData::shared_null constBradley T. Hughes2011-09-262-7/+8
| | | | | | | | | | Similar to QList, QMap, QVector, QByteArray and QString, keep the shared_null in shareable memory and never modify it. Change-Id: I70b484d528c397a9d205b1418b6dc920c69dc725 Reviewed-on: http://codereview.qt-project.org/4532 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make QHashData::shared_null constBradley T. Hughes2011-09-262-6/+6
| | | | | | | | | | Similar to QLinkedList QList, QMap, QVector, QByteArray and QString, keep the shared_null in shareable memory and never modify it. Change-Id: Ia8b72ef0288575bed658153d9d54434580988bda Reviewed-on: http://codereview.qt-project.org/4533 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* don't calculate hash when the map is empty and we are not insertingOswald Buddenhagen2011-09-261-3/+6
| | | | | | | | | | | | the alternative would be splitting the function into two separate overloads. that might result in better branch prediction, but will create a bit more code. Change-Id: Ia2c685bbb34a9681c71f2249d073dd960368209a Reviewed-on: http://codereview.qt-project.org/5332 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Clarified the range of return values from QLineF::angle().David Boddie2011-09-261-2/+3
| | | | | | | | | | | | Task-number: QTBUG-20197 (cherry picked from commit 86608d537eabc3cf7e1d1ddd1d0a2f90ccc2de2a) (cherry picked from commit 8a6dc154ef1fa71e85f02d011d6cbeb63e2ca3bb) Change-Id: I40cfba4ee45f61428b00d4044640f600c462d564 Reviewed-on: http://codereview.qt-project.org/1984 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Peter Yard <peter.yard@nokia.com>
* Doc: Moved general notes about character conversion.David Boddie2011-09-261-10/+13
| | | | | | | | | | | Task-number: QTBUG-20411 (cherry picked from commit b3922d06680c04324cecd0e0219d02c52b8cf7fd) Change-Id: If2730fa0d8abd6a14070bc19c8c307dbb61ca111 Reviewed-on: http://codereview.qt-project.org/1985 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Peter Yard <peter.yard@nokia.com>
* Use the right callback in QObject::disconnect()Olivier Goffart2011-09-231-1/+1
| | | | | | | Change-Id: Idf2f725dd859aa5c960e5889678cac0e139e44b0 Reviewed-on: http://codereview.qt-project.org/5475 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix QString and QByteArray reserve() and squeeze()Bradley T. Hughes2011-09-232-4/+42
| | | | | | | | | | | | | | | | | These functions should not take care not to unconditionally set the capacityReserved private member, since the d may be referencing the const shared_null or shared_empty which live in read-only memory. The squeeze() methods check for ref > 1 instead of ref != 1 to prevent detaching from the shared_null/shared_empty unnecessarily; the shared_null/shared_empty ref count is -1, meaning squeeze() will never detach from it. Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7 Rubberstamped-by: Lars Knoll Reviewed-on: http://codereview.qt-project.org/5454 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QByteArray's shared_null and shared_empty should be constBradley T. Hughes2011-09-232-7/+7
| | | | | | | | | | | | QByteArray::squeeze() needs to make sure to detach if the data is shared, otherwise it would end up crashing when squeeze() is called on a QByteArray using the shared_null or shared_empty. Change-Id: I89c178659d8c7448681304f050fd69e17b2387de Reviewed-on: http://codereview.qt-project.org/4528 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't call ref() in QByteArray::QByteArray()Bradley T. Hughes2011-09-231-1/+1
| | | | | | | | | | The call is unnecessary; it does nothing since the shared_null ref count is negative. Change-Id: I0d0c35a554e4fc5b734a25dab06f04bee7a9ae24 Reviewed-on: http://codereview.qt-project.org/4637 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* merge translate() overloadsOswald Buddenhagen2011-09-212-25/+5
| | | | | | | | Change-Id: I58f0d2c2ec6da751860a90096c49c662658643c1 Reviewed-on: http://codereview.qt-project.org/5164 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Add Qt::WindowTransparentForMouseEventsLars Knoll2011-09-211-0/+1
| | | | | | | | | | | Add a flag for output only windows that are transparent for mouse events and implement it for the xcb backend. Change-Id: I24afdb6b27de34bcdf0c061a5a4987ac2880e4ae Reviewed-on: http://codereview.qt-project.org/5260 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-192-0/+28
| | | | | | | | | | | | Move handling of -qmljsdebugger= argument from QApplication to QCoreApplication. It makes sense to allow debugging also for applications based on QCoreApplication (which we intend to support in QtDeclarative). Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36 Reviewed-on: http://codereview.qt-project.org/5121 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Wrap calls to Sequence::push_backJoão Abecasis2011-09-173-15/+32
| | | | | | | | | | | | | | | | | | | | | | | In C++11 push_back is overloaded to support rvalue-references, void std::vector<T>::push_back(const T &); void std::vector<T>::push_back(T &&); so attempting to get the address for push_back is ambiguous. Instead of hardcoding the function signature, the better and more general solution is to allow the compiler to do the required overload resolution itself, also allowing for implicit conversions to take place. Task-number: QTBUG-18996 Done-with: Liang Qi Reviewed-by: Olivier Goffart (cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408) Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552 Reviewed-on: http://codereview.qt-project.org/4642 Reviewed-by: Liang Qi <liang.qi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Boost performance of QChar::isSpaceKent Hansen2011-09-152-5/+14
| | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for typical spaces; add fallback function that uses the fastcall calling convention. On ia32, this change makes isSpace ~340x faster for ascii spaces, ~170x faster for non-space ascii characters, and ~1.3x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798 Reviewed-on: http://codereview.qt-project.org/4905 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isLetterOrNumberKent Hansen2011-09-152-3/+17
| | | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii letters and digits; add fallback function that uses the fastcall calling convention. On ia32, this change makes isLetterOrNumber ~120x faster for ascii letters and digits, ~150x faster for non-letter/digit ascii characters, and ~1.3x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e Reviewed-on: http://codereview.qt-project.org/4904 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isLetterKent Hansen2011-09-152-3/+15
| | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii letters; add fallback function that uses the fastcall calling convention. On ia32, this change makes isLetter ~370x faster for ascii letters, ~250x faster for non-letter ascii characters, and ~1.5x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a Reviewed-on: http://codereview.qt-project.org/4903 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isDigitKent Hansen2011-09-152-3/+13
| | | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii digits; add fallback function that uses the fastcall calling convention. On ia32, this change makes isDigit ~370x faster for ascii digit characters, ~250x faster for non-digit ascii characters, and ~1.5x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83 Reviewed-on: http://codereview.qt-project.org/4902 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::is{Upper,Lower}Kent Hansen2011-09-151-2/+8
| | | | | | | | | | | | | | | | | | | | | Calling QChar::category() is slow; do some fast checks to detect ascii characters before falling back to the generic handling. On ia32, this change makes isUpper ~260x faster for uppercase ascii characters, and ~180x faster for non-uppercase ascii characters. Similar numbers for isLower. Even with the additional checks, these versions are slightly faster than before for non-ascii characters as well, since we now call the static fastcall category(ushort) function, which is faster than the category() member function (which uses the stack to pass the unicode value). Change-Id: I6ae0df466bb4835ca0d5319fd6018862c849313b Reviewed-on: http://codereview.qt-project.org/4901 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix warning when building objects with a Q_OBJECT macroTobias Hunger2011-09-151-1/+1
| | | | | | | | | | | | Do not trigger a self-assign warning when running into code containing a Q_OBJECT macro. Currently this happens a lot e.g. when using clang to build code using Qt. Change-Id: I68995624b18406f337318599e463f36f87486e66 Reviewed-on: http://codereview.qt-project.org/4960 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>