added debug logs and code to assert that we are in the gui thread

This commit is contained in:
fourtf
2018-04-26 18:10:26 +02:00
parent b176dc5295
commit d078ef5fe0
22 changed files with 81 additions and 13 deletions
+18
View File
@@ -0,0 +1,18 @@
#pragma once
#include <QCoreApplication>
#include <QThread>
#include <cassert>
namespace chatterino {
namespace util {
void assertInGuiThread()
{
#ifdef _DEBUG
assert(QCoreApplication::instance()->thread() == QThread::currentThread());
#endif
}
} // namespace util
} // namespace chatterino