summaryrefslogtreecommitdiffstats
path: root/config.tests/unix
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2009-08-07 13:34:12 (GMT)
committermread <qt-info@nokia.com>2009-08-07 13:34:12 (GMT)
commit5a72890b7ce12815f9567316da867006cff73f39 (patch)
tree46c8c793f19274f9ed19678d1732d2123adbdf34 /config.tests/unix
parent0f6f1f841cea61cbb6905de92c2ca63bd369d55d (diff)
parentcc0a411e5e874aa224c26298a109973cb15ea291 (diff)
downloadQt-5a72890b7ce12815f9567316da867006cff73f39.zip
Qt-5a72890b7ce12815f9567316da867006cff73f39.tar.gz
Qt-5a72890b7ce12815f9567316da867006cff73f39.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts fixed: src/corelib/io/qdiriterator.cpp
Diffstat (limited to 'config.tests/unix')
-rw-r--r--config.tests/unix/alsa/alsa.pro4
-rw-r--r--config.tests/unix/alsa/alsatest.cpp6
-rwxr-xr-xconfig.tests/unix/makeabs8
-rw-r--r--config.tests/unix/openssl/openssl.pri11
-rw-r--r--config.tests/unix/stl/stltest.cpp61
5 files changed, 70 insertions, 20 deletions
diff --git a/config.tests/unix/alsa/alsa.pro b/config.tests/unix/alsa/alsa.pro
new file mode 100644
index 0000000..4931d38
--- /dev/null
+++ b/config.tests/unix/alsa/alsa.pro
@@ -0,0 +1,4 @@
+SOURCES = alsatest.cpp
+LIBS+=-lasound
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/alsa/alsatest.cpp b/config.tests/unix/alsa/alsatest.cpp
new file mode 100644
index 0000000..af2f5d9
--- /dev/null
+++ b/config.tests/unix/alsa/alsatest.cpp
@@ -0,0 +1,6 @@
+#include <alsa/asoundlib.h>
+int main(int argc,char **argv)
+{
+ return 0;
+}
+
diff --git a/config.tests/unix/makeabs b/config.tests/unix/makeabs
index 9d66108..c415cc7 100755
--- a/config.tests/unix/makeabs
+++ b/config.tests/unix/makeabs
@@ -3,7 +3,13 @@
FILE="$1"
RES="$FILE"
-if [ `echo $FILE | cut -b1` = "/" ]; then
+CUT_ARG="-b1"
+if [ `uname -s` = "QNX" ]; then
+ # QNX does not understand "-b1"
+ CUT_ARG="-c1"
+fi
+
+if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then
true
else
RES="$PWD/$FILE"
diff --git a/config.tests/unix/openssl/openssl.pri b/config.tests/unix/openssl/openssl.pri
index c8703c2..377d630 100644
--- a/config.tests/unix/openssl/openssl.pri
+++ b/config.tests/unix/openssl/openssl.pri
@@ -1,12 +1,5 @@
-!cross_compile {
- TRY_INCLUDEPATHS = /include /usr/include /usr/local/include $$QMAKE_INCDIR $$INCLUDEPATH
- # LSB doesn't allow using headers from /include or /usr/include
- linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH
- for(p, TRY_INCLUDEPATHS) {
- pp = $$join(p, "", "", "/openssl")
- exists($$pp):INCLUDEPATH *= $$p
- }
-}
+# Empty file since Qt 4.6
+# I'm too lazy to find all places where this file is included
symbian{
TRY_INCLUDEPATHS = $${EPOCROOT}epoc32 $${EPOCROOT}epoc32/include $${EPOCROOT}epoc32/include/stdapis $${EPOCROOT}epoc32/include/stdapis/sys $$OS_LAYER_LIBC_SYSTEMINCLUDE $$QMAKE_INCDIR $$INCLUDEPATH
diff --git a/config.tests/unix/stl/stltest.cpp b/config.tests/unix/stl/stltest.cpp
index ff653a4..4d74ed1 100644
--- a/config.tests/unix/stl/stltest.cpp
+++ b/config.tests/unix/stl/stltest.cpp
@@ -9,6 +9,53 @@ templates for common STL container classes.
#include <algorithm>
#include <iostream>
+// something mean to see if the compiler and C++ standard lib are good enough
+template<class K, class T>
+class DummyClass
+{
+ // everything in std namespace ?
+ typedef std::bidirectional_iterator_tag i;
+ typedef std::ptrdiff_t d;
+ // typename implemented ?
+ typedef typename std::map<K,T>::iterator MyIterator;
+};
+
+// extracted from QVector's strict iterator
+template<class T>
+class DummyIterator
+{
+ typedef DummyIterator<int> iterator;
+public:
+ T *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+
+ inline DummyIterator() : i(0) {}
+ inline DummyIterator(T *n) : i(n) {}
+ inline DummyIterator(const DummyIterator &o): i(o.i){}
+ inline T &operator*() const { return *i; }
+ inline T *operator->() const { return i; }
+ inline T &operator[](int j) const { return *(i + j); }
+ inline bool operator==(const DummyIterator &o) const { return i == o.i; }
+ inline bool operator!=(const DummyIterator &o) const { return i != o.i; }
+ inline bool operator<(const DummyIterator& other) const { return i < other.i; }
+ inline bool operator<=(const DummyIterator& other) const { return i <= other.i; }
+ inline bool operator>(const DummyIterator& other) const { return i > other.i; }
+ inline bool operator>=(const DummyIterator& other) const { return i >= other.i; }
+ inline DummyIterator &operator++() { ++i; return *this; }
+ inline DummyIterator operator++(int) { T *n = i; ++i; return n; }
+ inline DummyIterator &operator--() { i--; return *this; }
+ inline DummyIterator operator--(int) { T *n = i; i--; return n; }
+ inline DummyIterator &operator+=(int j) { i+=j; return *this; }
+ inline DummyIterator &operator-=(int j) { i-=j; return *this; }
+ inline DummyIterator operator+(int j) const { return DummyIterator(i+j); }
+ inline DummyIterator operator-(int j) const { return DummyIterator(i-j); }
+ inline int operator-(DummyIterator j) const { return i - j.i; }
+};
+
int main()
{
std::vector<int> v1;
@@ -53,16 +100,10 @@ int main()
int m2size = m2.size();
m2size = 0;
+ DummyIterator<int> it1, it2;
+ int n = std::distance(it1, it2);
+ std::advance(it1, 3);
+
return 0;
}
-// something mean to see if the compiler and C++ standard lib are good enough
-template<class K, class T>
-class DummyClass
-{
- // everything in std namespace ?
- typedef std::bidirectional_iterator_tag i;
- typedef std::ptrdiff_t d;
- // typename implemented ?
- typedef typename std::map<K,T>::iterator MyIterator;
-};