summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-02-23 15:30:37 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 02:41:01 +0100
commit4deeee34eb54bdd2db0813579046e449dededae4 (patch)
tree00aa1ffe2a33e0d02f7bde148bac8afc42e49516
parente68398b588360d24ef556ef184893f9302222910 (diff)
Qt3D header check: fix shadowing declarations
There are two types of shadowing: parameters shadowing members of 'this' and new virtual overrides hiding previous members. qcolor4ub.h:107:68: error: declaration of ‘xxxx’ shadows a member of 'this' [-Werror=shadow] qareaallocator.h:81:26: error: ‘virtual QList<QRect> QAreaAllocator::allocate(const QList<QSize>&)’ was hidden [-Werror=overloaded-virtual] [and a lot more] Change-Id: Iae93b013602d7349c3c19dc05a6054d6b4823b16 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/quick3d/cube.h2
-rw-r--r--src/quick3d/teapot.h2
-rw-r--r--src/threed/arrays/qarray.h364
-rw-r--r--src/threed/arrays/qcolor4ub.h30
-rw-r--r--src/threed/arrays/qcustomdataarray.h72
-rw-r--r--src/threed/arrays/qglattributedescription.h26
-rw-r--r--src/threed/arrays/qglattributevalue.h34
-rw-r--r--src/threed/arrays/qvector2darray.h6
-rw-r--r--src/threed/arrays/qvector3darray.h6
-rw-r--r--src/threed/arrays/qvector4darray.h6
-rw-r--r--src/threed/geometry/qglcube.h4
-rw-r--r--src/threed/geometry/qglcylinder.h10
-rw-r--r--src/threed/geometry/qgldome.h8
-rw-r--r--src/threed/geometry/qglsphere.h6
-rw-r--r--src/threed/geometry/qlogicalvertex.h12
-rw-r--r--src/threed/graphicsview/qgraphicstransform3d.h2
-rw-r--r--src/threed/math3d/qplane3d.h4
-rw-r--r--src/threed/math3d/qray3d.h6
-rw-r--r--src/threed/math3d/qsphere3d.h12
-rw-r--r--src/threed/math3d/qtriangle3d.h8
-rw-r--r--src/threed/scene/qglpicknode.h4
-rw-r--r--src/threed/scene/qglrenderorder.h10
-rw-r--r--src/threed/textures/qareaallocator.h9
23 files changed, 324 insertions, 319 deletions
diff --git a/src/quick3d/cube.h b/src/quick3d/cube.h
index 464f4cf8c..60f9db2e6 100644
--- a/src/quick3d/cube.h
+++ b/src/quick3d/cube.h
@@ -54,7 +54,7 @@ class Cube : public QQuickItem3D
{
Q_OBJECT
public:
- Cube(QObject *parent = 0) : QQuickItem3D(parent) {}
+ Cube(QObject *p = 0) : QQuickItem3D(p) {}
~Cube() {}
};
diff --git a/src/quick3d/teapot.h b/src/quick3d/teapot.h
index a00cec48e..ded36bb9c 100644
--- a/src/quick3d/teapot.h
+++ b/src/quick3d/teapot.h
@@ -54,7 +54,7 @@ class Teapot : public QQuickItem3D
{
Q_OBJECT
public:
- Teapot(QObject *parent = 0) : QQuickItem3D(parent) {}
+ Teapot(QObject *p = 0) : QQuickItem3D(p) {}
~Teapot() {}
};
diff --git a/src/threed/arrays/qarray.h b/src/threed/arrays/qarray.h
index 10fb58d66..a2d5553ec 100644
--- a/src/threed/arrays/qarray.h
+++ b/src/threed/arrays/qarray.h
@@ -156,7 +156,7 @@ class QArray : private QtArrayData<T, PreallocSize>
{
public:
QArray();
- explicit QArray(int size);
+ explicit QArray(int arraySize);
QArray(int size, const T &value);
QArray(const T *values, int size);
QArray(const QArray<T, PreallocSize> &other);
@@ -202,11 +202,11 @@ public:
iterator insert(iterator before, int count, const T &value);
iterator insert(iterator before, const T &value);
- void replace(int index, const T &value);
- void replace(int index, const T *values, int count);
+ void replace(int index, const T &newValue);
+ void replace(int index, const T *values, int countToAdd);
void remove(int index);
- void remove(int index, int count);
+ void remove(int index, int countToRemove);
void removeFirst() { remove(0); }
void removeLast() { remove(size() - 1); }
@@ -222,7 +222,7 @@ public:
void reserve(int size);
void squeeze();
- QArray<T, PreallocSize> &fill(const T &value, int size = -1);
+ QArray<T, PreallocSize> &fill(const T &fillValue, int fillCount = -1);
void reverse();
QArray<T, PreallocSize> reversed() const;
@@ -270,8 +270,8 @@ public:
inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; }
inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; }
- inline void push_back(const T &value) { append(value); }
- inline void push_front(const T &value) { prepend(value); }
+ inline void push_back(const T &newValue) { append(newValue); }
+ inline void push_front(const T &newValue) { prepend(newValue); }
inline void pop_back() { Q_ASSERT(!isEmpty()); removeLast(); }
inline void pop_front() { Q_ASSERT(!isEmpty()); removeFirst(); }
inline bool empty() const { return isEmpty(); }
@@ -325,17 +325,17 @@ private:
void detach_helper();
void assign(const QArray<T, PreallocSize> &other);
void grow(int needed);
- void setSize(int size);
+ void setSize(int newSize);
};
int Q_QT3D_EXPORT qArrayAllocMore(int alloc, int extra, int sizeOfT);
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::free(T *data, int count)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::free(T *dataptr, int count_)
{
- while (count-- > 0) {
- data->~T();
- ++data;
+ while (count_-- > 0) {
+ dataptr->~T();
+ ++dataptr;
}
}
@@ -356,29 +356,29 @@ Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::release()
// Copy values to initialized memory, replacing previous values.
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::copyReplace(T *dst, const T *src, int count)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::copyReplace(T *dst, const T *src, int acount)
{
if (!QTypeInfo<T>::isStatic) {
- ::memmove(dst, src, count * sizeof(T));
+ ::memmove(dst, src, acount * sizeof(T));
} else {
- while (count-- > 0)
+ while (acount-- > 0)
*dst++ = *src++;
}
}
// Make a copy of m_data, while remaining exception-safe.
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::Data *QArray<T, PreallocSize>::copyData(const T *src, int size, int capacity)
+Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::Data *QArray<T, PreallocSize>::copyData(const T *src, int asize, int acapacity)
{
- Data *data = reinterpret_cast<Data *>
- (malloc(sizeof(Data) + sizeof(T) * (capacity - 1)));
- Q_CHECK_PTR(data);
- data->ref.store(1);
- data->capacity = capacity;
- T *dst = data->array;
+ Data *newdata = reinterpret_cast<Data *>
+ (malloc(sizeof(Data) + sizeof(T) * (acapacity - 1)));
+ Q_CHECK_PTR(newdata);
+ newdata->ref.store(1);
+ newdata->capacity = acapacity;
+ T *dst = newdata->array;
int copied = 0;
QT_TRY {
- while (copied < size) {
+ while (copied < asize) {
new (dst) T(*src++);
++dst;
++copied;
@@ -386,31 +386,31 @@ Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::Data *QArray<T, PreallocSize
} QT_CATCH(...) {
while (copied-- > 0)
(--dst)->~T();
- ::free(data);
+ ::free(newdata);
QT_RETHROW;
}
- return data;
+ return newdata;
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::reallocate(int capacity)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::reallocate(int acapacity)
{
- int size = m_end - m_start;
+ int size_ = m_end - m_start;
if (!QTypeInfo<T>::isStatic) {
- Data *data = reinterpret_cast<Data *>
- (realloc(m_data, sizeof(Data) + sizeof(T) * (capacity - 1)));
- Q_CHECK_PTR(data);
- data->capacity = capacity;
- m_data = data;
+ Data *newdata = reinterpret_cast<Data *>
+ (realloc(m_data, sizeof(Data) + sizeof(T) * (acapacity - 1)));
+ Q_CHECK_PTR(newdata);
+ newdata->capacity = acapacity;
+ m_data = newdata;
} else {
- Data *data = copyData(m_data->array, size, capacity);
- free(m_data->array, size);
+ Data *newdata = copyData(m_data->array, size_, acapacity);
+ free(m_data->array, size_);
::free(m_data);
- m_data = data;
+ m_data = newdata;
}
m_start = m_data->array;
- m_end = m_start + size;
- m_limit = m_start + capacity;
+ m_end = m_start + size_;
+ m_limit = m_start + acapacity;
}
template <typename T, int PreallocSize>
@@ -424,14 +424,14 @@ Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::detach_helper()
}
// Allocate a new block on the heap and copy the data across.
- int size = m_end - m_start;
- int capacity = qArrayAllocMore(size, 0, sizeof(T));
- m_data = copyData(m_start, size, capacity);
+ int size_ = m_end - m_start;
+ int newcapacity = qArrayAllocMore(size_, 0, sizeof(T));
+ m_data = copyData(m_start, size_, newcapacity);
// Update the start/end/append pointers for faster updates.
m_start = m_data->array;
- m_end = m_start + size;
- m_limit = m_start + capacity;
+ m_end = m_start + size_;
+ m_limit = m_start + newcapacity;
}
template <typename T, int PreallocSize>
@@ -463,22 +463,22 @@ Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::assign(const QArray<T, Preall
template <typename T, int PreallocSize>
Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::grow(int needed)
{
- int size = m_end - m_start;
- int capacity = qArrayAllocMore(size, needed, sizeof(T));
+ int size_ = m_end - m_start;
+ int newcapacity = qArrayAllocMore(size_, needed, sizeof(T));
if (!m_data || m_data->ref.load() != 1) {
// Copy preallocated, raw, or shared data and expand the capacity.
- Data *data = copyData(m_start, size, capacity);
+ Data *newdata = copyData(m_start, size_, newcapacity);
if (this->isPrealloc(m_start))
- free(m_start, size);
+ free(m_start, size_);
if (m_data)
m_data->ref.deref();
- m_data = data;
- m_start = data->array;
- m_end = m_start + size;
- m_limit = m_start + capacity;
- } else if ((size + needed) > m_data->capacity) {
+ m_data = newdata;
+ m_start = newdata->array;
+ m_end = m_start + size_;
+ m_limit = m_start + newcapacity;
+ } else if ((size_ + needed) > m_data->capacity) {
// Reallocate to create more capacity.
- reallocate(capacity);
+ reallocate(newcapacity);
} else {
// We have enough capacity - just fix the append limit.
// This can happen when an array is copied and then the
@@ -488,22 +488,22 @@ Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::grow(int needed)
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::setSize(int size)
+Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::setSize(int newSize)
{
- if (size <= PreallocSize) {
+ if (newSize <= PreallocSize) {
initPrealloc();
m_data = 0;
} else {
- int capacity = qArrayAllocMore(size, 0, sizeof(T));
- Data *data = reinterpret_cast<Data *>
- (malloc(sizeof(Data) + sizeof(T) * (capacity - 1)));
- Q_CHECK_PTR(data);
- m_data = data;
+ int newcapacity = qArrayAllocMore(newSize, 0, sizeof(T));
+ Data *newdata = reinterpret_cast<Data *>
+ (malloc(sizeof(Data) + sizeof(T) * (newcapacity - 1)));
+ Q_CHECK_PTR(newdata);
+ m_data = newdata;
m_data->ref.store(1);
- m_data->capacity = capacity;
+ m_data->capacity = newcapacity;
m_start = m_data->array;
m_end = m_start;
- m_limit = m_start + capacity;
+ m_limit = m_start + newcapacity;
}
}
@@ -515,26 +515,26 @@ Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray()
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(int size)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(int arraySize)
{
- setSize(size);
- while (size-- > 0)
+ setSize(arraySize);
+ while (arraySize-- > 0)
new (m_end++) T();
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(int size, const T &value)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(int arraySize, const T &fillValue)
{
- setSize(size);
- while (size-- > 0)
- new (m_end++) T(value);
+ setSize(arraySize);
+ while (arraySize-- > 0)
+ new (m_end++) T(fillValue);
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(const T *values, int size)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(const T *values, int arraySize)
{
- setSize(size);
- while (size-- > 0)
+ setSize(arraySize);
+ while (arraySize-- > 0)
new (m_end++) T(*values++);
}
@@ -545,11 +545,11 @@ Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(const QArray<T, PreallocSize>
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(const T *data, int size, bool isWritable)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize>::QArray(const T *dataptr, int arraySize, bool isWritable)
{
// Constructing a raw data array.
- m_start = const_cast<T *>(data);
- m_end = m_start + size;
+ m_start = const_cast<T *>(dataptr);
+ m_end = m_start + arraySize;
if (isWritable)
m_limit = m_end;
else
@@ -670,22 +670,22 @@ Q_OUTOFLINE_TEMPLATE T QArray<T, PreallocSize>::value(int index, const T &defaul
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE T *QArray<T, PreallocSize>::extend(int size)
+Q_INLINE_TEMPLATE T *QArray<T, PreallocSize>::extend(int newSize)
{
- Q_ASSERT(size > 0);
- if ((m_end + size) >= m_limit)
- grow(size);
- T *end = m_end;
- m_end += size; // Note: new elements are not initialized.
- return end;
+ Q_ASSERT(newSize > 0);
+ if ((m_end + newSize) >= m_limit)
+ grow(newSize);
+ T *oldend = m_end;
+ m_end += newSize; // Note: new elements are not initialized.
+ return oldend;
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::append(const T &value)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::append(const T &newValue)
{
if (m_end >= m_limit)
grow(1);
- new (m_end) T(value);
+ new (m_end) T(newValue);
++m_end;
}
@@ -729,13 +729,13 @@ Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::append(const T &value1, const T
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::append(const T *values, int count)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::append(const T *values, int countToAdd)
{
- if (count <= 0)
+ if (countToAdd <= 0)
return;
- if (!m_start || (m_end + count) > m_limit)
- grow(count);
- while (count-- > 0) {
+ if (!m_start || (m_end + countToAdd) > m_limit)
+ grow(countToAdd);
+ while (countToAdd-- > 0) {
new (m_end) T(*values++);
++m_end;
}
@@ -754,66 +754,66 @@ Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::append(const QArray<T, Preall
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::prepend(const T &value)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::prepend(const T &newValue)
{
- insert(begin(), 1, value);
+ insert(begin(), 1, newValue);
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::insert(int index, const T &value)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::insert(int index, const T &newValue)
{
Q_ASSERT_X(index >= 0 && index <= size(),
"QArray<T>::insert", "index out of range");
- insert(begin() + index, 1, value);
+ insert(begin() + index, 1, newValue);
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::insert(int index, int count, const T &value)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::insert(int index, int countToAdd, const T &newValue)
{
Q_ASSERT_X(index >= 0 && index <= size(),
"QArray<T>::insert", "index out of range");
- insert(begin() + index, count, value);
+ insert(begin() + index, countToAdd, newValue);
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::insert(iterator before, int count, const T &value)
+Q_OUTOFLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::insert(iterator before, int countToAdd, const T &newValue)
{
// Check the parameters.
- int size = this->size();
+ int size_ = this->size();
int offset = int(before - m_start);
- Q_ASSERT_X(offset >= 0 && offset <= size,
+ Q_ASSERT_X(offset >= 0 && offset <= size_,
"QArray<T>::insert", "iterator offset is out of range");
- Q_ASSERT(count >= 0);
- if (count <= 0)
+ Q_ASSERT(countToAdd >= 0);
+ if (countToAdd <= 0)
return m_start + offset;
// Reserve extra space and then copy-on-write.
- reserve(size + count);
+ reserve(size_ + countToAdd);
detach();
// Move items up to make room, and replace at the insert point.
if (QTypeInfo<T>::isStatic) {
- int newcount = count;
+ int newcount = countToAdd;
while (newcount > 0) {
new (m_end++) T();
--newcount;
}
- int posn = size;
+ int posn = size_;
while (posn > offset) {
--posn;
- m_start[posn + count] = m_start[posn];
+ m_start[posn + countToAdd] = m_start[posn];
}
- while (count > 0) {
- --count;
- m_start[offset + count] = value;
+ while (countToAdd > 0) {
+ --countToAdd;
+ m_start[offset + countToAdd] = newValue;
}
} else {
- ::memmove(m_start + offset + count, m_start + offset,
- (size - offset) * sizeof(T));
- m_end += count;
- while (count > 0) {
- --count;
- new (m_start + offset + count) T(value);
+ ::memmove(m_start + offset + countToAdd, m_start + offset,
+ (size_ - offset) * sizeof(T));
+ m_end += countToAdd;
+ while (countToAdd > 0) {
+ --countToAdd;
+ new (m_start + offset + countToAdd) T(newValue);
}
}
@@ -822,28 +822,28 @@ Q_OUTOFLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, Preall
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::insert(iterator before, const T &value)
+Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::insert(iterator before, const T &newValue)
{
- return insert(before, 1, value);
+ return insert(before, 1, newValue);
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::replace(int index, const T &value)
+Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::replace(int index, const T &newValue)
{
Q_ASSERT_X(index >= 0 && index < size(),
"QArray<T>::replace", "index out of range");
- data()[index] = value;
+ data()[index] = newValue;
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::replace(int index, const T *values, int count)
+Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::replace(int index, const T *values, int countToAdd)
{
- if (index < 0 || count <= 0)
+ if (index < 0 || countToAdd <= 0)
return;
- int replaceSize = index + count;
+ int replaceSize = index + countToAdd;
if (replaceSize > size())
resize(replaceSize);
- copyReplace(data() + index, values, count);
+ copyReplace(data() + index, values, countToAdd);
}
template <typename T, int PreallocSize>
@@ -853,35 +853,35 @@ Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::remove(int index)
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::remove(int index, int count)
+Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::remove(int index, int countToRemove)
{
// Truncate the range to be removed.
int currentSize = size();
if (index < 0) {
- count += index;
+ countToRemove += index;
index = 0;
}
- if (count > 0 && (index + count) > currentSize)
- count = currentSize - index;
- if (count <= 0)
+ if (countToRemove > 0 && (index + countToRemove) > currentSize)
+ countToRemove = currentSize - index;
+ if (countToRemove <= 0)
return;
// Perform the removal.
- if (index == 0 && count >= currentSize) {
+ if (index == 0 && countToRemove >= currentSize) {
clear();
return;
}
T *start = data();
- copyReplace(start + index, start + index + count,
- (currentSize - (index + count)));
- resize(currentSize - count);
+ copyReplace(start + index, start + index + countToRemove,
+ (currentSize - (index + countToRemove)));
+ resize(currentSize - countToRemove);
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::erase(iterator begin, iterator end)
+Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocSize>::erase(iterator from, iterator to)
{
- int index = begin - m_start;
- remove(index, end - begin);
+ int index = from - m_start;
+ remove(index, to - from);
return m_start + index;
}
@@ -894,13 +894,13 @@ Q_INLINE_TEMPLATE typename QArray<T, PreallocSize>::iterator QArray<T, PreallocS
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::indexOf(const T &value, int from) const
+Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::indexOf(const T &needle, int from) const
{
if (from < 0)
from = qMax(from + size(), 0);
const T *ptr = m_start + from;
while (ptr < m_end) {
- if (*ptr == value)
+ if (*ptr == needle)
return ptr - m_start;
++ptr;
}
@@ -908,17 +908,17 @@ Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::indexOf(const T &value, int fr
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::lastIndexOf(const T &value, int from) const
+Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::lastIndexOf(const T &needle, int from) const
{
- int size = count();
+ int size_ = count();
if (from < 0)
- from += size;
- else if (from >= size)
- from = size - 1;
+ from += size_;
+ else if (from >= size_)
+ from = size_ - 1;
if (from >= 0) {
const T *ptr = m_start + from;
while (ptr >= m_start) {
- if (*ptr == value)
+ if (*ptr == needle)
return ptr - m_start;
--ptr;
}
@@ -927,11 +927,11 @@ Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::lastIndexOf(const T &value, in
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE bool QArray<T, PreallocSize>::contains(const T &value) const
+Q_INLINE_TEMPLATE bool QArray<T, PreallocSize>::contains(const T &needle) const
{
const T *ptr = m_start;
while (ptr < m_end) {
- if (*ptr == value)
+ if (*ptr == needle)
return true;
++ptr;
}
@@ -939,32 +939,32 @@ Q_INLINE_TEMPLATE bool QArray<T, PreallocSize>::contains(const T &value) const
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::count(const T &value) const
+Q_OUTOFLINE_TEMPLATE int QArray<T, PreallocSize>::count(const T &needle) const
{
const T *ptr = m_start;
- int count = 0;
+ int n = 0;
while (ptr < m_end) {
- if (*ptr == value)
- ++count;
+ if (*ptr == needle)
+ ++n;
++ptr;
}
- return count;
+ return n;
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::resize(int size)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::resize(int newSize)
{
- if (size < 0)
+ if (newSize < 0)
return;
int currentSize = count();
- if (size < currentSize) {
+ if (newSize < currentSize) {
T *start = data(); // Force copy on write if necessary.
if (QTypeInfo<T>::isComplex)
- free(start + size, currentSize - size);
- m_end = start + size;
- } else if (size > currentSize) {
- grow(size - currentSize);
- while (currentSize++ < size) {
+ free(start + newSize, currentSize - newSize);
+ m_end = start + newSize;
+ } else if (newSize > currentSize) {
+ grow(newSize - currentSize);
+ while (currentSize++ < newSize) {
new (m_end) T();
++m_end;
}
@@ -972,32 +972,32 @@ Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::resize(int size)
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::reserve(int size)
+Q_INLINE_TEMPLATE void QArray<T, PreallocSize>::reserve(int newCapacity)
{
int cap = capacity();
- if (size > cap)
- grow(size - this->size());
+ if (newCapacity > cap)
+ grow(newCapacity - this->size());
}
template <typename T, int PreallocSize>
-Q_OUTOFLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::fill(const T &value, int size)
+Q_OUTOFLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::fill(const T &fillValue, int fillCount)
{
- if (size >= 0)
- resize(size);
+ if (fillCount >= 0)
+ resize(fillCount);
T *ptr = m_start;
while (ptr < m_end)
- *ptr++ = value;
+ *ptr++ = fillValue;
return *this;
}
template <typename T, int PreallocSize>
Q_OUTOFLINE_TEMPLATE void QArray<T, PreallocSize>::squeeze()
{
- int size = count();
- if (size <= 0) {
+ int currentSize = count();
+ if (currentSize <= 0) {
clear();
- } else if (size < capacity() && m_data) {
- reallocate(size);
+ } else if (currentSize < capacity() && m_data) {
+ reallocate(currentSize);
}
}
@@ -1016,9 +1016,9 @@ template <typename T, int PreallocSize>
Q_OUTOFLINE_TEMPLATE QArray<T, PreallocSize> QArray<T, PreallocSize>::reversed() const
{
QArray<T, PreallocSize> result;
- int count = size();
- if (count > 0) {
- result.extend(count);
+ int count_ = size();
+ if (count_ > 0) {
+ result.extend(count_);
const T *src = m_start;
T *dst = result.m_end - 1;
if (!QTypeInfo<T>::isComplex) {
@@ -1035,11 +1035,11 @@ Q_OUTOFLINE_TEMPLATE QArray<T, PreallocSize> QArray<T, PreallocSize>::reversed()
template <typename T, int PreallocSize>
Q_INLINE_TEMPLATE QArray<T, PreallocSize> QArray<T, PreallocSize>::mid(int index, int length) const
{
- int count = size();
- Q_ASSERT(index >= 0 && index <= count);
- if (length < 0 || (index + length) > count)
- length = count - index;
- if (index == 0 && length == count)
+ int count_ = size();
+ Q_ASSERT(index >= 0 && index <= count_);
+ if (length < 0 || (index + length) > count_)
+ length = count_ - index;
+ if (index == 0 && length == count_)
return *this;
QArray<T, PreallocSize> result;
result.append(constData() + index, length);
@@ -1055,10 +1055,10 @@ Q_INLINE_TEMPLATE QArray<T, PreallocSize> QArray<T, PreallocSize>::left(int leng
template <typename T, int PreallocSize>
Q_INLINE_TEMPLATE QArray<T, PreallocSize> QArray<T, PreallocSize>::right(int length) const
{
- int size = count();
- if (length < 0 || length >= size)
- length = size;
- return mid(size - length, length);
+ int size_ = count();
+ if (length < 0 || length >= size_)
+ length = size_;
+ return mid(size_ - length, length);
}
template <typename T, int PreallocSize>
@@ -1124,9 +1124,9 @@ Q_INLINE_TEMPLATE bool QArray<T, PreallocSize>::operator!=
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::operator+=(const T &value)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::operator+=(const T &newValue)
{
- append(value);
+ append(newValue);
return *this;
}
@@ -1138,9 +1138,9 @@ Q_INLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::operator+=(c
}
template <typename T, int PreallocSize>
-Q_INLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::operator<<(const T &value)
+Q_INLINE_TEMPLATE QArray<T, PreallocSize> &QArray<T, PreallocSize>::operator<<(const T &newValue)
{
- append(value);
+ append(newValue);
return *this;
}
diff --git a/src/threed/arrays/qcolor4ub.h b/src/threed/arrays/qcolor4ub.h
index 5d3a34ecb..ff55ab30d 100644
--- a/src/threed/arrays/qcolor4ub.h
+++ b/src/threed/arrays/qcolor4ub.h
@@ -104,9 +104,9 @@ private:
inline QColor4ub::QColor4ub() : m_red(0), m_green(0), m_blue(0), m_alpha(255) {}
-inline QColor4ub::QColor4ub(int red, int green, int blue, int alpha)
- : m_red(uchar(red)), m_green(uchar(green)),
- m_blue(uchar(blue)), m_alpha(uchar(alpha)) {}
+inline QColor4ub::QColor4ub(int red_, int green_, int blue_, int alpha_)
+ : m_red(uchar(red_)), m_green(uchar(green_)),
+ m_blue(uchar(blue_)), m_alpha(uchar(alpha_)) {}
inline QColor4ub::QColor4ub(const QColor& color)
: m_red(uchar(color.red())), m_green(uchar(color.green())),
@@ -147,25 +147,25 @@ inline QColor4ub& QColor4ub::operator=(Qt::GlobalColor color)
return *this;
}
-inline void QColor4ub::setRgb(int red, int green, int blue, int alpha)
+inline void QColor4ub::setRgb(int red_, int green_, int blue_, int alpha_)
{
- m_red = uchar(red);
- m_green = uchar(green);
- m_blue = uchar(blue);
- m_alpha = uchar(alpha);
+ m_red = uchar(red_);
+ m_green = uchar(green_);
+ m_blue = uchar(blue_);
+ m_alpha = uchar(alpha_);
}
-inline void QColor4ub::setRgbF(float red, float green, float blue, float alpha)
+inline void QColor4ub::setRgbF(float red_, float green_, float blue_, float alpha_)
{
- m_red = uchar(qRound(red * 255.0f));
- m_green = uchar(qRound(green * 255.0f));
- m_blue = uchar(qRound(blue * 255.0f));
- m_alpha = uchar(qRound(alpha * 255.0f));
+ m_red = uchar(qRound(red_ * 255.0f));
+ m_green = uchar(qRound(green_ * 255.0f));
+ m_blue = uchar(qRound(blue_ * 255.0f));
+ m_alpha = uchar(qRound(alpha_ * 255.0f));
}
-inline QColor4ub QColor4ub::fromRgb(int red, int green, int blue, int alpha)
+inline QColor4ub QColor4ub::fromRgb(int red_, int green_, int blue_, int alpha_)
{
- return QColor4ub(red, green, blue, alpha);
+ return QColor4ub(red_, green_, blue_, alpha_);
}
inline QColor4ub QColor4ub::fromRgbF
diff --git a/src/threed/arrays/qcustomdataarray.h b/src/threed/arrays/qcustomdataarray.h
index 2730b29e3..6577e3577 100644
--- a/src/threed/arrays/qcustomdataarray.h
+++ b/src/threed/arrays/qcustomdataarray.h
@@ -92,8 +92,8 @@ public:
int elementSize() const;
void clear();
- void reserve(int size);
- void resize(int size);
+ void reserve(int newCapacity);
+ void resize(int newSize);
void squeeze();
QVariant at(int index) const;
@@ -204,14 +204,14 @@ inline void QCustomDataArray::clear()
m_array.clear();
}
-inline void QCustomDataArray::reserve(int size)
+inline void QCustomDataArray::reserve(int newCapacity)
{
- m_array.reserve(size * m_elementComponents);
+ m_array.reserve(newCapacity * m_elementComponents);
}
-inline void QCustomDataArray::resize(int size)
+inline void QCustomDataArray::resize(int newSize)
{
- m_array.resize(size * m_elementComponents);
+ m_array.resize(newSize * m_elementComponents);
}
inline void QCustomDataArray::squeeze()
@@ -230,60 +230,60 @@ inline void QCustomDataArray::setAt(int index, float x, float y)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector2D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 2;
- data[0] = x;
- data[1] = y;
+ float *dataptr = m_array.data() + index * 2;
+ dataptr[0] = x;
+ dataptr[1] = y;
}
inline void QCustomDataArray::setAt(int index, float x, float y, float z)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector3D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 3;
- data[0] = x;
- data[1] = y;
- data[2] = z;
+ float *dataptr = m_array.data() + index * 3;
+ dataptr[0] = x;
+ dataptr[1] = y;
+ dataptr[2] = z;
}
inline void QCustomDataArray::setAt(int index, float x, float y, float z, float w)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector4D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 4;
- data[0] = x;
- data[1] = y;
- data[2] = z;
- data[3] = w;
+ float *dataptr = m_array.data() + index * 4;
+ dataptr[0] = x;
+ dataptr[1] = y;
+ dataptr[2] = z;
+ dataptr[3] = w;
}
inline void QCustomDataArray::setAt(int index, const QVector2D& value)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector2D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 2;
- data[0] = value.x();
- data[1] = value.y();
+ float *dataptr = m_array.data() + index * 2;
+ dataptr[0] = value.x();
+ dataptr[1] = value.y();
}
inline void QCustomDataArray::setAt(int index, const QVector3D& value)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector3D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 3;
- data[0] = value.x();
- data[1] = value.y();
- data[2] = value.z();
+ float *dataptr = m_array.data() + index * 3;
+ dataptr[0] = value.x();
+ dataptr[1] = value.y();
+ dataptr[2] = value.z();
}
inline void QCustomDataArray::setAt(int index, const QVector4D& value)
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector4D);
Q_ASSERT(index >= 0 && index < size());
- float *data = m_array.data() + index * 4;
- data[0] = value.x();
- data[1] = value.y();
- data[2] = value.z();
- data[3] = value.w();
+ float *dataptr = m_array.data() + index * 4;
+ dataptr[0] = value.x();
+ dataptr[1] = value.y();
+ dataptr[2] = value.z();
+ dataptr[3] = value.w();
}
inline void QCustomDataArray::setAt(int index, const QColor4ub& value)
@@ -311,24 +311,24 @@ inline QVector2D QCustomDataArray::vector2DAt(int index) const
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector2D);
Q_ASSERT(index >= 0 && index < size());
- const float *data = m_array.constData() + index * 2;
- return QVector2D(data[0], data[1]);
+ const float *dataptr = m_array.constData() + index * 2;
+ return QVector2D(dataptr[0], dataptr[1]);
}
inline QVector3D QCustomDataArray::vector3DAt(int index) const
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector3D);
Q_ASSERT(index >= 0 && index < size());
- const float *data = m_array.constData() + index * 3;
- return QVector3D(data[0], data[1], data[2]);
+ const float *dataptr = m_array.constData() + index * 3;
+ return QVector3D(dataptr[0], dataptr[1], dataptr[2]);
}
inline QVector4D QCustomDataArray::vector4DAt(int index) const
{
Q_ASSERT(m_elementType == QCustomDataArray::Vector4D);
Q_ASSERT(index >= 0 && index < size());
- const float *data = m_array.constData() + index * 4;
- return QVector4D(data[0], data[1], data[2], data[3]);
+ const float *dataptr = m_array.constData() + index * 4;
+ return QVector4D(dataptr[0], dataptr[1], dataptr[2], dataptr[3]);
}
inline QColor4ub QCustomDataArray::colorAt(int index) const
diff --git a/src/threed/arrays/qglattributedescription.h b/src/threed/arrays/qglattributedescription.h
index 18dc1861c..77d02e1b8 100644
--- a/src/threed/arrays/qglattributedescription.h
+++ b/src/threed/arrays/qglattributedescription.h
@@ -86,11 +86,11 @@ inline QGLAttributeDescription::QGLAttributeDescription()
}
inline QGLAttributeDescription::QGLAttributeDescription
- (QGL::VertexAttribute attribute, int tupleSize, GLenum type, int stride)
- : m_attribute(attribute), m_type(type),
- m_tupleSize(tupleSize), m_stride(stride)
+ (QGL::VertexAttribute attribute_, int tupleSize_, GLenum type_, int stride_)
+ : m_attribute(attribute_), m_type(type_),
+ m_tupleSize(tupleSize_), m_stride(stride_)
{
- Q_ASSERT(tupleSize >= 1 && tupleSize <= 4);
+ Q_ASSERT(tupleSize_ >= 1 && tupleSize_ <= 4);
}
inline bool QGLAttributeDescription::isNull() const
@@ -103,9 +103,9 @@ inline QGL::VertexAttribute QGLAttributeDescription::attribute() const
return m_attribute;
}
-inline void QGLAttributeDescription::setAttribute(QGL::VertexAttribute attribute)
+inline void QGLAttributeDescription::setAttribute(QGL::VertexAttribute attribute_)
{
- m_attribute = attribute;
+ m_attribute = attribute_;
}
inline GLenum QGLAttributeDescription::type() const
@@ -113,9 +113,9 @@ inline GLenum QGLAttributeDescription::type() const
return m_type;
}
-inline void QGLAttributeDescription::setType(GLenum type)
+inline void QGLAttributeDescription::setType(GLenum type_)
{
- m_type = type;
+ m_type = type_;
}
inline int QGLAttributeDescription::tupleSize() const
@@ -123,10 +123,10 @@ inline int QGLAttributeDescription::tupleSize() const
return m_tupleSize;
}
-inline void QGLAttributeDescription::setTupleSize(int tupleSize)
+inline void QGLAttributeDescription::setTupleSize(int tupleSize_)
{
- Q_ASSERT(tupleSize >= 1 && tupleSize <= 4);
- m_tupleSize = tupleSize;
+ Q_ASSERT(tupleSize_ >= 1 && tupleSize_ <= 4);
+ m_tupleSize = tupleSize_;
}
inline int QGLAttributeDescription::stride() const
@@ -134,9 +134,9 @@ inline int QGLAttributeDescription::stride() const
return m_stride;
}
-inline void QGLAttributeDescription::setStride(int stride)
+inline void QGLAttributeDescription::setStride(int stride_)
{
- m_stride = stride;
+ m_stride = stride_;
}
QT_END_NAMESPACE
diff --git a/src/threed/arrays/qglattributevalue.h b/src/threed/arrays/qglattributevalue.h
index a7d9c8098..b69b826ef 100644
--- a/src/threed/arrays/qglattributevalue.h
+++ b/src/threed/arrays/qglattributevalue.h
@@ -81,7 +81,7 @@ private:
const void *m_data;
int m_count;
- void setStride(int stride) { m_stride = stride; }
+ void setStride(int stride_) { m_stride = stride_; }
void setOffset(int offset)
{ m_data = reinterpret_cast<const void *>(offset); }
@@ -124,34 +124,34 @@ inline QGLAttributeValue::QGLAttributeValue(const QArray<QColor4ub>& array)
}
inline QGLAttributeValue::QGLAttributeValue
- (int tupleSize, GLenum type, int stride, const void *data, int count)
- : m_tupleSize(tupleSize), m_type(type), m_stride(stride)
- , m_data(data), m_count(count)
+ (int tupleSize_, GLenum type_, int stride_, const void *data_, int count_)
+ : m_tupleSize(tupleSize_), m_type(type_), m_stride(stride_)
+ , m_data(data_), m_count(count_)
{
- Q_ASSERT(tupleSize >= 1 && tupleSize <= 4);
+ Q_ASSERT(tupleSize_ >= 1 && tupleSize_ <= 4);
}
inline QGLAttributeValue::QGLAttributeValue
- (int tupleSize, GLenum type, int stride, int offset, int count)
- : m_tupleSize(tupleSize), m_type(type), m_stride(stride)
- , m_data(reinterpret_cast<const void *>(offset)), m_count(count)
+ (int tupleSize_, GLenum type_, int stride_, int offset_, int count_)
+ : m_tupleSize(tupleSize_), m_type(type_), m_stride(stride_)
+ , m_data(reinterpret_cast<const void *>(offset_)), m_count(count_)
{
- Q_ASSERT(tupleSize >= 1 && tupleSize <= 4);
+ Q_ASSERT(tupleSize_ >= 1 && tupleSize_ <= 4);
}
inline QGLAttributeValue::QGLAttributeValue
- (const QGLAttributeDescription& description, const void *data, int count)
- : m_tupleSize(description.tupleSize()), m_type(description.type())
- , m_stride(description.stride()), m_data(data), m_count(count)
+ (const QGLAttributeDescription& description_, const void *data_, int count_)
+ : m_tupleSize(description_.tupleSize()), m_type(description_.type())
+ , m_stride(description_.stride()), m_data(data_), m_count(count_)
{
}
inline QGLAttributeValue::QGLAttributeValue
- (const QGLAttributeDescription& description, int offset, int count)
- : m_tupleSize(description.tupleSize()), m_type(description.type())
- , m_stride(description.stride())
- , m_data(reinterpret_cast<const void *>(offset))
- , m_count(count)
+ (const QGLAttributeDescription& description_, int offset_, int count_)
+ : m_tupleSize(description_.tupleSize()), m_type(description_.type())
+ , m_stride(description_.stride())
+ , m_data(reinterpret_cast<const void *>(offset_))
+ , m_count(count_)
{
}
diff --git a/src/threed/arrays/qvector2darray.h b/src/threed/arrays/qvector2darray.h
index d8dc47c73..5ff083975 100644
--- a/src/threed/arrays/qvector2darray.h
+++ b/src/threed/arrays/qvector2darray.h
@@ -54,7 +54,7 @@ class Q_QT3D_EXPORT QVector2DArray : public QArray<QVector2D>
{
public:
QVector2DArray();
- QVector2DArray(int size, const QVector2D& value = QVector2D());
+ QVector2DArray(int fillSize, const QVector2D& fillValue = QVector2D());
QVector2DArray(const QArray<QVector2D>& other);
void append(float x, float y);
@@ -93,8 +93,8 @@ public:
inline QVector2DArray::QVector2DArray() {}
-inline QVector2DArray::QVector2DArray(int size, const QVector2D& value)
- : QArray<QVector2D>(size, value) {}
+inline QVector2DArray::QVector2DArray(int fillSize, const QVector2D& fillValue)
+ : QArray<QVector2D>(fillSize, fillValue) {}
inline QVector2DArray::QVector2DArray(const QArray<QVector2D>& other)
: QArray<QVector2D>(other) {}
diff --git a/src/threed/arrays/qvector3darray.h b/src/threed/arrays/qvector3darray.h
index 2de8f96b9..09b0eee3d 100644
--- a/src/threed/arrays/qvector3darray.h
+++ b/src/threed/arrays/qvector3darray.h
@@ -54,7 +54,7 @@ class Q_QT3D_EXPORT QVector3DArray : public QArray<QVector3D>
{
public:
QVector3DArray();
- QVector3DArray(int size, const QVector3D& value = QVector3D());
+ QVector3DArray(int fillSize, const QVector3D& fillValue = QVector3D());
QVector3DArray(const QArray<QVector3D>& other);
void append(float x, float y, float z);
@@ -91,8 +91,8 @@ public:
inline QVector3DArray::QVector3DArray() {}
-inline QVector3DArray::QVector3DArray(int size, const QVector3D& value)
- : QArray<QVector3D>(size, value) {}
+inline QVector3DArray::QVector3DArray(int fillSize, const QVector3D& fillValue)
+ : QArray<QVector3D>(fillSize, fillValue) {}
inline QVector3DArray::QVector3DArray(const QArray<QVector3D>& other)
: QArray<QVector3D>(other) {}
diff --git a/src/threed/arrays/qvector4darray.h b/src/threed/arrays/qvector4darray.h
index fbc0ffc52..12b5f36f0 100644
--- a/src/threed/arrays/qvector4darray.h
+++ b/src/threed/arrays/qvector4darray.h
@@ -53,7 +53,7 @@ class Q_QT3D_EXPORT QVector4DArray : public QArray<QVector4D>
{
public:
QVector4DArray();
- QVector4DArray(int size, const QVector4D& value = QVector4D());
+ QVector4DArray(int fillSize, const QVector4D& fillValue = QVector4D());
QVector4DArray(const QArray<QVector4D>& other);
void append(float x, float y, float z, float w);
@@ -91,8 +91,8 @@ public:
inline QVector4DArray::QVector4DArray() {}
-inline QVector4DArray::QVector4DArray(int size, const QVector4D& value)
- : QArray<QVector4D>(size, value) {}
+inline QVector4DArray::QVector4DArray(int fillSize, const QVector4D& fillValue)
+ : QArray<QVector4D>(fillSize, fillValue) {}
inline QVector4DArray::QVector4DArray(const QArray<QVector4D>& other)
: QArray<QVector4D>(other) {}
diff --git a/src/threed/geometry/qglcube.h b/src/threed/geometry/qglcube.h
index 3242ab13e..592cfde3c 100644
--- a/src/threed/geometry/qglcube.h
+++ b/src/threed/geometry/qglcube.h
@@ -54,10 +54,10 @@ class QGLBuilder;
class Q_QT3D_EXPORT QGLCube
{
public:
- explicit QGLCube(float size = 1.0f) : m_size(size) {}
+ explicit QGLCube(float size_ = 1.0f) : m_size(size_) {}
float size() const { return m_size; }
- void setSize(float size) { m_size = size; }
+ void setSize(float size_) { m_size = size_; }
private:
float m_size;
diff --git a/src/threed/geometry/qglcylinder.h b/src/threed/geometry/qglcylinder.h
index 9dde3d05d..8ef1d21b2 100644
--- a/src/threed/geometry/qglcylinder.h
+++ b/src/threed/geometry/qglcylinder.h
@@ -53,8 +53,8 @@ class QVector2D;
class Q_QT3D_EXPORT QGLCylinder
{
public:
- explicit QGLCylinder(float diameterTop = 1.0f, float diameterBase = 1.0f, float height = 1.0f, int slices = 6, int layers = 3, bool top = true, bool base = true)
- : m_diameterTop(diameterTop), m_diameterBottom(diameterBase), m_height(height), m_slices(slices), m_layers(layers), m_top(top), m_base(base) {}
+ explicit QGLCylinder(float diameterTop_ = 1.0f, float diameterBase = 1.0f, float height_ = 1.0f, int slices_ = 6, int layers_ = 3, bool top = true, bool base = true)
+ : m_diameterTop(diameterTop_), m_diameterBottom(diameterBase), m_height(height_), m_slices(slices_), m_layers(layers_), m_top(top), m_base(base) {}
//Cylinder dimensions
float diameterTop() const {return m_diameterTop;}
@@ -64,14 +64,14 @@ public:
void setDiameterBottom(float diameter) {m_diameterBottom=diameter;}
float height() const {return m_height;}
- void setHeight(float height) {m_height = height;}
+ void setHeight(float height_) {m_height = height_;}
//Cylinder geometrical subdivisions
int slices() const {return m_slices;}
- void setSlices(int slices) {m_slices = slices;}
+ void setSlices(int slices_) {m_slices = slices_;}
int layers() const {return m_layers;}
- void setLayers(int layers) {m_layers = layers;}
+ void setLayers(int layers_) {m_layers = layers_;}
//End-caps attached?
bool topEnabled() const {return m_top;}
diff --git a/src/threed/geometry/qgldome.h b/src/threed/geometry/qgldome.h
index f93161774..134085e14 100644
--- a/src/threed/geometry/qgldome.h
+++ b/src/threed/geometry/qgldome.h
@@ -51,18 +51,18 @@ class QGLBuilder;
class Q_QT3D_EXPORT QGLDome
{
public:
- explicit QGLDome(float diameter = 1.0f, int depth = 3, bool baseEnabled = true)
- : m_diameter(diameter), m_subdivisionDepth(depth), m_baseEnabled(baseEnabled) {}
+ explicit QGLDome(float diameter_ = 1.0f, int depth = 3, bool baseEnabled_ = true)
+ : m_diameter(diameter_), m_subdivisionDepth(depth), m_baseEnabled(baseEnabled_) {}
virtual ~QGLDome();
float diameter() const { return m_diameter; }
- void setDiameter(float diameter) { m_diameter = diameter; }
+ void setDiameter(float diameter_) { m_diameter = diameter_; }
int subdivisionDepth() const { return m_subdivisionDepth; }
void setSubdivisionDepth(int depth) { m_subdivisionDepth = depth; }
bool baseEnabled() const {return m_baseEnabled; }
- void setBaseEnabled(bool baseEnabled) {m_baseEnabled = baseEnabled;}
+ void setBaseEnabled(bool enabled) {m_baseEnabled = enabled;}
private:
float m_diameter;
diff --git a/src/threed/geometry/qglsphere.h b/src/threed/geometry/qglsphere.h
index 9d1c6fe34..f40e0d7a4 100644
--- a/src/threed/geometry/qglsphere.h
+++ b/src/threed/geometry/qglsphere.h
@@ -51,12 +51,12 @@ class QGLBuilder;
class Q_QT3D_EXPORT QGLSphere
{
public:
- explicit QGLSphere(float diameter = 1.0f, int depth = 5)
- : m_diameter(diameter), m_subdivisionDepth(depth) {}
+ explicit QGLSphere(float diameter_ = 1.0f, int depth = 5)
+ : m_diameter(diameter_), m_subdivisionDepth(depth) {}
virtual ~QGLSphere();
float diameter() const { return m_diameter; }
- void setDiameter(float diameter) { m_diameter = diameter; }
+ void setDiameter(float diameter_) { m_diameter = diameter_; }
int subdivisionDepth() const { return m_subdivisionDepth; }
void setSubdivisionDepth(int depth) { m_subdivisionDepth = depth; }
diff --git a/src/threed/geometry/qlogicalvertex.h b/src/threed/geometry/qlogicalvertex.h
index 6a306e964..69898f7ed 100644
--- a/src/threed/geometry/qlogicalvertex.h
+++ b/src/threed/geometry/qlogicalvertex.h
@@ -109,11 +109,11 @@ inline QLogicalVertex::QLogicalVertex()
{
}
-inline QLogicalVertex::QLogicalVertex(QGeometryData data, int index)
- : m_data(data)
- , m_index(index)
+inline QLogicalVertex::QLogicalVertex(QGeometryData data_, int index_)
+ : m_data(data_)
+ , m_index(index_)
{
- Q_ASSERT(index < data.count());
+ Q_ASSERT(index_ < data_.count());
#ifdef QT3D_DEBUG_QLOGICALVERTEX
data.check();
#endif
@@ -140,11 +140,11 @@ inline QLogicalVertex::QLogicalVertex(const QVector3D &a, const QVector3D &n, co
m_data.appendTexCoord(t);
}
-inline QLogicalVertex::QLogicalVertex(const QVector3D &a, QColor4ub color)
+inline QLogicalVertex::QLogicalVertex(const QVector3D &a, QColor4ub color_)
: m_index(0)
{
m_data.appendVertex(a);
- m_data.appendColor(color);
+ m_data.appendColor(color_);
}
inline const QVector3D &QLogicalVertex::vertex() const
diff --git a/src/threed/graphicsview/qgraphicstransform3d.h b/src/threed/graphicsview/qgraphicstransform3d.h
index 928666a40..e5f921121 100644
--- a/src/threed/graphicsview/qgraphicstransform3d.h
+++ b/src/threed/graphicsview/qgraphicstransform3d.h
@@ -53,7 +53,7 @@ class Q_QT3D_EXPORT QQuickQGraphicsTransform3D : public QObject
{
Q_OBJECT
public:
- QQuickQGraphicsTransform3D(QObject *parent = 0) : QObject(parent) {}
+ QQuickQGraphicsTransform3D(QObject *p = 0) : QObject(p) {}
~QQuickQGraphicsTransform3D() {}
virtual void applyTo(QMatrix4x4 *matrix) const = 0;
diff --git a/src/threed/math3d/qplane3d.h b/src/threed/math3d/qplane3d.h
index 31b1c445f..6f7aebc06 100644
--- a/src/threed/math3d/qplane3d.h
+++ b/src/threed/math3d/qplane3d.h
@@ -82,8 +82,8 @@ private:
inline QPlane3D::QPlane3D() : m_normal(1.0f, 0.0f, 0.0f) {}
-inline QPlane3D::QPlane3D(const QVector3D &point, const QVector3D &normal)
- : m_origin(point), m_normal(normal)
+inline QPlane3D::QPlane3D(const QVector3D &point, const QVector3D &normal_)
+ : m_origin(point), m_normal(normal_)
{
}
diff --git a/src/threed/math3d/qray3d.h b/src/threed/math3d/qray3d.h
index 5a647c12a..9a12c50a6 100644
--- a/src/threed/math3d/qray3d.h
+++ b/src/threed/math3d/qray3d.h
@@ -84,9 +84,9 @@ private:
inline QRay3D::QRay3D() : m_direction(1.0f, 0.0f, 0.0f) {}
-inline QRay3D::QRay3D(const QVector3D &origin, const QVector3D &direction)
- : m_origin(origin)
- , m_direction(direction)
+inline QRay3D::QRay3D(const QVector3D &origin_, const QVector3D &direction_)
+ : m_origin(origin_)
+ , m_direction(direction_)
{
}
diff --git a/src/threed/math3d/qsphere3d.h b/src/threed/math3d/qsphere3d.h
index 5c28dc583..3aa55cac6 100644
--- a/src/threed/math3d/qsphere3d.h
+++ b/src/threed/math3d/qsphere3d.h
@@ -87,17 +87,17 @@ private:
inline QSphere3D::QSphere3D() : m_radius(1.0f) {}
-inline QSphere3D::QSphere3D(const QVector3D &center, float radius)
- : m_center(center), m_radius(radius) {}
+inline QSphere3D::QSphere3D(const QVector3D &center_, float radius_)
+ : m_center(center_), m_radius(radius_) {}
inline QVector3D QSphere3D::center() const
{
return m_center;
}
-inline void QSphere3D::setCenter(const QVector3D &center)
+inline void QSphere3D::setCenter(const QVector3D &center_)
{
- m_center = center;
+ m_center = center_;
}
inline float QSphere3D::radius() const
@@ -105,9 +105,9 @@ inline float QSphere3D::radius() const
return m_radius;
}
-inline void QSphere3D::setRadius(float radius)
+inline void QSphere3D::setRadius(float radius_)
{
- m_radius = radius;
+ m_radius = radius_;
}
inline bool QSphere3D::contains(const QVector3D &point) const
diff --git a/src/threed/math3d/qtriangle3d.h b/src/threed/math3d/qtriangle3d.h
index 93b271f88..16da0ebe6 100644
--- a/src/threed/math3d/qtriangle3d.h
+++ b/src/threed/math3d/qtriangle3d.h
@@ -93,10 +93,10 @@ inline QTriangle3D::QTriangle3D()
, m_q(1.0f, 0.0f, 0.0f)
, m_r(0.0f, 1.0f, 0.0f) {}
-inline QTriangle3D::QTriangle3D(const QVector3D &p, const QVector3D &q, const QVector3D &r)
- : m_p(p)
- , m_q(q)
- , m_r(r) {}
+inline QTriangle3D::QTriangle3D(const QVector3D &p_, const QVector3D &q_, const QVector3D &r_)
+ : m_p(p_)
+ , m_q(q_)
+ , m_r(r_) {}
inline QVector3D QTriangle3D::p() const
{
diff --git a/src/threed/scene/qglpicknode.h b/src/threed/scene/qglpicknode.h
index 7a084240f..01e0dfd76 100644
--- a/src/threed/scene/qglpicknode.h
+++ b/src/threed/scene/qglpicknode.h
@@ -57,10 +57,10 @@ class Q_QT3D_EXPORT QGLPickNode : public QObject
public:
explicit QGLPickNode(QGLAbstractScene *parent = 0);
int id() const { return m_id; }
- void setId(int id) { m_id = id; }
+ void setId(int id_) { m_id = id_; }
QGLSceneNode *target() const { return m_target; }
- void setTarget(QGLSceneNode *target) { m_target = target; }
+ void setTarget(QGLSceneNode *target_) { m_target = target_; }
Q_SIGNALS:
void pressed();
diff --git a/src/threed/scene/qglrenderorder.h b/src/threed/scene/qglrenderorder.h
index b53ffa867..930cd17cf 100644
--- a/src/threed/scene/qglrenderorder.h
+++ b/src/threed/scene/qglrenderorder.h
@@ -51,9 +51,9 @@ QT_BEGIN_NAMESPACE
class Q_QT3D_EXPORT QGLRenderOrder
{
public:
- explicit QGLRenderOrder(const QGLSceneNode *node = 0, const QGLRenderState &state = QGLRenderState())
- : m_node(node)
- , m_state(state)
+ explicit QGLRenderOrder(const QGLSceneNode *node_ = 0, const QGLRenderState &state_ = QGLRenderState())
+ : m_node(node_)
+ , m_state(state_)
{
}
~QGLRenderOrder() {}
@@ -111,9 +111,9 @@ inline QGLRenderState QGLRenderOrder::state() const
return m_state;
}
-inline void QGLRenderOrder::setState(const QGLRenderState &state)
+inline void QGLRenderOrder::setState(const QGLRenderState &state_)
{
- m_state = state;
+ m_state = state_;
}
inline QGLAbstractEffect *QGLRenderOrder::effectiveUserEffect() const
diff --git a/src/threed/textures/qareaallocator.h b/src/threed/textures/qareaallocator.h
index 601c778a8..0c348bf46 100644
--- a/src/threed/textures/qareaallocator.h
+++ b/src/threed/textures/qareaallocator.h
@@ -69,10 +69,10 @@ public:
QSize size() const { return m_size; }
QSize minimumAllocation() const { return m_minAlloc; }
- void setMinimumAllocation(const QSize &size) { m_minAlloc = size; }
+ void setMinimumAllocation(const QSize &minimumSize) { m_minAlloc = minimumSize; }
QSize margin() const { return m_margin; }
- void setMargin(const QSize &margin) { m_margin = margin; }
+ void setMargin(const QSize &margin_) { m_margin = margin_; }
virtual void expand(const QSize &size);
void expandBy(const QSize &size);
@@ -101,6 +101,7 @@ public:
QRect allocate(const QSize &size);
private:
+ using QAreaAllocator::allocate;
int m_row;
int m_column;
int m_rowHeight;
@@ -118,6 +119,8 @@ public:
int overhead() const;
private:
+ using QAreaAllocator::allocate;
+ using QAreaAllocator::release;
enum Split { SplitOnX, SplitOnY };
struct Node
@@ -152,6 +155,8 @@ public:
int overhead() const;
private:
+ using QAreaAllocator::allocate;
+ using QAreaAllocator::release;
QSize m_uniformSize;
QSize m_gridSize;
int *m_grid;