[LOG] Ignore some Qt warnings in released swift version

* those warnings confuse the user
* not ignored in DEV versions
* see https://discordapp.com/channels/539048679160676382/539925070550794240/704375325336928338
This commit is contained in:
Klaus Basan
2020-04-27 20:12:04 +02:00
committed by Mat Sutcliffe
parent e50520c0aa
commit 54646c8edb
3 changed files with 18 additions and 7 deletions

View File

@@ -145,6 +145,17 @@ namespace BlackMisc
statusMessage.setSeverity(CStatusMessage::SeverityDebug); statusMessage.setSeverity(CStatusMessage::SeverityDebug);
} }
if (!CBuildConfig::isLocalDeveloperDebugBuild() && CLogPattern::exactMatch("default").withSeverity(CStatusMessage::SeverityWarning).match(statusMessage))
{
// All Qt warnings
// demoted because caused by airline icons, we would need to re-create literally dozens of these images
if (statusMessage.getMessage().startsWith(QStringLiteral("libpng warning"))) { statusMessage.setSeverity(CStatusMessage::SeverityDebug); }
// demoted, because in some swift APPs some options can be ignored
else if (statusMessage.getMessage().startsWith(QStringLiteral("QCommandLineParser: option not defined"))) { statusMessage.setSeverity(CStatusMessage::SeverityDebug); }
}
using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::PhysicalQuantities;
auto bucket = m_tokenBuckets.find(statusMessage); auto bucket = m_tokenBuckets.find(statusMessage);
if (bucket == m_tokenBuckets.end()) { bucket = m_tokenBuckets.insert(statusMessage, { { 5, CTime(1, CTimeUnit::s()), 1 }, 0 }); } if (bucket == m_tokenBuckets.end()) { bucket = m_tokenBuckets.insert(statusMessage, { { 5, CTime(1, CTimeUnit::s()), 1 }, 0 }); }

View File

@@ -103,7 +103,7 @@
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>Latest &amp;news and &amp;about</string> <string>Latest &amp;news and about</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="vl_LatestNewsAndAbout"> <layout class="QVBoxLayout" name="vl_LatestNewsAndAbout">
<item> <item>