Make qmetaobject autotest independent of QtWidgets
Change-Id: I4340036a4e6024d9b8d0c7832ad7bfb28ec4bc99 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
This commit is contained in:
parent
b2c1550564
commit
7616f31052
@ -1,5 +1,5 @@
|
||||
CONFIG += testcase
|
||||
CONFIG += parallel_test
|
||||
TARGET = tst_qmetaobject
|
||||
QT = core-private gui widgets testlib
|
||||
QT = core-private gui testlib
|
||||
SOURCES = tst_qmetaobject.cpp
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qlabel.h>
|
||||
#include <qwindow.h>
|
||||
#include <private/qmetaobject_p.h>
|
||||
|
||||
Q_DECLARE_METATYPE(const QMetaObject *)
|
||||
@ -720,13 +720,13 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
|
||||
void tst_QMetaObject::qtMetaObjectInheritance()
|
||||
{
|
||||
QVERIFY(QObject::staticMetaObject.superClass() == 0);
|
||||
QCOMPARE(QLabel::staticMetaObject.indexOfEnumerator("Qt::Alignment"), -1);
|
||||
QCOMPARE(QLabel::staticMetaObject.indexOfEnumerator("Alignment"), -1);
|
||||
int indexOfAlignment = QLabel::staticMetaObject.indexOfProperty("alignment");
|
||||
QVERIFY(indexOfAlignment != -1);
|
||||
QMetaProperty alignment = QLabel::staticMetaObject.property(indexOfAlignment);
|
||||
QVERIFY(alignment.isValid());
|
||||
QCOMPARE(alignment.enumerator().name(), "Alignment");
|
||||
QCOMPARE(QWindow::staticMetaObject.indexOfEnumerator("Qt::ScreenOrientation"), -1);
|
||||
QCOMPARE(QWindow::staticMetaObject.indexOfEnumerator("ScreenOrientation"), -1);
|
||||
int indexOfContentOrientation = QWindow::staticMetaObject.indexOfProperty("contentOrientation");
|
||||
QVERIFY(indexOfContentOrientation != -1);
|
||||
QMetaProperty contentOrientation = QWindow::staticMetaObject.property(indexOfContentOrientation);
|
||||
QVERIFY(contentOrientation.isValid());
|
||||
QCOMPARE(contentOrientation.enumerator().name(), "ScreenOrientation");
|
||||
}
|
||||
|
||||
struct MyType
|
||||
|
Loading…
Reference in New Issue
Block a user