summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-19 00:26:18 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-19 00:26:18 (GMT)
commit2abbc5fc400dfa8ad26397cc39f49f9b3a4304c9 (patch)
treefdbf3b8fbaf9d1e5a57bf1984a386f17d0fcd538 /tests
parent673fa509fe0ac8262e53a12907e99d2a007fb5f2 (diff)
downloadQt-2abbc5fc400dfa8ad26397cc39f49f9b3a4304c9.zip
Qt-2abbc5fc400dfa8ad26397cc39f49f9b3a4304c9.tar.gz
Qt-2abbc5fc400dfa8ad26397cc39f49f9b3a4304c9.tar.bz2
Make QML tests compile on OpenSolaris
Task-number: QTBUG-13003
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h24
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp8
4 files changed, 20 insertions, 20 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index 19bfd37..37d6dbd 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -604,62 +604,62 @@ class NumberAssignment : public QObject
{
Q_OBJECT
public:
- Q_PROPERTY(qreal test1 READ test1 WRITE setTest1);
+ Q_PROPERTY(qreal test1 READ test1 WRITE setTest1)
qreal _test1;
qreal test1() const { return _test1; }
void setTest1(qreal v) { _test1 = v; }
- Q_PROPERTY(qreal test2 READ test2 WRITE setTest2);
+ Q_PROPERTY(qreal test2 READ test2 WRITE setTest2)
qreal _test2;
qreal test2() const { return _test2; }
void setTest2(qreal v) { _test2 = v; }
- Q_PROPERTY(qreal test3 READ test3 WRITE setTest3);
+ Q_PROPERTY(qreal test3 READ test3 WRITE setTest3)
qreal _test3;
qreal test3() const { return _test3; }
void setTest3(qreal v) { _test3 = v; }
- Q_PROPERTY(qreal test4 READ test4 WRITE setTest4);
+ Q_PROPERTY(qreal test4 READ test4 WRITE setTest4)
qreal _test4;
qreal test4() const { return _test4; }
void setTest4(qreal v) { _test4 = v; }
- Q_PROPERTY(int test5 READ test5 WRITE setTest5);
+ Q_PROPERTY(int test5 READ test5 WRITE setTest5)
int _test5;
int test5() const { return _test5; }
void setTest5(int v) { _test5 = v; }
- Q_PROPERTY(int test6 READ test6 WRITE setTest6);
+ Q_PROPERTY(int test6 READ test6 WRITE setTest6)
int _test6;
int test6() const { return _test6; }
void setTest6(int v) { _test6 = v; }
- Q_PROPERTY(int test7 READ test7 WRITE setTest7);
+ Q_PROPERTY(int test7 READ test7 WRITE setTest7)
int _test7;
int test7() const { return _test7; }
void setTest7(int v) { _test7 = v; }
- Q_PROPERTY(int test8 READ test8 WRITE setTest8);
+ Q_PROPERTY(int test8 READ test8 WRITE setTest8)
int _test8;
int test8() const { return _test8; }
void setTest8(int v) { _test8 = v; }
- Q_PROPERTY(unsigned int test9 READ test9 WRITE setTest9);
+ Q_PROPERTY(unsigned int test9 READ test9 WRITE setTest9)
unsigned int _test9;
unsigned int test9() const { return _test9; }
void setTest9(unsigned int v) { _test9 = v; }
- Q_PROPERTY(unsigned int test10 READ test10 WRITE setTest10);
+ Q_PROPERTY(unsigned int test10 READ test10 WRITE setTest10)
unsigned int _test10;
unsigned int test10() const { return _test10; }
void setTest10(unsigned int v) { _test10 = v; }
- Q_PROPERTY(unsigned int test11 READ test11 WRITE setTest11);
+ Q_PROPERTY(unsigned int test11 READ test11 WRITE setTest11)
unsigned int _test11;
unsigned int test11() const { return _test11; }
void setTest11(unsigned int v) { _test11 = v; }
- Q_PROPERTY(unsigned int test12 READ test12 WRITE setTest12);
+ Q_PROPERTY(unsigned int test12 READ test12 WRITE setTest12)
unsigned int _test12;
unsigned int test12() const { return _test12; }
void setTest12(unsigned int v) { _test12 = v; }
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
index b06ad7c..862b7d2 100644
--- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -313,7 +313,7 @@ void tst_qdeclarativemetatype::qmlParserStatusCast()
QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativeParserStatus *)&t));
QDeclarativeParserStatus *status = reinterpret_cast<QDeclarativeParserStatus *>(reinterpret_cast<char *>((QObject *)&t) + cast);
- QCOMPARE(status, &t);
+ QCOMPARE(status, (QDeclarativeParserStatus*)&t);
}
void tst_qdeclarativemetatype::qmlPropertyValueSourceCast()
@@ -333,7 +333,7 @@ void tst_qdeclarativemetatype::qmlPropertyValueSourceCast()
QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativePropertyValueSource *)&t));
QDeclarativePropertyValueSource *source = reinterpret_cast<QDeclarativePropertyValueSource *>(reinterpret_cast<char *>((QObject *)&t) + cast);
- QCOMPARE(source, &t);
+ QCOMPARE(source, (QDeclarativePropertyValueSource*)&t);
}
void tst_qdeclarativemetatype::qmlPropertyValueInterceptorCast()
@@ -353,7 +353,7 @@ void tst_qdeclarativemetatype::qmlPropertyValueInterceptorCast()
QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativePropertyValueInterceptor *)&t));
QDeclarativePropertyValueInterceptor *interceptor = reinterpret_cast<QDeclarativePropertyValueInterceptor *>(reinterpret_cast<char *>((QObject *)&t) + cast);
- QCOMPARE(interceptor, &t);
+ QCOMPARE(interceptor, (QDeclarativePropertyValueInterceptor*)&t);
}
void tst_qdeclarativemetatype::isList()
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 57a5e29..56a3121 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -1096,7 +1096,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
ic.openInputPanelReceived = false;
- QCOMPARE(view.inputContext(), &ic);
+ QCOMPARE(view.inputContext(), (QInputContext*)&ic);
QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
// input method should be disabled if focus
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index ca9009d..a5c2dda 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -193,7 +193,7 @@ void tst_qdeclarativetextinput::width()
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
- int delta = abs(int(textinputObject->width()) - metricWidth);
+ int delta = abs(int(int(textinputObject->width()) - metricWidth));
QVERIFY(delta <= 3.0); // As best as we can hope for cross-platform.
delete textinputObject;
@@ -450,7 +450,7 @@ void tst_qdeclarativetextinput::positionAt()
QFontMetrics fm(textinputObject->font());
int pos = textinputObject->positionAt(textinputObject->width()/2);
- int diff = abs(fm.width(textinputObject->text()) - (fm.width(textinputObject->text().left(pos))+textinputObject->width()/2));
+ int diff = abs(int(fm.width(textinputObject->text()) - (fm.width(textinputObject->text().left(pos))+textinputObject->width()/2)));
// some tollerance for different fonts.
#ifdef Q_OS_LINUX
@@ -462,7 +462,7 @@ void tst_qdeclarativetextinput::positionAt()
// Check without autoscroll...
textinputObject->setAutoScroll(false);
pos = textinputObject->positionAt(textinputObject->width()/2);
- diff = abs(fm.width(textinputObject->text().left(pos))-textinputObject->width()/2);
+ diff = abs(int(fm.width(textinputObject->text().left(pos))-textinputObject->width()/2));
// some tollerance for different fonts.
#ifdef Q_OS_LINUX
@@ -1022,7 +1022,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
ic.openInputPanelReceived = false;
- QCOMPARE(view.inputContext(), &ic);
+ QCOMPARE(view.inputContext(), (QInputContext*)&ic);
QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
// input method should be disabled if focus