summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-16 10:19:02 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-16 10:19:02 +0200
commit276d60a4d6c9d1b72c4aa7df1f86e7ce9097beeb (patch)
tree73130ce8a80181fb9d234028c5057d7eb86f02ab /src/corelib
parent850b602c7a72635eb37a998089ee085d5d505c34 (diff)
parent173099696f44073441975febfa35ddfb3585e8c5 (diff)
Merge remote branch 'origin/master' into refactor
Conflicts: src/modules/qt_openvg.pri src/widgets/to_be_moved/qlinecontrol_p.h
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/io/qdatastream.h7
-rw-r--r--src/corelib/tools/qlist.cpp91
3 files changed, 6 insertions, 96 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 35edcdb1a1..a16bf2599d 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -44,11 +44,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "4.8.0"
+#define QT_VERSION_STR "5.0.0"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x040800
+#define QT_VERSION 0x050000
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index d19fcc5377..6a14e7c410 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -86,10 +86,11 @@ public:
Qt_4_5 = 11,
Qt_4_6 = 12,
Qt_4_7 = Qt_4_6,
- Qt_4_8 = Qt_4_7
-#if QT_VERSION >= 0x040900
+ Qt_4_8 = Qt_4_7,
+ Qt_4_9 = Qt_4_8,
+ Qt_5_0 = Qt_4_8
+#if QT_VERSION >= 0x050100
#error Add the datastream version for this Qt version
- Qt_4_9 = Qt_4_8
#endif
};
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 1501daf5a9..90ed7293fd 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -113,64 +113,6 @@ QListData::Data *QListData::detach_grow(int *idx, int num)
return x;
}
-#if QT_VERSION >= 0x050000
-# error "Remove QListData::detach(), it is only required for binary compatibility for 4.0.x to 4.2.x"
-#endif
-QListData::Data *QListData::detach()
-{
- Data *x = static_cast<Data *>(qMalloc(DataHeaderSize + d->alloc * sizeof(void *)));
- Q_CHECK_PTR(x);
-
- x->ref = 1;
- x->sharable = true;
- x->alloc = d->alloc;
- if (!x->alloc) {
- x->begin = 0;
- x->end = 0;
- } else {
- x->begin = d->begin;
- x->end = d->end;
- }
-
- qSwap(d, x);
- if (!x->ref.deref())
- return x;
- return 0;
-}
-
-/*!
- * Detaches the QListData by reallocating new memory.
- * Returns the old (shared) data, it is up to the caller to deref() and free()
- * For the new data node_copy needs to be called.
- *
- * \internal
- */
-#if QT_VERSION >= 0x050000
-# error "Remove QListData::detach2(), it is only required for binary compatibility for 4.3.x to 4.5.x"
-#endif
-QListData::Data *QListData::detach2()
-{
- Data *x = d;
- Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + x->alloc * sizeof(void *)));
- Q_CHECK_PTR(t);
-
- ::memcpy(t, d, DataHeaderSize + d->alloc * sizeof(void *));
-
- t->ref = 1;
- t->sharable = true;
- t->alloc = x->alloc;
- if (!t->alloc) {
- t->begin = 0;
- t->end = 0;
- } else {
- t->begin = x->begin;
- t->end = x->end;
- }
- d = t;
-
- return x;
-}
-
/*!
* Detaches the QListData by allocating new memory for a list which possibly
* has a different size than the copied one.
@@ -200,21 +142,6 @@ QListData::Data *QListData::detach(int alloc)
return x;
}
-/*!
- * Detaches the QListData by reallocating new memory.
- * Returns the old (shared) data, it is up to the caller to deref() and free()
- * For the new data node_copy needs to be called.
- *
- * \internal
- */
-#if QT_VERSION >= 0x050000
-# error "Remove QListData::detach3(), it is only required for binary compatibility for 4.5.x to 4.6.x"
-#endif
-QListData::Data *QListData::detach3()
-{
- return detach(d->alloc);
-}
-
void QListData::realloc(int alloc)
{
Q_ASSERT(d->ref == 1);
@@ -254,24 +181,6 @@ void **QListData::append()
}
// ensures that enough space is available to append the list
-#if QT_VERSION >= 0x050000
-# error "Remove QListData::append(), it is only required for binary compatibility up to 4.5.x"
-#endif
-void **QListData::append(const QListData& l)
-{
- Q_ASSERT(d->ref == 1);
- int e = d->end;
- int n = l.d->end - l.d->begin;
- if (n) {
- if (e + n > d->alloc)
- realloc(grow(e + n));
- ::memcpy(d->array + d->end, l.d->array + l.d->begin, n*sizeof(void*));
- d->end += n;
- }
- return d->array + e;
-}
-
-// ensures that enough space is available to append the list
void **QListData::append2(const QListData& l)
{
return append(l.d->end - l.d->begin);