summaryrefslogtreecommitdiff
path: root/qmake/include/qmemarray.h
Side-by-side diff
Diffstat (limited to 'qmake/include/qmemarray.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/qmemarray.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/qmake/include/qmemarray.h b/qmake/include/qmemarray.h
index a5baf99..267670d 100644
--- a/qmake/include/qmemarray.h
+++ b/qmake/include/qmemarray.h
@@ -40,13 +40,13 @@
#ifndef QT_H
#include "qgarray.h"
#endif // QT_H
-template<class type>
+template<class type>
class QMemArray : public QGArray
{
public:
typedef type* Iterator;
typedef const type* ConstIterator;
typedef type ValueType;
@@ -65,12 +65,13 @@ public:
uint nrefs() const { return QGArray::nrefs(); }
uint size() const { return QGArray::size()/sizeof(type); }
uint count() const { return size(); }
bool isEmpty() const { return QGArray::size() == 0; }
bool isNull() const { return QGArray::data() == 0; }
bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
+ bool resize( uint size, Optimization optim ) { return QGArray::resize(size*sizeof(type), optim); }
bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
bool fill( const type &d, int size = -1 )
{ return QGArray::fill((char*)&d,size,sizeof(type) ); }
void detach() { QGArray::detach(); }
QMemArray<type> copy() const
{ QMemArray<type> tmp; return tmp.duplicate(*this); }
@@ -105,18 +106,24 @@ public:
Iterator begin() { return data(); }
Iterator end() { return data() + size(); }
ConstIterator begin() const { return data(); }
ConstIterator end() const { return data() + size(); }
};
+#ifndef QT_QWINEXPORT
#if defined(Q_TEMPLATEDLL)
// MOC_SKIP_BEGIN
Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<int>;
Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<bool>;
// MOC_SKIP_END
#endif
+#endif /* QT_QWINEXPORT */
#ifndef QT_NO_COMPAT
#define QArray QMemArray
#endif
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QMEMARRAY
+#include <qwinexport.h>
+#endif /* QT_QWINEXPORT */
#endif // QARRAY_H