summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Doc: Fix broken \keyword linkSze Howe Koh2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 19 counts of "Can't link to 'default-constructed value'" warnings. There was only one link to "default-constructed values", so the cleanest solution was to change the keyword. Also included a related typo fix. Change-Id: I84b47743ecb72a1b2731ef65080fa1e630d478a4 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-281-2/+2
|\| | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * Doc: Fix module name formatSze Howe Koh2013-01-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.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>
* | Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2013-01-071-4/+6
|/ | | | | | | | | | | | 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>
* Remove QUUID_STRING from qfeatures.{h,txt}Tasuku Suzuki2012-12-051-4/+0
| | | | | | | It is too specific and relatively small Change-Id: I55ec15ecaac0692741996a5c15a111db696490cf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix QVariant streaming in Qt3 compatibility mode.Jędrzej Nowacki2012-11-241-3/+3
| | | | | | Task-number: QTBUG-27700 Change-Id: I0408293e43c3330dbc4746198a19709e795f552a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make documentation of QVariant::isNull more explicit.Jędrzej Nowacki2012-09-291-1/+11
| | | | | | Task-number: QTBUG-22933 Change-Id: I1d8d3fc778ba00bcad11caaaf8af7d87186f18e8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.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>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* De-inline QVariant(float)Harald Fernengel2012-08-231-0/+3
| | | | | | | | | All QVariant constructors are not inline, so change QVariant(float) as well. This allows for refactoring of QVariant during lifetime of Qt 5 without breaking QVariant(float) case. Change-Id: Icd1fc331a1ef8a2872be811aa7d1160406038f06 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Doc: Work on QVariant's equality operator.Geir Vattekar2012-08-201-2/+13
| | | | | | Task-number: QTBUG-26018 Change-Id: I6627456d166bc0a036cadeee7bd51aa8e576a818 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QWidgetStar.Stephen Kelly2012-08-181-3/+1
| | | | | | | | | | | | This allows us to remove the odd hacks to get the static metaobject for the QWidget* metatype. The QWidget* is still an automatic metatype thanks to the QObject partial template specialization. It is registered as a metatype at runtime automatically in qwidgetsvariant.cpp. Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make the "\internal" qdoc command stand on its own lineLaszlo Papp2012-08-151-4/+9
| | | | | | | | | | The qdoc manual currently claims that the command must stand on its own line. The change follows the consistency with the rest and how the example looks like inside the qdoc manual for this command. Change-Id: I6b653dc95cf9d84e4adf32220dace5d313678419 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Speed up construction of basic QVariantsHarald Fernengel2012-08-151-37/+92
| | | | | | | | | | | | | | | | | Instead of first creating an initialized Private struct, then overwrite the member variables, we added an internal constructor that initializes the private struct sanely. In the new (inlined, internal) constructor, both the MSB bits in the bitfield are 0, and since the value of internal meta-type ID is so low that the two MSB bits should never be set, the compiler can (hopefully) optimize away the bit-fiddling initialization of the bit-field. Callgrind shows about 33% speed-up in e.g. QVariant::QVariant(int) Change-Id: I706773a71c0d8dcbe119ad15411578b81892deb5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix crash in QVariant::canConvert().Volker Krause2012-07-271-1/+4
| | | | | | | | | When containing a QObject (or sub-class) pointer and trying to convert to a QObject pointer canConvert() did dereference the pointer without checking for it being null. Change-Id: Ie274e54f2f817f2b6c5df64504f8af6359b8f38d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* fix QVariant qdoc error - mark const QVariant::data_ptr() internalJeremy Katz2012-07-271-0/+5
| | | | | | Change-Id: I1df93780f271ce06c3aa10c4bdcc1c2a43097b72 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Implement implicit constructors for built-in classes.Stephen Kelly2012-07-271-0/+126
| | | | | | Change-Id: I6b0b104bc1da3252d014615c50b81830de42e722 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Clarify ambiguous sentence in QVariant::toBool() documentation.Mitch Curtis2012-07-231-2/+2
| | | | | | Task-number: QTBUG-26482 Change-Id: Id9158ba1f7ffa5af169f808aed4559f7a0470e20 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove Qt3Support enums for q{dir,filedevice,settings,variant} in docsJeremy Katz2012-07-171-3/+0
| | | | | | Change-Id: I07942447bb756561e5c502c9a0c03b6aaf8133d1 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Implement QVariant conversions for QObject derived pointer metatypes.Stephen Kelly2012-07-011-1/+64
| | | | | | | canConvert() and convert() use the metaobject to convert such types. Change-Id: Ic05e74c5c2423b4b9682b88adc856a16dcba4cff Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Make QVariant compile with QT_NO_QUUID_STRINGJeremy Katz2012-06-201-0/+4
| | | | | | | | Task-number: QTBUG-24816 Change-Id: I76e6a6bcf1a2381e14f400648e3cb8ba554772a6 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtCore: remove \link usagesGiuseppe D'Angelo2012-05-291-4/+2
| | | | | Change-Id: I0de764b51a972de0b6eb2bf3c04d2b190f581f52 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Replace QVariant::typeToName usage by QMetaType::typeName call.Jędrzej Nowacki2012-05-281-1/+1
| | | | | | | | | Type information is kept in QMetaType class. QVariant is delegating operations, so it is better to use QMetaType directly. Change-Id: I91209fa1c9dc4303d6bd47c96824d3cd64ce5291 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace `const QLatin1String &` with `QLatin1String` where appropriateKonstantin Ritt2012-05-251-2/+2
| | | | | | | Task-Id: QTBUG-24502 Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QIcon metatype handlers back to QtGuiOlivier Goffart2012-05-181-18/+5
| | | | | | | | | | | QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant and QMetaType handler can now be moved back to QtGui. Also we can give back QIcon its old number, allowing to get rid of some compatibility hack when unstreaming QVariant Change-Id: I439d5c2987c06ecd619f394407850f678164afb8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Change to/fromAscii to to/fromUtf8 in the QString conversionsThiago Macieira2012-05-111-3/+3
| | | | | | | | | | | This commit matches the previous documentation commit that says that the conversions are applied using to/fromUtf8. Change-Id: I304e4d866ddedac5094fef8500cbeba299a02cb5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Introduce a new built-in type: signed char.Jędrzej Nowacki2012-05-081-3/+29
| | | | | | | | | | | | C++ distinguish between "char", "signed char" and "unsigned char", they are three independent types. Fix QVariant behavior on ARM. On ARM "char" may mean "unsigned char", but we depends on the sign during a numerical conversions. Change-Id: I610ce3fb88ed5964b67f3ae442d264fe16b2d261 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge "Merge remote-tracking branch 'origin/api_changes'" into ↵Lars Knoll2012-05-031-21/+1
|\ | | | | | | refs/staging/master
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-21/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| | * Remove QVariant constructor taking Qt::GlobalColor.Jędrzej Nowacki2012-04-191-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Remove redundant checks in QVariant.Jędrzej Nowacki2012-04-181-6/+0
| | | | | | | | | | | | | | | | | | | | | QVariant and QMetaType have aligned type naming implementation. Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Hide QTypeModuleInfo in a private namespace.Jędrzej Nowacki2012-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | The class is private and shouldn't pollute global namespace. Change-Id: Ib44473fd72e5a70096eeff1662e88b29263d19c6 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | Remove references to to/fromAscii in QString and QByteArray main docsThiago Macieira2012-05-031-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | Those functions are about to be deprecated and shouldn't be referred to in the main documentation. Since they were temporarily changed to mean UTF-8, this is not a behaviour change. The next commit will update the code to match the documentation. Change-Id: Ia8c2843c7f2b478f5691fe0224d5e631d94b1af6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Remove Qt 5 todo in QVariant: we're not going to change the behaviourThiago Macieira2012-04-241-2/+0
| | | | | | | | | | | | | | Task-number: QTBUG-25111 Change-Id: I2387767698c402e2bd0ecdfdd6ed41d4a224f1b6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Don't push unnecessary data to a data stream for QVariant()Thiago Macieira2012-04-201-3/+6
| | | | | | | | | | | | | | | | Adjust the test because we don't read past the end anymore. Task-number: QTBUG-25108 Change-Id: I8243f1d5ae79d1256aab2cb1132598a716a7eeeb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* | Do not assert when QVariant is constructed from an invalid type idJędrzej Nowacki2012-04-191-2/+3
| | | | | | | | | | | | | | | | | | | | That change also fix moduleForType() which was wrongly recognizing negative ids as belonging to Core. New tests were added. Change-Id: I40a5819effb32489a45937011980457387c9f8be Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Fix some unused variable warnings.Stephen Kelly2012-04-181-0/+3
|/ | | | | | Change-Id: I3ffbb155c0efa65bb33a0e2ce80dbd75dc56f3fc Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Show the type and address of QObjects in debug output.Stephen Kelly2012-04-161-1/+7
| | | | | Change-Id: I9f44ab80a6fb763adc9cbaf47de8e1b97212332d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Style: Don't put an else after a return.Stephen Kelly2012-04-131-2/+1
| | | | | Change-Id: I41d031d92489e5539f293c30a6257310f2a1c657 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-1/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Remove/update Qt 5 to-do's that won't be done for Qt 5.Jason McDonald2012-04-041-1/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-23524 Change-Id: Iebf5b78dc2ff27310b5a484bae588862417f693c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove duplicated template code.Jędrzej Nowacki2012-04-031-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | Unify TypeDefinitions specializations. I'm not aware of any reason why QVariant should have a separate set of supported types during bootstrapping phase. It would cause only crashes. As a side effect the patch reduces size of core and gui libraries. Change-Id: I5140d9d3daee39a0171bc718bf46dab6b28085ec Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Disable QUrl support in QVariant in bootstrapped modeThiago Macieira2012-03-241-0/+9
| | | | | | | | | | | | | | | | | | | | The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's internals, so let's disable it. This means those binaries are now probably a lot smaller since the parsing and IDNA code don't need to be present. Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Crash fix in ~QVariantJędrzej Nowacki2012-03-211-12/+0
| | | | | | | | | | | | | | | | QVariant handlers can not be unregistered. We are not able to guarantee that such operation is safe and we do not want to. Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix qDebug stream for an invalid QVariant.Jędrzej Nowacki2012-03-211-3/+12
| | | | | | | | | | | | | | | | | | | | This patch changes invalid QVariant qDebug stream value from "QVariant(, QVariant::Invalid)" to "QVariant(Invalid)" New tests were added. Change-Id: Ia57d4fc2d775cc9fce28e03eba402c2173845b35 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>