mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-03 17:18:24 -04:00
chore: Silence Qt warnings during tests (#110)
This commit is contained in:
parent
90beebf2ee
commit
9a5047618d
@ -19,9 +19,19 @@
|
|||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
void silenceQtWarningNoise(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||||
|
{
|
||||||
|
if (msg.startsWith("SOFT ASSERT") || msg.startsWith("Accessing MimeDatabase")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
qt_message_output(type, context, msg);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
qInstallMessageHandler(silenceQtWarningNoise);
|
||||||
QGuiApplication application(argc, argv);
|
QGuiApplication application(argc, argv);
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user