summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QDebug: Improve QDebug stream operator for QFlagsKai Koehne2014-07-301-6/+6
| | | | | | | | Use the built-in hex, showbase manipulator to format the number in hex. Also, apply nospace() only once. Change-Id: Id4b3d5f082ad13f52c8711408d7ec609bec3a621 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QDebug: Add resetFormat()Kai Koehne2014-07-151-1/+3
| | | | | | | | | | Similar to QTextStream::reset(), this resets the stream format to the defaults. Its primary use is inside custom operator<< implementations, where you'd want to have a fixed format regardless of the current stream state. Change-Id: I421d76c61f164579bb90cf4195cc5376e2dcf0f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add QDebug::noquote() stream modifierKai Koehne2014-07-101-7/+26
| | | | | | | | | | | | | | | Allow the user to disable the quoting of QString, QByteArray, QStringLiteral by passing a "noquote()" stream modifier. This requires another flag to be added to QDebug::Stream. To keep BC we're using the QMessageLogContext::version field to differentiate between QDebug streams created by earlier versions. Task-number: QTBUG-37146 Change-Id: I9b215eabfcfd754af16ea87f3ef928d698e37d77 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: Remove handling of FORCE_UREF defineKai Koehne2014-06-251-35/+0
| | | | | | | | | | | | | | | | | | This is the only place in Qt source code we use FORCE_UREF, and can be traced back to the very first qt.git commit. In any case, it's broken: It returns a reference to a local variable, since the debug argument is _not_ a reference. Using a reference both for the argument and the return value would be actually the canonical solution, but that breaks with QDebug << operator(QDebug, const QVariant &), exported in QtCore. The C++ lookup rules apparently prefer this overload then to be used for outputting containers ... Change-Id: Iaf5e5dd89d4f3ebe6454eba219046b4f25b0d717 Reviewed-by: hjk <hjk121@nokiamail.com>
* De-inline QDebug destructorKai Koehne2014-05-221-12/+1
| | | | | | | | | This injected quite some code on every use of qDebug and friends, while not giving any measurable performance benefits. Change-Id: I7b51f99130f18f1252da01e313f7b97c43a5480d Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove OOM exception handling from QDebugKai Koehne2014-05-131-5/+3
| | | | | | | | | According to the documentation, Qt doesn't even attempt to handle OOM issues anymore. It's questionable in the first place why this should be available only for the stream operator logging ... Change-Id: If94c971793bc6c6773daf3997fe82b410a29538d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: Allow text stream formatting for 64 bit numbersKai Koehne2014-03-131-4/+2
| | | | | | | | | | | | | | | Use the QTextStream stream operator for formatting 64 bit numbers, just like we do for other numbers, too. This ensures all numbers in a QDebug stream e.g. respect the hex and showbase modifiers. The original reason for formatting qin64, quint64 with QString::number is unclear (pre-dates the original qt4 git import). Maybe QTextStream did lack proper support for 64 bit numbers back then. Task-number: QTBUG-36841 Change-Id: I049516c2a8394c9c1a708f86c3d950418a20a957 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Retain space settingKurt Pattyn2013-12-241-6/+22
| | | | | Change-Id: I4584de9ba51610907c917a0e0ddf5f6f28d304a0 Reviewed-by: David Faure <david.faure@kdab.com>
* Remove trailing space from QDebug streamKai Koehne2013-12-061-1/+3
| | | | | | | | | | | It's unexpected that all messages generated by the stream version of qDebug and friends have a trailing space. It also makes switching to categorized logging (which only supports the stream version) difficult, since all autotests checking for debug output would have to be adapted. Task-number: QTBUG-15256 Change-Id: I8d627a8379dc273d9689f5611184f03607b73823 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QFlags enum flags (C++11 strict enums) friendlyAlbert Astals Cid2013-05-091-1/+1
| | | | | Change-Id: I9ccb3e4d281a545ca1845db4f6aa7ac6c04e8621 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add class QDebugStateSaver for writing QDebug operators correctlyDavid Faure2013-01-141-0/+12
|/ | | | | | | | | 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtNoDebug: remove special member functionsMarc Mutz2012-08-071-3/+0
| | | | | | | | These are better generated by the compiler. Change-Id: I5afa9fd17997c220622ed0e5990c33e52700840f Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: Add getter/setter for auto-insert-spaces.David Faure2012-07-271-0/+3
| | | | | | | | | | | | This is useful for inserting a string without space-handling, given that dbg.nospace() followed by dbg.space() inserts a space. It's also useful for QDebug operators for custom types, so that they can disable space handling and then restore to whatever it was before (rather than forcing it to space() mode). Change-Id: I9d72e9ffbcbc581ed093168752c29af924405b33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtCore: mark some classes as sharedMarc Mutz2012-07-101-0/+2
| | | | | Change-Id: I811d3eebd87c230883cc579c20f9fa4e14ff9521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtCore: add member-swap to shared classesMarc Mutz2012-07-031-0/+2
| | | | | | | | | | Implemented as in other shared classes (e.g. QPen). Special case: QUrlQuery: document existing swap(). Change-Id: I4b36cc9577fbf2232d4b2a2d8822d26e41e22cad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace `const QLatin1String &` with `QLatin1String` where appropriateKonstantin Ritt2012-05-251-1/+1
| | | | | | | Task-Id: QTBUG-24502 Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port the QTextStream / QDebug functions away from fromAsciiThiago Macieira2012-05-041-1/+1
| | | | | | | | | No behaviour change since fromAscii (temporarily, at this point) means fromUtf8. Change-Id: I0e4d3ccfac7b5beaaaececb9f088324ee4838f84 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Logging: Change arguments of message handler to avoid conversionsKai Koehne2012-04-201-1/+1
| | | | | | | | | | | | | | | Introduce a new QtMessageHandler that takes QString instead of char *: This avoids converting to local8bit , only to convert it back to utf16 for Windows. The old QMessageHandler is kept for a transition period, but will be removed before Qt 5.0. Also fix qEmergencyOut (that is called in OOM situations) to not rely on the default message handler. Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QTextStream and QDebug operator<< for QLatin1StringKent Hansen2012-02-021-1/+1
| | | | | | | | | QLatin1String now has a constructor that takes explicit length, which makes it possible to create a QLatin1String that isn't null-terminated. Made the QTextStream and QDebug << operators work in that case. Change-Id: I94d051ce2ebfb2d2a403b96d25e040c80a54bf7c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtDebug: Include file, line, function informationKai Koehne2012-02-011-22/+5
| | | | | | | | | | | | | | Record the file, line, and function where a qDebug, qWarning, qCritical or qFatal call happens, and make this information available in a custom message handler. The patch uses the C preprocessor to replace qDebug, qWarning, ... with a line that also records the current file, line, and function. Custom message handlers can access this information via a new QMessageLogContext argument. Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d Reviewed-by: David Faure <faure@kde.org>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QBool and use bool instead.David Faure2012-01-201-1/+0
| | | | | | | | | | | | QBool was introduced with Qt-4.0, to detect Qt3-like code like if (c.contains(d) == 2) and break compilation on such constructs. This isn't necessary anymore, given that such code couldn't possibly compile in Qt4 times. And QBool was confusing developers, and creating compile errors (e.g. QVariant doesn't have support for it), so better remove it for Qt 5. Change-Id: I6642f43f5e12b872f98abb56600186179f072b09 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-111-2/+0
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-081-1/+1
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUTDavid Faure2012-01-051-7/+8
| | | | | | | | | | | | | | | | All QDebug operator << in custom classes were disabled by QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT. Now QT_NO_DEBUG_STREAM is never set automatically, but remains available for reducing the feature set altogether (qconfig.h). Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it doesn't even undefine QTextStream, and this is unrelated to QDebug streaming anyway. Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+300
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12