summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Add class QSaveFile.David Faure2013-01-174-0/+487
| | | | | | | | | | This QIODevice uses a temporary file for writing, so that in case of write errors, the writing operation is canceled, without losing any existing file. It also avoids having a partially-written file visible by other processes, at the final destination. Change-Id: I9482df45751cb890b1b6f1382ec2eea3eb980627 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-1615-36/+211
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Merge "Merge remote-tracking branch 'gerrit/release' into stable" into ↵Frederik Gladhorn2013-01-153-6/+6
| |\ | | | | | | | | | refs/staging/stable
| | * Merge remote-tracking branch 'gerrit/release' into stableFrederik Gladhorn2013-01-153-6/+6
| | |\ | | | | | | | | | | | | Change-Id: Ieb104d0e390218a063082c93bc9c7e412af2166d
| | | * Change all shmget calls to user-only memoryThiago Macieira2013-01-152-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 Reviewed-by: Richard J. Moore <rich@kde.org>
| | | * set pkg-config host_bins directly to install dirOswald Buddenhagen2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake tries to replace all occurrences of the install prefix with a literal ${prefix}. of course this would mess up build paths which happen to live under the prefix (this is untypical, but still), which would break the sed magic in the subsequent install step. as qmake itself has no use for the .pc files, it's ok to target them directly for the install dir. we do the same with the include and lib dirs already. Task-number: QTBUG-28807 Change-Id: I53d7f0f3b357f67f30bea07554794f60160376cd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | | Fix renaming of files that differ only in case.Friedemann Kleint2013-01-154-1/+106
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently fails on case-insensitive file systems since the check for existence then triggered and indicated "file already exists". Check on the file id (inode or file id) whether the target file is really a different file for a case-changing rename. Task-number: QTBUG-3570 Change-Id: I1b2d40850692e02142ee23d2c753428de00aedc6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix malloc errors from legacy realpath on Mac OSX.Jeremy Nicholl2013-01-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using realpath(X,0) on Mac OSX at all, since even on versions of OSX where realpath(X,0) is supported, we still get the legacy version due to our compiler flags. If we were to change the -mmacosx-version-min to 10.5 or higher then this patch would be safe but unnecessary. Task-number: QTBUG-28282 Change-Id: Iee21003f3e9616482483a05ceee706b476091914 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * | Split QQNXLocaleData::readPPSLocale()Rafael Roquetto2013-01-142-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because this method creates a QSocketNotifier, it needs to be split into a part that is run on initialization, namely QQNXLocaleData::initialize(), and one that is run delayed through event loop invocation, namely QQNXLocaleData::installSocketNotifier(). Task-number: QTBUG-28701 Change-Id: Ib60000902692bbca4820d3d0bc7719212668dfa9 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Doc: corrected typo "the the"Nico Vertriest2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28756 Spurious repetition of the definite article Trailing space issue corrected. Change-Id: I3a051f5dc291e546d8d67d6775e84b388bdc0363 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
| * | Fix accidental obsolation of Qt::InputMethodQueryPekka Vuorela2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | \obsolete for one value was marking the whole enum obsolete. Change-Id: If022b4af8365e3448556ca11a538203ab5c63c78 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Ignore WasDeclaredAsMetaType flag during binary check.Jędrzej Nowacki2013-01-101-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody should break ODR, but we were living with apps breaking it for at least 8 years. Sure it is an undefined behavior but in many cases it works. I do not think that Qt should enforce usage of a proper C++, it is role of a tool chain. Qt can only indicate that something is going terribly wrong. Make message a bit more verbose. Sometimes the ODR violation is not that easy to fix, therefore a hint is a nice addition. Update documentation of qRegisterMetaType. Change-Id: I61dcccc840eec80a4ed5b8a212a912807d239d8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Doc: cleanPath also normalizes separatorsLeena Miettinen2013-01-101-2/+2
| | | | | | | | | | | | | | | Change-Id: I0e5c1cd45ad90fceaed931b7014b4542e8aaa9d7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * | Protect Q_UNREACHABLE and Q_ASSUME by Q_ASSERT.Jędrzej Nowacki2013-01-102-12/+29
| |/ | | | | | | | | | | | | | | | | Both Q_UNREACHABLE and Q_ASSUME with an invalid condition can produce really weird side effects and crashes. Change-Id: I4d808c705ae98388ef5853e6539b70bd5e5ad34b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Q_COREAPP_STARTUP_FUNCTION macro.David Faure2013-01-153-0/+80
| | | | | | | | | | | | | | | | | | | | | | This is necessary for initializing things in a library, which require a QCoreApplication instance (unlike Q_CONSTRUCTOR_FUNCTION, which runs before that). Example use cases: KCrash (segv handler), and KCheckAccelerators (debugging tool triggered by magic key combination). Change-Id: I5f4c4699dd4d21aea72b007989ba57467e86ed10 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Bump Qt version to 5.1.0Frederik Gladhorn2013-01-154-10/+12
| | | | | | | | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Add support for Linux eventfd(7) in the UNIX event loopThiago Macieira2013-01-152-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | eventfd(7) uses less resources than a pipe, as it only needs to store a single 64-bit integer, as opposed to a full buffer. It was introduced first on Linux version 2.6.22 and glibc 2.7. However, both the configure-time test and the runtime usage require the use of EFD_CLOEXEC for thread-safety, so this code will be enabled only for Linux 2.6.27 and up as well as glibc 2.9 and up. Change-Id: Ic7e10b28d7b1d4ca24be614ed84055c4429a68e4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Doc: Update the info on the QSharedPointer internalsThiago Macieira2013-01-151-31/+24
| | | | | | | | | | | | | | Some of it still referred to classes that were cleaned up in Qt 5.0 Change-Id: Ief4ed4b4fce074884f755b0d18a526ac40ad1b0b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QUrl: methods for converting QStringList <-> QList<QUrl>David Faure2013-01-142-0/+34
| | | | | | | | | | | | | | This is a very common thing to do, e.g. in order to send urls via DBus. Change-Id: I277902460ee1ad6780446e862e86b3c2eb8c5315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add class QDebugStateSaver for writing QDebug operators correctlyDavid Faure2013-01-146-166/+324
| | | | | | | | | | | | | | | | | | Had to move QTextStreamPrivate to a private header, to be able to use its new internal Params struct from qdebug.cpp Change-Id: If28e25f27bbd04b1825a5eb3e2ef83ecad72e7b2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move QTemporaryFileEngine to private headerDavid Faure2013-01-143-50/+107
| | | | | | | | | | | | | | | | | | This is needed by QSaveFile. Move QTemporaryFilePrivate to that header too, to avoid any confusion. Change-Id: I8dce8a4fb853a9823c49ec565867432331e748cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add syncToDisk() to QAbstractFileEngine.David Faure2013-01-146-4/+58
| | | | | | | | | | | | | | This is needed by QSaveFile. Change-Id: I07ebdfd832c0be65c26f0aed1bb7852ac33135ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add renameOverwrite() to QAbstractFileEngine.David Faure2013-01-147-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | QFSFileEngine::rename() on Windows doesn't overwrite the existing destination. Keep that unchanged (it's the desired behavior in QFile::rename), and provide cross-platform rename-overwrite behavior in the new method. This is needed by QSaveFile. Change-Id: I5e753d289d8a53692530a48a1783d62e26169cdc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Added QMessageAuthenticationCodeRuslan Nigmatullin2013-01-144-0/+423
| | | | | | | | | | | | | | | | | | | | QMessageAuthenticationCode is HMAC implementation based on QCryptographicHash abilities. HMAC is often used in OAuth and similar authentication protocols. Change-Id: Ifc73947ad06c36a1b770315b7e89ba5c01c5e79e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString::contains overload that returns the match resultsGiuseppe D'Angelo2013-01-142-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This convenience overload allows one to write QRegularExpression re1, re2, ...; QRegularExpressionMatch match; QString subject; if (subject.contains(re1, &match)) { // ... } else if (subject.contains(re2, &match)) { // ... } // .. One can then inspect the results of a successful match in each block (as well as extracting the captured substrings, etc.). Change-Id: I0fb8be8b577656e8db994198f8105c26c4fe67b0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce default ctors for QRegularExpressionMatch(Iterator)Giuseppe D'Angelo2013-01-142-0/+42
| | | | | | | | | | | | | | | | This allows to put them in containers, and to enable subsequent features for QString. Change-Id: I3b3fe695ffe6930331ed9f670738376722e0fc36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Avoid a QVector allocation in QRegularExpressionMatchPrivateGiuseppe D'Angelo2013-01-141-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitely pass the number of capturing groups for which the offsets should be reserved in the capturedOffsets vector, instead of relying on it adding 1 (for the implicit capturing group #0). In case 0 is passed, don't allocate any space for that vector. This is being used in case of NoMatch match type or failing match (invalid regexp, out of bounds offset, etc.). Change-Id: I0ec7646d5bd53e7a7973177100b163a5e5030307 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge branch 'stable' into devSergio Ahumada2013-01-0930-69/+70
|\| | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * Define Q_COMPILER_AUTO_FUNCTION for MVSCThiago Macieira2013-01-081-0/+1
| | | | | | | | | | | | | | | | | | This definition was missing. It's clear MSVC supports this feature because it has been in use in qtconcurrentrun.h under an #ifdef Q_COMPILER_DECLTYPE, which is defined for MSVC. Change-Id: Id76198b2be8bba13fd00c65d6d4f73d3ef601449 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix compile when QT_EVAL is definedAndy Shaw2013-01-081-3/+3
| | | | | | | | | | | | | | Change-Id: Id1acae0c5941e5409ca540017c0c0139e1cc4d2f Reviewed-by: Samuli Piippo <samuli.piippo@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * Replace macro qdoc with Q_QDOCDebao Zhang2013-01-0827-65/+65
| | | | | | | | | | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Fix warning about cast from ASCII.Friedemann Kleint2013-01-071-1/+1
| | | | | | | | | | Change-Id: I5434ece3b1bd0c56ca4481a68dd67e914715bc28 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devJędrzej Nowacki2013-01-078-17/+57
|\ \
| * | Merge branch 'stable' into devFrederik Gladhorn2013-01-078-17/+57
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
| | * Disable Q_COMPILER_RVALUE_REFS on QNXRafael Roquetto2013-01-041-0/+3
| | | | | | | | | | | | | | | | | | | | | std::forward and std::move are not yet supported by the NDK. Change-Id: I1df1b5e88717c0d27a280862b98eb68262927f2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * remove unused member from QSystemLocalePrivateJoerg Bornemann2013-01-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring leftover from commit bb86e77cc437b92d49692bb7026c57626d77079f in qt/qt.git. Change-Id: I04993faca44ad0ffca2ae163049770c29d232a47 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
| | * Remove redundant Q_OS_BLACKBERRY define check.Rafael Roquetto2013-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Q_OS_QNX is always implied by Q_OS_BLACKBERRY Change-Id: Ic07a967ab9a45b3c6c088aa8399bab823b9a413e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Don't increase the reference count if dynamic_cast failedThiago Macieira2013-01-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the dynamic_cast failed in QSharedPointer::dynamicCast or qSharedPointerDynamicCast, we should avoid creating the QSharedPointer that shares the weak and strong reference counts. In Qt 5, this does not imply a leak since the original pointer is stored internally for deletion. In Qt 4 it implies a leak under certain circumstances, which this change fixes. Task-number: QTBUG-28924 Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * BlackBerry: Reevaluation of timer list in event dispatcherBernd Weimer2013-01-041-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the event dispatcher the timer list has to be reevaluated after each call to filterEvent, because timers could be started in event filters. Change-Id: I1a275845fb74c63441f2301555f3459f8295af27 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Clarify how two digit years are parsed by QDateTime::fromString().Mitch Curtis2013-01-032-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's currently not obvious that two digit years will always be in the 20th century (1900's). Task-number: QTBUG-28797 Change-Id: I7dee9a46e0cb803a8f097debc5443d1789c2f16c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| | * Fix copy-pasto in QMetaObject::methodCount docs.Stephen Kelly2013-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Copy-pasto'ed from the propertyCount docs. Change-Id: Iddb4ce9c9559ca274a80deb0785424df108af762 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Declare the QMetaType::WasDeclaredAsMetaType enum as privateThiago Macieira2013-01-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Omit its value in the documentation. Change-Id: I474faefde23b0e2e0a77a9e6391fd556a6523128 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Introduce QRegularExpression::NoMatch match typeGiuseppe D'Angelo2013-01-072-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This match type doesn't do any match at all; it's only necessary to properly introduce default constructors for QRegularExpressionMatch and QRegularExpressionMatchIterator (since they return the match type that created them). Change-Id: Ibfe92459c7fdd23129cf3afe073cd443c461ddeb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Provide operators for QMargins.Friedemann Kleint2013-01-072-0/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide addition/subtraction for QMargins as well as multiplication and division for int/qreal similar to QPoint. Add unary minus. Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Add API dealing with QMargins to QRect.Friedemann Kleint2013-01-073-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Addition of a QMargin to a QRect. - Removal of a QMargin from a QRect. - Remove implementation from Windows platform plugin. Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2013-01-0713-50/+70
|/ / | | | | | | | | | | | | | | | | | | | | | | QRegExp and QRegularExpression are totally independent, therefore using two different defines is the right thing to do. Also, document the new define in qfeatures.{txt,h}. Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Fix the \since version for QSharedPointer::create().Stephen Kelly2013-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | It is not relevant that it has been part of the class since Qt 4.6. It has always been internal until now. The release where it became public API (5.1) is what is relevant. Change-Id: Ib740f3ed6df190884a94fb2c11dd74cd7edb7b1a Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-0487-485/+1003
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * Make these headers includable directly, on all systemsThiago Macieira2013-01-012-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | For qwineventnotifier.h, just wrap the code around #ifdef Q_OS_WIN. This has the added benefit of fixing the current qt_no_master_include problem (that is, even if you #include <QtCore> on Windows, you wouldn't get it). For qtypetraits.h, it requires qglobal.h first. Change-Id: If1ba09a0a29de429a5b87e9878c8ac6a62a443c4 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Speed up and fix QByteArray::setNum()hjk2012-12-302-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | Going through QLocale and QString is not really needed. This also makes the result of the conversion of negative numbers in bases other than 10 independent of the architecture and implements the documented behavior of treating them as unsigned types. Change-Id: Ibc231dc5241deb5cbadd9796484a8b5f79c29410 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>