Maemo: Introduce generic state checking.

This commit is contained in:
Christian Kandeler
2010-10-29 12:17:56 +02:00
parent e02dae3efb
commit f900b90c46
5 changed files with 20 additions and 30 deletions

View File

@@ -39,7 +39,7 @@
#include <QtCore/QTimer>
#define ASSERT_STATE(state) assertState(state, Q_FUNC_INFO)
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core;
@@ -442,18 +442,6 @@ void MaemoRemoteMounter::handleUtfsServerTimeout()
setState(Inactive);
}
void MaemoRemoteMounter::assertState(State expectedState, const char *func)
{
assertState(QList<State>() << expectedState, func);
}
void MaemoRemoteMounter::assertState(const QList<State> &expectedStates,
const char *func)
{
QTC_ASSERT(expectedStates.contains(m_state),
qDebug("Unexpected state %d at %s.", m_state, func))
}
void MaemoRemoteMounter::setState(State newState)
{
if (newState == Inactive)