diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-20 00:01:09 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-20 00:01:09 (GMT) |
commit | cb2cd4b08984278588d8dbba06de29522acd8a60 (patch) | |
tree | d9e35478f27aaaf76cb714adba5c4c58c9b59b0b /src | |
parent | 79676e873a75255d6cbc07de5392429a33cec46f (diff) | |
parent | a385e4d78b201e4ea5ff8be299b7d7c3d58edc4e (diff) | |
download | Qt-cb2cd4b08984278588d8dbba06de29522acd8a60.zip Qt-cb2cd4b08984278588d8dbba06de29522acd8a60.tar.gz Qt-cb2cd4b08984278588d8dbba06de29522acd8a60.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fixed autotest compilation issue on solaris
Fixed build issue on Solaris
Remove wrong NOTIFY attribute.
Ignore LayoutDirectionChange event in QTextControl
Fix an obvious bug in tst_QGL::clipTest()
moc: Error if the NOTIFY signal is invalid.
QDateEdit/QTimeEdit: remove duplicate properties.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepath_p.h | 2 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativeanimation_p.h | 18 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativefontloader_p.h | 2 | ||||
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/qdatetimeedit.h | 2 | ||||
-rw-r--r-- | src/tools/moc/generator.cpp | 48 | ||||
-rw-r--r-- | src/tools/moc/moc.cpp | 58 | ||||
-rw-r--r-- | src/tools/moc/moc.h | 1 |
8 files changed, 70 insertions, 69 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h index 5ab5cfd..195057c 100644 --- a/src/declarative/graphicsitems/qdeclarativepath_p.h +++ b/src/declarative/graphicsitems/qdeclarativepath_p.h @@ -190,7 +190,7 @@ private: class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement { Q_OBJECT - Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed) + Q_PROPERTY(qreal value READ value WRITE setValue) public: QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {} diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index 481c36c..d15d1f6 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -74,7 +74,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public Q Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged) - Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopsChanged) + Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopCountChanged) Q_CLASSINFO("DefaultMethod", "start()") public: @@ -301,8 +301,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeColorAnimation : public QDeclarativeProperty { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) - Q_PROPERTY(QColor from READ from WRITE setFrom NOTIFY fromChanged) - Q_PROPERTY(QColor to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(QColor from READ from WRITE setFrom) + Q_PROPERTY(QColor to READ to WRITE setTo) public: QDeclarativeColorAnimation(QObject *parent=0); @@ -320,8 +320,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeNumberAnimation : public QDeclarativePropert Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) - Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged) - Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(qreal from READ from WRITE setFrom) + Q_PROPERTY(qreal to READ to WRITE setTo) public: QDeclarativeNumberAnimation(QObject *parent=0); @@ -345,8 +345,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeVector3dAnimation : public QDeclarativePrope Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) - Q_PROPERTY(QVector3D from READ from WRITE setFrom NOTIFY fromChanged) - Q_PROPERTY(QVector3D to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(QVector3D from READ from WRITE setFrom) + Q_PROPERTY(QVector3D to READ to WRITE setTo) public: QDeclarativeVector3dAnimation(QObject *parent=0); @@ -366,8 +366,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeRotationAnimation : public QDeclarativePrope Q_DECLARE_PRIVATE(QDeclarativeRotationAnimation) Q_ENUMS(RotationDirection) - Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged) - Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(qreal from READ from WRITE setFrom) + Q_PROPERTY(qreal to READ to WRITE setTo) Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged) public: diff --git a/src/declarative/util/qdeclarativefontloader_p.h b/src/declarative/util/qdeclarativefontloader_p.h index 6947547..a5fbb8f 100644 --- a/src/declarative/util/qdeclarativefontloader_p.h +++ b/src/declarative/util/qdeclarativefontloader_p.h @@ -60,7 +60,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeFontLoader : public QObject Q_DECLARE_PRIVATE(QDeclarativeFontLoader) Q_ENUMS(Status) - Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(QUrl source READ source WRITE setSource) Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 3d34687..5fe0c0c 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1101,14 +1101,6 @@ void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *conte } } break; - case QEvent::LayoutDirectionChange: { - if (contextWidget) { - QTextOption opt = document()->defaultTextOption(); - opt.setTextDirection(contextWidget->layoutDirection()); - document()->setDefaultTextOption(opt); - } - } - // FALL THROUGH default: break; } diff --git a/src/gui/widgets/qdatetimeedit.h b/src/gui/widgets/qdatetimeedit.h index 81bbdb9..d2f315a 100644 --- a/src/gui/widgets/qdatetimeedit.h +++ b/src/gui/widgets/qdatetimeedit.h @@ -206,7 +206,6 @@ private: class Q_GUI_EXPORT QTimeEdit : public QDateTimeEdit { Q_OBJECT - Q_PROPERTY(QTime time READ time WRITE setTime NOTIFY timeChanged USER true) public: QTimeEdit(QWidget *parent = 0); QTimeEdit(const QTime &time, QWidget *parent = 0); @@ -215,7 +214,6 @@ public: class Q_GUI_EXPORT QDateEdit : public QDateTimeEdit { Q_OBJECT - Q_PROPERTY(QDate date READ date WRITE setDate NOTIFY dateChanged USER true) public: QDateEdit(QWidget *parent = 0); QDateEdit(const QDate &date, QWidget *parent = 0); diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 9a982d0..c3bbba1 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -483,54 +483,6 @@ void Generator::generateFunctions(QList<FunctionDef>& list, const char *functype void Generator::generateProperties() { // - // specify get function, for compatibiliy we accept functions - // returning pointers, or const char * for QByteArray. - // - for (int i = 0; i < cdef->propertyList.count(); ++i) { - PropertyDef &p = cdef->propertyList[i]; - if (p.read.isEmpty()) - continue; - for (int j = 0; j < cdef->publicList.count(); ++j) { - const FunctionDef &f = cdef->publicList.at(j); - if (f.name != p.read) - continue; - if (!f.isConst) // get functions must be const - continue; - if (f.arguments.size()) // and must not take any arguments - continue; - PropertyDef::Specification spec = PropertyDef::ValueSpec; - QByteArray tmp = f.normalizedType; - if (p.type == "QByteArray" && tmp == "const char *") - tmp = "QByteArray"; - if (tmp.left(6) == "const ") - tmp = tmp.mid(6); - if (p.type != tmp && tmp.endsWith('*')) { - tmp.chop(1); - spec = PropertyDef::PointerSpec; - } else if (f.type.name.endsWith('&')) { // raw type, not normalized type - spec = PropertyDef::ReferenceSpec; - } - if (p.type != tmp) - continue; - p.gspec = spec; - break; - } - if(!p.notify.isEmpty()) { - int notifyId = -1; - for (int j = 0; j < cdef->signalList.count(); ++j) { - const FunctionDef &f = cdef->signalList.at(j); - if(f.name != p.notify) { - continue; - } else { - notifyId = j /* Signal indexes start from 0 */; - break; - } - } - p.notifyId = notifyId; - } - } - - // // Create meta data // diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index ac49d65..2c24165 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -727,6 +727,7 @@ void Moc::parse() error("Class declarations lacks Q_OBJECT macro."); checkSuperClasses(&def); + checkProperties(&def); classList += def; knownQObjectClasses.insert(def.classname); @@ -1312,5 +1313,62 @@ void Moc::checkSuperClasses(ClassDef *def) } } +void Moc::checkProperties(ClassDef *cdef) +{ + // + // specify get function, for compatibiliy we accept functions + // returning pointers, or const char * for QByteArray. + // + for (int i = 0; i < cdef->propertyList.count(); ++i) { + PropertyDef &p = cdef->propertyList[i]; + if (p.read.isEmpty()) + continue; + for (int j = 0; j < cdef->publicList.count(); ++j) { + const FunctionDef &f = cdef->publicList.at(j); + if (f.name != p.read) + continue; + if (!f.isConst) // get functions must be const + continue; + if (f.arguments.size()) // and must not take any arguments + continue; + PropertyDef::Specification spec = PropertyDef::ValueSpec; + QByteArray tmp = f.normalizedType; + if (p.type == "QByteArray" && tmp == "const char *") + tmp = "QByteArray"; + if (tmp.left(6) == "const ") + tmp = tmp.mid(6); + if (p.type != tmp && tmp.endsWith('*')) { + tmp.chop(1); + spec = PropertyDef::PointerSpec; + } else if (f.type.name.endsWith('&')) { // raw type, not normalized type + spec = PropertyDef::ReferenceSpec; + } + if (p.type != tmp) + continue; + p.gspec = spec; + break; + } + if(!p.notify.isEmpty()) { + int notifyId = -1; + for (int j = 0; j < cdef->signalList.count(); ++j) { + const FunctionDef &f = cdef->signalList.at(j); + if(f.name != p.notify) { + continue; + } else { + notifyId = j /* Signal indexes start from 0 */; + break; + } + } + p.notifyId = notifyId; + if (notifyId == -1) { + QByteArray msg = "NOTIFY signal '" + p.notify + "' of property '" + p.name + + "' does not exist in class " + cdef->classname + "."; + error(msg.constData()); + } + } + } +} + + QT_END_NAMESPACE diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index 9f349b5..5e47d9a 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -238,6 +238,7 @@ public: bool testFunctionAttribute(Token tok, FunctionDef *def); void checkSuperClasses(ClassDef *def); + void checkProperties(ClassDef* cdef); }; inline QByteArray noRef(const QByteArray &type) |