summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstate.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-04-29 06:25:03 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-04-29 06:29:47 (GMT)
commitf810a0210c0cdd1ba070f16ebebdec1da7c72b50 (patch)
tree37e76a3e7fb70b41aab0fa250aaeb0c731571108 /src/corelib/statemachine/qstate.cpp
parent2c22f8748f62db3cd4c2782abcd19c273f4a4426 (diff)
downloadQt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.zip
Qt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.tar.gz
Qt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.tar.bz2
make history state constructible
Decided in API review. The intention of QHistoryState not being constructible was so that people wouldn't subclass it and reimplement onEntry()/onExit(), thinking that those functions would actually get called (which they won't). However, we recently added the entered() signal to QAbstractState, so people are going to connect to it and ask why they never get the signal for a QHistoryState. We might as well make QHistoryState constructible and just document that it doesn't make sense to subclass it.
Diffstat (limited to 'src/corelib/statemachine/qstate.cpp')
-rw-r--r--src/corelib/statemachine/qstate.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index 5c3418b..dd3af51 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -75,8 +75,6 @@ QT_BEGIN_NAMESPACE
and the state machine needs to know which child state to enter when the
parent state is the target of a transition.
- The addHistoryState() function adds a history state.
-
The setErrorState() sets the state's error state. The error state is the
state that the state machine will transition to if an error is detected when
attempting to enter the state (e.g. because no initial state has been set).
@@ -95,21 +93,6 @@ QT_BEGIN_NAMESPACE
group state is entered, all its child states are entered in parallel.
*/
-/*!
- \enum QState::HistoryType
-
- This enum specifies the type of history that a QHistoryState records.
-
- \value ShallowHistory Only the immediate child states of the parent state
- are recorded. In this case a transition with the history state as its
- target will end up in the immediate child state that the parent was in the
- last time it was exited. This is the default.
-
- \value DeepHistory Nested states are recorded. In this case a transition
- with the history state as its target will end up in the most deeply nested
- descendant state the parent was in the last time it was exited.
-*/
-
QStatePrivate::QStatePrivate()
: errorState(0), isParallelGroup(false), initialState(0)
{
@@ -381,15 +364,6 @@ QList<QAbstractTransition*> QState::transitions() const
}
/*!
- Creates a history state of the given \a type for this state and returns the
- new state. The history state becomes a child of this state.
-*/
-QHistoryState *QState::addHistoryState(HistoryType type)
-{
- return QHistoryStatePrivate::create(type, this);
-}
-
-/*!
\reimp
*/
void QState::onEntry()