Trim trailing whitespace.
Change-Id: Iee6bb66831f53399e5937eab5704af835979f5c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
efc475a996
commit
e0ba8fdbce
@ -520,8 +520,8 @@ void QProcessPrivate::startProcess()
|
|||||||
|
|
||||||
q->setProcessState(QProcess::Running);
|
q->setProcessState(QProcess::Running);
|
||||||
// User can call kill()/terminate() from the stateChanged() slot
|
// User can call kill()/terminate() from the stateChanged() slot
|
||||||
// so check before proceeding
|
// so check before proceeding
|
||||||
if (!pid)
|
if (!pid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (threadData->eventDispatcher) {
|
if (threadData->eventDispatcher) {
|
||||||
|
@ -279,7 +279,7 @@ void QState::assignProperty(QObject *object, const char *name,
|
|||||||
#endif // QT_NO_PROPERTIES
|
#endif // QT_NO_PROPERTIES
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns this state's error state.
|
Returns this state's error state.
|
||||||
|
|
||||||
\sa QStateMachine::error()
|
\sa QStateMachine::error()
|
||||||
*/
|
*/
|
||||||
@ -292,7 +292,7 @@ QAbstractState *QState::errorState() const
|
|||||||
/*!
|
/*!
|
||||||
Sets this state's error state to be the given \a state. If the error state
|
Sets this state's error state to be the given \a state. If the error state
|
||||||
is not set, or if it is set to 0, the state will inherit its parent's error
|
is not set, or if it is set to 0, the state will inherit its parent's error
|
||||||
state recursively. If no error state is set for the state itself or any of
|
state recursively. If no error state is set for the state itself or any of
|
||||||
its ancestors, an error will cause the machine to stop executing and an error
|
its ancestors, an error will cause the machine to stop executing and an error
|
||||||
will be printed to the console.
|
will be printed to the console.
|
||||||
*/
|
*/
|
||||||
@ -314,7 +314,7 @@ void QState::setErrorState(QAbstractState *state)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Adds the given \a transition. The transition has this state as the source.
|
Adds the given \a transition. The transition has this state as the source.
|
||||||
This state takes ownership of the transition.
|
This state takes ownership of the transition.
|
||||||
*/
|
*/
|
||||||
void QState::addTransition(QAbstractTransition *transition)
|
void QState::addTransition(QAbstractTransition *transition)
|
||||||
{
|
{
|
||||||
|
@ -141,8 +141,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
enter this state. The types of errors possible are described by the
|
enter this state. The types of errors possible are described by the
|
||||||
\l{QStateMachine::}{Error} enum. After the error state is entered,
|
\l{QStateMachine::}{Error} enum. After the error state is entered,
|
||||||
the type of the error can be retrieved with error(). The execution
|
the type of the error can be retrieved with error(). The execution
|
||||||
of the state graph will not stop when the error state is entered. If
|
of the state graph will not stop when the error state is entered. If
|
||||||
no error state applies to the erroneous state, the machine will stop
|
no error state applies to the erroneous state, the machine will stop
|
||||||
executing and an error message will be printed to the console.
|
executing and an error message will be printed to the console.
|
||||||
|
|
||||||
\sa QAbstractState, QAbstractTransition, QState, {The State Machine Framework}
|
\sa QAbstractState, QAbstractTransition, QState, {The State Machine Framework}
|
||||||
@ -1040,17 +1040,17 @@ QAbstractState *QStateMachinePrivate::findErrorState(QAbstractState *context)
|
|||||||
if (errorState == 0)
|
if (errorState == 0)
|
||||||
errorState = findErrorState(context->parentState());
|
errorState = findErrorState(context->parentState());
|
||||||
}
|
}
|
||||||
|
|
||||||
return errorState;
|
return errorState;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractState *currentContext)
|
void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractState *currentContext)
|
||||||
{
|
{
|
||||||
Q_Q(QStateMachine);
|
Q_Q(QStateMachine);
|
||||||
|
|
||||||
error = errorCode;
|
error = errorCode;
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case QStateMachine::NoInitialStateError:
|
case QStateMachine::NoInitialStateError:
|
||||||
Q_ASSERT(currentContext != 0);
|
Q_ASSERT(currentContext != 0);
|
||||||
|
|
||||||
errorString = QStateMachine::tr("Missing initial state in compound state '%1'")
|
errorString = QStateMachine::tr("Missing initial state in compound state '%1'")
|
||||||
@ -1074,23 +1074,23 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
|
|||||||
errorString = QStateMachine::tr("Unknown error");
|
errorString = QStateMachine::tr("Unknown error");
|
||||||
};
|
};
|
||||||
|
|
||||||
pendingErrorStates.clear();
|
pendingErrorStates.clear();
|
||||||
pendingErrorStatesForDefaultEntry.clear();
|
pendingErrorStatesForDefaultEntry.clear();
|
||||||
|
|
||||||
QAbstractState *currentErrorState = findErrorState(currentContext);
|
QAbstractState *currentErrorState = findErrorState(currentContext);
|
||||||
|
|
||||||
// Avoid infinite loop if the error state itself has an error
|
// Avoid infinite loop if the error state itself has an error
|
||||||
if (currentContext == currentErrorState)
|
if (currentContext == currentErrorState)
|
||||||
currentErrorState = 0;
|
currentErrorState = 0;
|
||||||
|
|
||||||
Q_ASSERT(currentErrorState != rootState());
|
Q_ASSERT(currentErrorState != rootState());
|
||||||
|
|
||||||
if (currentErrorState != 0) {
|
if (currentErrorState != 0) {
|
||||||
QState *lca = findLCA(QList<QAbstractState*>() << currentErrorState << currentContext);
|
QState *lca = findLCA(QList<QAbstractState*>() << currentErrorState << currentContext);
|
||||||
addStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
|
addStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
|
||||||
addAncestorStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
|
addAncestorStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
|
||||||
} else {
|
} else {
|
||||||
qWarning("Unrecoverable error detected in running state machine: %s",
|
qWarning("Unrecoverable error detected in running state machine: %s",
|
||||||
qPrintable(errorString));
|
qPrintable(errorString));
|
||||||
q->stop();
|
q->stop();
|
||||||
}
|
}
|
||||||
@ -1099,7 +1099,7 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
|
|||||||
#ifndef QT_NO_ANIMATION
|
#ifndef QT_NO_ANIMATION
|
||||||
|
|
||||||
QPair<QList<QAbstractAnimation*>, QList<QAbstractAnimation*> >
|
QPair<QList<QAbstractAnimation*>, QList<QAbstractAnimation*> >
|
||||||
QStateMachinePrivate::initializeAnimation(QAbstractAnimation *abstractAnimation,
|
QStateMachinePrivate::initializeAnimation(QAbstractAnimation *abstractAnimation,
|
||||||
const QPropertyAssignment &prop)
|
const QPropertyAssignment &prop)
|
||||||
{
|
{
|
||||||
QList<QAbstractAnimation*> handledAnimations;
|
QList<QAbstractAnimation*> handledAnimations;
|
||||||
@ -1113,9 +1113,9 @@ QStateMachinePrivate::initializeAnimation(QAbstractAnimation *abstractAnimation,
|
|||||||
handledAnimations << ret.first;
|
handledAnimations << ret.first;
|
||||||
localResetEndValues << ret.second;
|
localResetEndValues << ret.second;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QPropertyAnimation *animation = qobject_cast<QPropertyAnimation *>(abstractAnimation);
|
QPropertyAnimation *animation = qobject_cast<QPropertyAnimation *>(abstractAnimation);
|
||||||
if (animation != 0
|
if (animation != 0
|
||||||
&& prop.object == animation->targetObject()
|
&& prop.object == animation->targetObject()
|
||||||
&& prop.propertyName == animation->propertyName()) {
|
&& prop.propertyName == animation->propertyName()) {
|
||||||
|
|
||||||
@ -1894,7 +1894,7 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio
|
|||||||
}
|
}
|
||||||
|
|
||||||
void QStateMachinePrivate::handleFilteredEvent(QObject *watched, QEvent *event)
|
void QStateMachinePrivate::handleFilteredEvent(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (qobjectEvents.value(watched).contains(event->type())) {
|
if (qobjectEvents.value(watched).contains(event->type())) {
|
||||||
postInternalEvent(new QStateMachine::WrappedEvent(watched, handler->cloneEvent(event)));
|
postInternalEvent(new QStateMachine::WrappedEvent(watched, handler->cloneEvent(event)));
|
||||||
processEvents(DirectProcessing);
|
processEvents(DirectProcessing);
|
||||||
@ -1980,24 +1980,24 @@ QStateMachine::~QStateMachine()
|
|||||||
\value HighPriority The event has high priority.
|
\value HighPriority The event has high priority.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \enum QStateMachine::Error
|
/*! \enum QStateMachine::Error
|
||||||
|
|
||||||
This enum type defines errors that can occur in the state machine at run time. When the state
|
This enum type defines errors that can occur in the state machine at run time. When the state
|
||||||
machine encounters an unrecoverable error at run time, it will set the error code returned
|
machine encounters an unrecoverable error at run time, it will set the error code returned
|
||||||
by error(), the error message returned by errorString(), and enter an error state based on
|
by error(), the error message returned by errorString(), and enter an error state based on
|
||||||
the context of the error.
|
the context of the error.
|
||||||
|
|
||||||
\value NoError No error has occurred.
|
\value NoError No error has occurred.
|
||||||
\value NoInitialStateError The machine has entered a QState with children which does not have an
|
\value NoInitialStateError The machine has entered a QState with children which does not have an
|
||||||
initial state set. The context of this error is the state which is missing an initial
|
initial state set. The context of this error is the state which is missing an initial
|
||||||
state.
|
state.
|
||||||
\value NoDefaultStateInHistoryStateError The machine has entered a QHistoryState which does not have
|
\value NoDefaultStateInHistoryStateError The machine has entered a QHistoryState which does not have
|
||||||
a default state set. The context of this error is the QHistoryState which is missing a
|
a default state set. The context of this error is the QHistoryState which is missing a
|
||||||
default state.
|
default state.
|
||||||
\value NoCommonAncestorForTransitionError The machine has selected a transition whose source
|
\value NoCommonAncestorForTransitionError The machine has selected a transition whose source
|
||||||
and targets are not part of the same tree of states, and thus are not part of the same
|
and targets are not part of the same tree of states, and thus are not part of the same
|
||||||
state machine. Commonly, this could mean that one of the states has not been given
|
state machine. Commonly, this could mean that one of the states has not been given
|
||||||
any parent or added to any machine. The context of this error is the source state of
|
any parent or added to any machine. The context of this error is the source state of
|
||||||
the transition.
|
the transition.
|
||||||
|
|
||||||
\sa setErrorState()
|
\sa setErrorState()
|
||||||
@ -2043,9 +2043,9 @@ QState::RestorePolicy QStateMachine::globalRestorePolicy() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the restore policy of the state machine to \a restorePolicy. The default
|
Sets the restore policy of the state machine to \a restorePolicy. The default
|
||||||
restore policy is QState::DontRestoreProperties.
|
restore policy is QState::DontRestoreProperties.
|
||||||
|
|
||||||
\sa globalRestorePolicy()
|
\sa globalRestorePolicy()
|
||||||
*/
|
*/
|
||||||
void QStateMachine::setGlobalRestorePolicy(QState::RestorePolicy restorePolicy)
|
void QStateMachine::setGlobalRestorePolicy(QState::RestorePolicy restorePolicy)
|
||||||
@ -2437,7 +2437,7 @@ void QStateMachine::onEntry(QEvent *event)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\reimp
|
\reimp
|
||||||
This function will call stop() to stop the state machine and
|
This function will call stop() to stop the state machine and
|
||||||
subsequently emit the stopped() signal.
|
subsequently emit the stopped() signal.
|
||||||
*/
|
*/
|
||||||
void QStateMachine::onExit(QEvent *event)
|
void QStateMachine::onExit(QEvent *event)
|
||||||
@ -2468,7 +2468,7 @@ void QStateMachine::setAnimated(bool enabled)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Adds a default \a animation to be considered for any transition.
|
Adds a default \a animation to be considered for any transition.
|
||||||
*/
|
*/
|
||||||
void QStateMachine::addDefaultAnimation(QAbstractAnimation *animation)
|
void QStateMachine::addDefaultAnimation(QAbstractAnimation *animation)
|
||||||
{
|
{
|
||||||
Q_D(QStateMachine);
|
Q_D(QStateMachine);
|
||||||
@ -2479,13 +2479,13 @@ void QStateMachine::addDefaultAnimation(QAbstractAnimation *animation)
|
|||||||
Returns the list of default animations that will be considered for any transition.
|
Returns the list of default animations that will be considered for any transition.
|
||||||
*/
|
*/
|
||||||
QList<QAbstractAnimation*> QStateMachine::defaultAnimations() const
|
QList<QAbstractAnimation*> QStateMachine::defaultAnimations() const
|
||||||
{
|
{
|
||||||
Q_D(const QStateMachine);
|
Q_D(const QStateMachine);
|
||||||
return d->defaultAnimations;
|
return d->defaultAnimations;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Removes \a animation from the list of default animations.
|
Removes \a animation from the list of default animations.
|
||||||
*/
|
*/
|
||||||
void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation)
|
void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum Error {
|
enum Error {
|
||||||
NoError,
|
NoError,
|
||||||
NoInitialStateError,
|
NoInitialStateError,
|
||||||
NoDefaultStateInHistoryStateError,
|
NoDefaultStateInHistoryStateError,
|
||||||
NoCommonAncestorForTransitionError
|
NoCommonAncestorForTransitionError
|
||||||
|
@ -138,7 +138,7 @@ class Q_CORE_EXPORT QThread : public QObject
|
|||||||
public:
|
public:
|
||||||
static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); }
|
static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); }
|
||||||
static QThread* currentThread();
|
static QThread* currentThread();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QThread(QThreadPrivate &dd, QObject *parent = 0);
|
QThread(QThreadPrivate &dd, QObject *parent = 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user