summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.6Sergio Ahumada2012-11-271-18/+18
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I8b2ed2e09e9beb46bdda354017c29f00be6ae76f Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | Reviewed-by: Trust Me
* Change all ptrdiff_t to qptrdiff.Thiago Macieira2010-02-171-3/+3
| | | | Reviewed-By: Bradley T. Hughes
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-12-031-2/+4
|\
| * Fix crash in QVector::reserve when reserving smaller size on a shared vectorOlivier Goffart2009-12-011-2/+4
| | | | | | | | | | | | | | | | | | | | We cannot call realloc with aalloc smaller than asize. Also include obvious optimisation: take the qMin computation out of the loop. Task-number: QTBUG-6416 Reviewed-by: Thiago
* | QVector: fix const_iterator-=(int)hjk2009-11-301-1/+1
|/ | | | Reviewed-by: Harald Fernengel
* Fix compilation on solaris-g++-64.Thiago Macieira2009-11-131-0/+1
| | | | | | | | Add the "reserved" member to QVectorData in that configuration. Since this is only about the bootstrapped version of Qt, there are no binary compatibility issues. Reviewed-by: Bradley T. Hughes
* Fix compile error for Symbian WINSCW emulatorShane Kearns2009-11-031-1/+1
| | | | Reviewed-by: Iain
* Initialise the reserved bits to 0.Thiago Macieira2009-10-281-0/+2
| | | | | | | This is future compatibility: we must rely on them being 0 in older versions of Qt. Reviewed-by: Bradley T. Hughes
* Fix Qt containers to properly support types with strict alignments.Thiago Macieira2009-10-281-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | QContiguousCache is a new type, so there are no binary compatibility issues. QHash and QMap didn't have any public qMalloc / qFree, so the entire logic is contained in .cpp code. However, since old code will not inform us of the alignment requirements, we need to add a bit to the structure to indicate whether strict alignment is in use or not. QList doesn't require any changes. For small, movable types, they're all stored in the pointer array itself, so they're aligned. For larger types, we use new(), so types with stricter requirements should define their own operator new(). QLinkedList cannot be fixed. It uses new() on the QLinkedListNode, which contains a T type. Sorry. QVector did have public qMalloc / qFree. I've moved the calls to the inner function and made it keep the old calls if the alignment requirement is below a certain threshold. The idea is that, if it's above, no one was using QVector anyway. Reviewed-by: Bradley T. Hughes
* Fixes some warning in headersOlivier Goffart2009-09-221-3/+3
| | | | | | | | | such as margins.h:90: warning: declaration of ???bottom??? shadows a member of _this_" 'a' stands for argument Reviewed-by: jbache
* Fix -Wconversion warnings where possible.David Faure2009-09-131-3/+3
| | | | | | | | | | | | In order to detect "int foo = myQReal" mistakes, one needs to compile with -Wconversion. However that flag triggers many warnings inside Qt. This commit fixes many of them, like qchar.h:295: warning: conversion to 'ushort' from 'unsigned int' may alter its value qglobal.h:1026: warning: conversion to 'qreal' from 'qint64' may alter its value qbytearray.h:441: warning: conversion to 'char' from 'int' may alter its value Other warnings remain (such as those coming from bitfields) Merge-request: 1460 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge commit 'qt/master-stable'Jason Barron2009-08-041-4/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/openssl/openssl.pri demos/embedded/embedded.pro examples/itemviews/chart/chart.pro examples/network/network.pro examples/painting/painterpaths/painterpaths.pro examples/threads/mandelbrot/mandelbrot.pro qmake/project.cpp src/3rdparty/libtiff/libtiff/tif_config.h src/corelib/arch/arch.pri src/corelib/global/qglobal.cpp src/corelib/kernel/kernel.pri src/corelib/kernel/qcore_unix_p.h src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/corelib/tools/qsharedpointer_impl.h src/corelib/tools/tools.pri src/gui/kernel/qaction.h src/gui/kernel/qapplication.cpp src/gui/painting/qregion.h src/gui/widgets/qlineedit.cpp src/gui/widgets/qlineedit_p.h src/network/socket/qnativesocketengine_unix.cpp tests/auto/qdir/tst_qdir.cpp tests/auto/qdiriterator/tst_qdiriterator.cpp tests/auto/qhttp/qhttp.pro tests/auto/qline/qline.pro tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qresourceengine/qresourceengine.pro tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qstring/qstring.pro tests/auto/qtcpsocket/qtcpsocket.pro tests/auto/qtcpsocket/tst_qtcpsocket.cpp
| * | Remove "no-stl" from the build key and add compatibility for old plugins.Thiago Macieira2009-07-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STL support hasn't had binary compatibility effects for the entire lifetime of Qt 4, so it should never have been there. It is a legacy thing I am now correcting. When inspecting a plugin, remove the "no-stl" from its loaded build key. That indicates a pre-4.6 build, since now Qt no longer adds it to its own build keys. Note that you have to remove the 4.6 plugin cache from $HOME/.config/Trolltech.conf or the registry for this change to work (if you compile Qt with -no-stl). Otherwise, plugins that have already been scanned will fail to load. Reviewed-by: Bradley T. Hughes
* | | Merge commit 'qt/master-stable'Jason Barron2009-07-271-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
| * | avoids strict-antialiasing breakage warningsThierry Bastian2009-07-151-1/+3
| | |
* | | Merge commit 'qt/master-stable' into 4.6-mergedJason Barron2009-06-301-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore configure.exe src/corelib/concurrent/qtconcurrentthreadengine.h src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicssceneevent.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_p.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qwidget.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkaccesshttpbackend.cpp tests/auto/network-settings.h tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro tests/auto/qvariant/tst_qvariant.cpp
| * | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
| |\|
| | * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Manually fix bad merges and make sure everything compiles with 4.6.Harald Fernengel2009-06-291-10/+10
| | |
* | | Merge commit 'qt/master-stable' into 4.6-stableJason Barron2009-06-251-75/+72
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 4.6 into the Qt-S60 repo. Conflicts: configure.exe mkspecs/features/qttest_p4.prf qmake/generators/makefile.cpp src/corelib/io/qdir.cpp src/corelib/io/qprocess.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qobject.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/corelib/thread/qthread_p.h src/corelib/tools/qvector.h src/gui/dialogs/qdialog.cpp src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qmessagebox.cpp src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsview.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/painting/qdrawhelper.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qmenubar.cpp src/network/socket/qlocalserver.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qitemdelegate/tst_qitemdelegate.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qpixmap/qpixmap.pro
| * | Fixed build error with Sun CC 5.5.jasplin2009-06-041-1/+8
| | | | | | | | | | | | Reviewed-by: TrustMe
| * | Make QVectorTypedData inheriting from QVectorDataOlivier Goffart2009-05-181-13/+3
| | | | | | | | | | | | | | | | | | | | | This way the content of QVectorData is not duplicated in the code. Reviewed-by: Thiago Reviewed-by: Brad
| * | Fix warning on QVector with gcc4.4Olivier Goffart2009-05-181-77/+77
| |/ | | | | | | | | | | | | | | | | | | | | | | Use QVectorData whenever possible instead of QVectorTypedData. It is not safe to convert the shared_null to QVectorTypedData as different instance of qvector with different type may cast it in the same function (because everything is inline) and that would break strict aliasing. Reviewed-by: Thiago Reviewed-by: Brad
* / Make Qt exception safer.Robert Griebl2009-06-101-45/+53
|/ | | | | | | | Squashed commit of the branch haralds-haralds-qt-s60-topics/topic/exceptions, which also contains the full history. Rev-By: Harald Fernengel Rev-By: Ralf Engels
* Fix reentrancy of QVector and QStringOlivier Goffart2009-05-081-1/+1
| | | | | | The d->capacity could be modified even if ref was more than 1 Reviewed-by: Marius Storm-Olsen
* Compile with namespaceJarek Kobus2009-04-151-0/+2
| | | | Reviewed-by: hjk <qtc-committer@nokia.com>
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+776