summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
Commit message (Collapse)AuthorAgeFilesLines
* Doc: corrected snippet issue in Defining Plugins docNico Vertriest2015-03-111-1/+2
| | | | | | Task-number: QTBUG-44629 Change-Id: I70e20209b6b33f7adcbcafc6b7d959660cdc2e87 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: QDataStream Serializing doc errorNico Vertriest2015-03-111-2/+12
| | | | | | Task-number: QTBUG-44707 Change-Id: I0ccfb47fe0b2464c5b7331040ea658ace3442366 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Document Q_ENUM and Q_FLAGOlivier Goffart2015-03-033-15/+14
| | | | | | | | | | | | [ChangeLog][QtCore] Q_ENUMS and Q_FLAGS have been deprecated, and replaced by Q_ENUM and Q_FLAG macros. These two new macros automatically register the enum with the Qt metatype system, allowing automatic conversion to or from string in QVariant, or to show the strings by QDebug operators. They also enable the new QMetaEnum::fromType function. Change-Id: I80cccd7ad3fc46b11aee2fe50681a8126debf972 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix various qdoc-warnings.Friedemann Kleint2015-02-251-1/+1
| | | | | | | | | | qtbase/src/corelib/doc/src/containers.qdoc:28: warning: Can't link to 'QList:end()' qtbase/src/corelib/kernel/qmetaobject.cpp:2680: warning: Cannot find 'fromType(...)' in '\fn' QMetaEnum QMetaEnum::fromType() const qtbase/src/corelib/kernel/qmetatype.cpp:1117: warning: Cannot find 'qMetaTypeTypeImpl(...)' in '\fn' int qMetaTypeTypeImpl(const char *typeName) qtbase/src/corelib/plugin/qplugin.qdoc:48: warning: Cannot find file to quote from: 'plugins/interfaces.h' Change-Id: Ie613253211e16ec616ccb70c24c625a9d5352d1b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-243-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Doc: corrected link/autolink issues in corelibNico Vertriest2015-02-241-1/+1
| | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: I31da92e3a7c4dd7b75ee283dbfecd77e284978ca Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Fix links in plural words.Florian Bruhin2015-02-162-4/+4
| | | | | | | | | | | | | | | | In some documents, "{QObject}s" was used which didn't show up as link. This is fixed by using "\l{QObject}s" instead. Change-Id: I90dbd543790842b242a11f3f94a32d4273ebb38d Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Doc: Fix QTextStream::readLine() snippetAlexander Volkov2015-02-181-3/+3
| | | | | | | | | | | | | | | | | | The old snippet is incomplete because it misses an extra check in the loop body that the line is not null. Use the new readLine() overload to keep it simple. Change-Id: Ie9f13291ca6ff6f546b81f100ce58d747f0dd12f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Updated BSD licensed file headersJani Heikkinen2015-02-15140-420/+420
| | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-133-4/+4
| | | | | | | | | | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update copyright headersJani Heikkinen2015-02-11163-847/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-0/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: link issues in corelibNico Vertriest2015-01-161-0/+11
| | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: Ia80802e698f16730698e9a90102f549fb35f9305 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Add QtInfoMsgKai Koehne2015-01-092-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an 'info' message type that can be used for messages that are neither warnings (QtWarningMsg), nor for debugging only (QtDebugMsg). This is useful mainly for applications that do not have to adhere to the 'do not print anything by default' paradigm that we have for the Qt libraries itself. [ChangeLog][QtCore][Logging] QtInfoMsg got added as a new QtMsgType. Use the new qInfo(), qCInfo() macros to log to it. Change-Id: I810995d63de46c41a9a99a34d37c0d417fa87a05 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | Add qHashRange and qHashRangeCommutativeMarc Mutz2015-01-091-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qHashRange() takes an (input iterator) range and hashes each element, combining the hash values using the hash combiner from Boost/N1837 with the magic number 0x9e3779b9, as described here: http://stackoverflow.com/questions/4948780/magic-number-in-boosthash-combine qHashRangeCommutative() does the same but with a cummutative combiner (unsigned addition) to create hash values that are order-independent, e.g. for hashed containers. The obvious combiner, XOR, is a bad one because it eliminates duplicate elements. Signed addition cannot be used, since signed overflow leads to undefined behavior. [ChangeLog][QtCore] Added qHashRange() and qHashRangeCommutative() functions to aid implementing qHash() overloads for custom types. Change-Id: I3c2bbc9ce4bd0455262a70e0cf248486525e534f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-181-1/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * doc: Clarify NOTIFY emission with MEMBER variablesAlejandro Exojo2014-12-101-1/+4
| | | | | | | | | | | | | | | | Document that NOTIFY signals should be emitted only when really needed, and that such is the case with MEMBER variables. Change-Id: Icc38a0790aa43ffe8f24d124da966b4240a41a6f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-249-36/+29
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Doc: Corrected autolink errors corelibNico Vertriest2014-11-205-23/+21
| | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: I551c2af94bb61fcc2494792761dab92d537e5068 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Doc: Added brief statement to group definitionNico Vertriest2014-11-192-0/+2
| | | | | | | | | | | | | | Groups: richtext and sharing. Task-number: QTBUG-42682 Change-Id: I46bd7e5bba0f665519ee4f3c033b971f0836e314 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Doc: Corrected brief statement for overview pageNico Vertriest2014-11-141-1/+2
| | | | | | | | | | | | Task-number: QTBUG-42682 Change-Id: I28afbb8b09d5568f3fae29fdfc5a3d15376b72de Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge remote-tracking branch 'origin/5.3' into 5.4.0Oswald Buddenhagen2014-11-101-8/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Iad9ef6bf7d6111efba8232a7d9b46bb9974912f5
| | * Fix QString::sprintf documentationKai Koehne2014-11-051-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString::sprintf does actually support all length modifiers, including %lld. The format string is also parsed as UTF-8. What's worthwile to mention, though, is that %lc and %ls is at odds with the standard, since wchar_t isn't necessarily 16 bits wide. Change-Id: I30cd22ec5b42035824dd98e3cdcc79d7adcc953a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Doc: Corrected identifiers for QByteArray::toBase64 in snippetNico Vertriest2014-10-271-4/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-40944 Change-Id: I31fc23739b3e145b3668b10fdf4465c19d2fdb01 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | | qwindowsmime.cpp: support dropping multiple mail attachmentsDavid Faure2014-11-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the data for the first file could be reached with the mimetype application/x-qt-windows-mime;value="FileContents" To get the data for the other files, setting the lindex field of the FORMATETC struct is necessary. Provide support for that by appending ;index=N to the mimetype string. The Windows API provides no generic way to find out how many of these are available (the app has to find out by looking into the FILEGROUPDESCRIPTORW structure, for this particular use case), so these additional mimetypes are not listed in QMimeData::formats(). However this patch extends the documentation to mention the feature. [ChangeLog][Platform Specific Changes][Windows][QMimeData] Add support for handling dropping of multiple mail attachments, adding ;index=N to the mimetype string application/x-qt-windows-mime;value="FileContents" Task-number: QTBUG-17373 Change-Id: I031e477d2357b4e5135d2dcd3e3cf991025715a5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-202-16/+13
|\| | | | | | | | | | | Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
| * | Move Qt Core examples under a common subdirectoryTopi Reinio2014-10-172-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Core examples were scattered into several subdirectories under qtbase/examples. This caused an issue with the example manifest file generated by QDoc; it expects to find all examples under a common directory in order to produde correct paths to the example .pro files. Qt Creator will not find the examples without a valid manifest file. This change moves the examples and edits the documentation files accordingly. Task-number: QTBUG-41963 Change-Id: I51d86782e0ba21c5c9bae5f15401ec774abe5cf8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-0911-693/+51
|\| | | | | | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Oswald Buddenhagen2014-10-071-0/+7
| |\ \
| | * | Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-061-0/+7
| | |\| | | | | | | | | | | | | Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
| | | * Doc: Clarify QBitArray::fill() documentationTopi Reinio2014-10-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a minor mistake in the the function parameter documentation, and add a code snippet. Task-number: QTBUG-39782 Change-Id: Ia5d88a983ad683ae5bde9f332d51adc4afda77a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | Doc: deletion plugin-howtos.qdocNico Vertriest2014-10-077-683/+39
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Document is moved to qtdoc/doc/src/howtos Including snippet files. Task-number: QTBUG-38412 Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Update the signal and slots docsAlex Blasche2014-10-021-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lifts the documentation into a more recent context. One might argue that Qt is a little bit older too. Change-Id: I3e85f21bbad1179136629c2025e3499481fc8334 Task-number: QTBUG-16809 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * | Doc: fix misleading documentation of QProcess::set[Process]EnvironmentJoerg Bornemann2014-10-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example suggested that QProcess searches the PATH variable to find the executable for the child process. That's not true. The environment that's passed with setProcessEnvironment is just passed to the child process. Removed the misleading example and fixed the function's description. Task-number: QTBUG-7321 Change-Id: I8ac4b6b02002eb0a99686f09bcf45f9bc677c8e2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
| * | Doc: Use title case in section1 titlesNico Vertriest2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-296-144/+91
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * | Doc: Restructure "Signal & Slots" articleSze Howe Koh2014-09-251-70/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put sections with similar content together: - Put "A Small Example" next to "A Real Example". - Put "Signals and Slots", "Signals", and "Slots" together. Altogether, these 3 sections contain lots of repeated content and should be consolidated in a future commit. This patch only moves content around without adding, removing, or modifying content. Change-Id: Ic6bf6a8b51f4785a8bbe6d230c2934f2c952104d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * | Doc: Remove irrelevant sections from "Signals & Slots"Sze Howe Koh2014-09-252-50/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This article is not the right place to describe the low-level mechanisms of moc and qmake, or to discuss QMetaObject features that are unrelated to signals and slots. - Most users never need to run moc directly. - The current content only mentions qmake for moc automation, but CMake, QBS, and the Visual Studio Add-In can also do that. In light of the above 3 points, let's simply link to the "Meta-Object System" article for those who are interested in the behind-the-scenes details. Most of the content deleted by this patch are already discussed in detail in the articles "The Meta-Object System" and "Using the Meta- Object Compiler (moc)" (the former links to the latter). The exception is Snippet 5 -- this is deleted without replacement because qobject_cast() is a much safer alternative to QMetaObject::inherits() with static_cast(), so we should encourage the former. Change-Id: I638c888cedfcdfb818747edeb806213ebd54dfb6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | 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>
| * | Doc: corrected link/autolink errors in corelib/doc/srcNico Vertriest2014-09-113-12/+14
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: I0ff1523c76724e0662bafed08515ea06bbdd8381 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-012-2/+2
|\| | | | | | | | | | | Change-Id: I2811ff0b9d4097f0be60ff16e9664a5060cff23e
| * | Doc: Fixed typo "lamda".Jerome Pasion2014-08-301-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I17a3b324927407b64cabc39a0b90f0ab2e0676be Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Doc: properties, add missing parenthesisSamuel Gaist2014-08-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I97b5a96b29416ca7af145edb1a6a96595c9524da Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | QString:add (last)indexOf overload with QRegularExpressionMatch outputSamuel Gaist2014-08-271-0/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | This patch adds indexOf and lastIndexOf with QRegularExpressionMatch output overloads to QString. This allows to get the match corresponding to the index returned. [ChangeLog][QtCore][QString] Added support for retrieving the QRegularExpressionMatch to indexOf and lastIndexOf. Change-Id: Ia0ae2d3ff78864c7053ffa397874aca1d2b1c35c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add the QStorageInfo classIvan Komissarov2014-08-131-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to retrieve information about mounted volumes such as label, total/available size, filesystem type and so on. Possible use cases are: - allows to do checks about filesystem before performing actual operation (such as available/maximum volume size) - allows to retrive information about volume that can be shown in file dialogs - allows to retrieve volume for specific path and check if two or more paths belong to the same volume or not [ChangeLog][QtCore] Added QStorageInfo class to retrive information about mounted volumes and drives Change-Id: Ibf9c2e6b53ef39c5605894a4422acdbbca4030c4 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Long live QByteArrayList!Glen Mabey2014-08-092-0/+53
| | | | | | | | | | | | | | | | | | | | | | Initial submission of a new class QByteArrayList with the purpose of aggregating and then joining QByteArray instances. [ChangeLog][QtCore] Added new QByteArrayList class. Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: I503af58f125d7f44fef10360177490c933e5840f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Long live QVersionNumber!Keith Gardner2014-08-091-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | The class provides compare operators, stream operators, and hashing functions. This class aims to be compatible with (but not restricted to) the Semantic Versioning 2.0 standard (semver.org). [ChangeLog][QtCore] Added QVersionNumber class Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QCommandLineParser: support extremely concise option configuration in C++11Marc Mutz2014-08-062-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this commit to make the code in the test work: QCommandLineParser parser; parser.addOptions({ { "a", "The A option." }, { { "v", "verbose" }, "The verbose option." }, { { "i", "infile" }, "The input file.", "value" }, }); For this, QCommandLineParser needs a version of addOption that can take a list of options. That's what addOptions() is for. More importantly, the QCommandLineOption ctors mustn't be explicit. OTOH, any implicit conversion from QString or QStringList to QCommandLineOption is also undesirable. To solve this dilemma, add new QCommandLineOption ctors that just take one argument and are explicit, and make the existing ctors implicit. In order to avoid ambiguities, remove the default values of their resp. 2nd arguments. The new ctors are by intention not \since 5.4, as they are completely transparent to the user. Et voila, even better than getopt_long(3). [ChangeLog][QtCore][QCommandLineParser] Added addOptions() method. Change-Id: I5e779f3406cd0f6c8ec6ecbf6c8074af226de300 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support setting a default severity level for QLoggingCategoryKai Koehne2014-07-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to alter the default configuration for categories by passing a message type: All message types with lower severity are disabled in this category. This is useful for libraries, which shouldn't mess with the category registry itself: Setting rules, a category filter ... might cause conflicts and ordering problems, so this API should be reserved to the specific application. For the Qt categories, we have code in the default category filter that disables the 'debug' category. However, this is hardcoded, and there's no way so far for other libraries to get the same behavior. With this patch one can get the same behavior: Q_LOGGING_CATEGORY(DRIVER_USB_EVENTS, "driver.usb.events", QtWarningMsg); [ChangeLog][QtCore][Logging] Added QtMsgType argument to QLoggingCategory constructor and Q_LOGGING_CATEGORY macro that controls the default category configuration. Change-Id: Ib2902f755f9f7285d79888ec30e8f3cef95ae628 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>