summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-22 23:32:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-22 23:32:20 (GMT)
commit789e2e08d8969aaebae82f45d48f3d550c8c1d64 (patch)
tree00484d3c35202541de5abe62a3672b7951bf2713 /doc
parentb1c412cefa51f0eea79dbf279f2a23414ccecc3d (diff)
parent37f4e51127081f393743b5023f61ec48674cf7a2 (diff)
downloadQt-789e2e08d8969aaebae82f45d48f3d550c8c1d64.zip
Qt-789e2e08d8969aaebae82f45d48f3d550c8c1d64.tar.gz
Qt-789e2e08d8969aaebae82f45d48f3d550c8c1d64.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: tst_qthread: fix compilation Round origin of text in OpenVG engine QThread::exec(): Fix possibility to enter several time the event loop QMessageBox: change the documentation to reflect that it is application modal Compile on OpenBSD Doc: Q_PROPERTY, implements the setter/getter in the example Dynamically register the event number. Fix wrong error assumption when converting "0.0" to double
Diffstat (limited to 'doc')
-rw-r--r--doc/src/snippets/code/doc_src_properties.qdoc17
-rw-r--r--doc/src/snippets/moc/myclass2.h7
2 files changed, 19 insertions, 5 deletions
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc
index 7704160..a4ed409 100644
--- a/doc/src/snippets/code/doc_src_properties.qdoc
+++ b/doc/src/snippets/code/doc_src_properties.qdoc
@@ -91,7 +91,7 @@ for (int i=0; i<count; ++i) {
class MyClass : public QObject
{
Q_OBJECT
- Q_PROPERTY(Priority priority READ priority WRITE setPriority)
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
Q_ENUMS(Priority)
public:
@@ -100,8 +100,19 @@ public:
enum Priority { High, Low, VeryHigh, VeryLow };
- void setPriority(Priority priority);
- Priority priority() const;
+ void setPriority(Priority priority)
+ {
+ m_priority = priority;
+ emit priorityChanged(priority);
+ }
+ Priority priority() const
+ { return m_priority; }
+
+signals:
+ void priorityChanged(Priority);
+
+private:
+ Priority m_priority;
};
//! [5]
diff --git a/doc/src/snippets/moc/myclass2.h b/doc/src/snippets/moc/myclass2.h
index ca79515..daea23c 100644
--- a/doc/src/snippets/moc/myclass2.h
+++ b/doc/src/snippets/moc/myclass2.h
@@ -58,8 +58,11 @@ public:
MyClass(QObject *parent = 0);
~MyClass();
- void setPriority(Priority priority);
- Priority priority() const;
+ void setPriority(Priority priority) { m_priority = priority; }
+ Priority priority() const { return m_priority; }
+
+private:
+ Priority m_priority;
};
//! [0]