blob: d1755401f31dfc6c961f5c7984e10c9aa637a258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <utils/environment.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsteplist.h>
#define ASSERT_STATE_GENERIC(State, expected, actual) \
AndroidGlobal::assertState<State>(expected, actual, Q_FUNC_INFO)
namespace Android {
class AndroidGlobal
{
public:
template<typename State> static void assertState(State expected,
State actual, const char *func)
{
assertState(QList<State>() << expected, actual, func);
}
template<typename State> static void assertState(const QList<State> &expected,
State actual, const char *func)
{
if (!expected.contains(actual)) {
qWarning("Warning: Unexpected state %d in function %s.",
actual, func);
}
}
};
} // namespace Android
|