diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 077af9fafb..b3685d4a35 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -41,6 +41,8 @@ # include #endif +#include + #include #include #include @@ -1670,6 +1672,18 @@ Gui::PreferencePackManager* Application::prefPackManager() //************************************************************************** // Init, Destruct and singleton +namespace { +void setCategoryFilterRules() +{ + QString filter; + QTextStream stream(&filter); + stream << "qt.qpa.xcb.warning=false\n"; + stream << "qt.qpa.mime.warning=false\n"; + stream.flush(); + QLoggingCategory::setFilterRules(filter); +} +} + using _qt_msg_handler_old = void (*)(QtMsgType, const QMessageLogContext &, const QString &); _qt_msg_handler_old old_qtmsg_handler = nullptr; @@ -1755,6 +1769,7 @@ void Application::initApplication() initTypes(); new Base::ScriptProducer( "FreeCADGuiInit", FreeCADGuiInit ); init_resources(); + setCategoryFilterRules(); old_qtmsg_handler = qInstallMessageHandler(messageHandler); init = true; }