Debugger: Slim down CHECK_STATE() expansion

Less generated code.

Change-Id: Iafcafc875afa3ead12e10fd5f316d9663b2f9823
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
hjk
2015-09-11 16:51:11 +02:00
parent 054ed354e0
commit 1cb811ebe6
4 changed files with 16 additions and 21 deletions

View File

@@ -98,14 +98,7 @@ enum { debugPending = 0 };
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
#define CHECK_STATE(s) \
do { \
if (state() != s) { \
showMessage(QString::fromLatin1("UNEXPECTED STATE: %1 WANTED: %2 IN %3:%4") \
.arg(state()).arg(s).arg(QLatin1String(__FILE__)).arg(__LINE__), LogError); \
QTC_ASSERT(false, qDebug() << state() << s); \
} \
} while (0)
#define CHECK_STATE(s) do { checkState(s, __FILE__, __LINE__); } while (0)
QByteArray GdbEngine::tooltipIName(const QString &exp)
{