mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[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:
committed by
Mat Sutcliffe
parent
e50520c0aa
commit
54646c8edb
@@ -233,9 +233,9 @@ namespace BlackMisc
|
||||
{
|
||||
const QString s(str.trimmed().toLower());
|
||||
if (s.contains("installer")) return CArtifact::PilotClientInstaller;
|
||||
if (s.contains("client")) return CArtifact::PilotClientInstaller;
|
||||
if (s.contains("symb")) return CArtifact::Symbols;
|
||||
if (s.contains("bus")) return CArtifact::XSwiftBus;
|
||||
if (s.contains("client")) return CArtifact::PilotClientInstaller;
|
||||
if (s.contains("symb")) return CArtifact::Symbols;
|
||||
if (s.contains("bus")) return CArtifact::XSwiftBus;
|
||||
return CArtifact::UnknownArtifact;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ namespace BlackMisc
|
||||
{
|
||||
Q_ASSERT(thread() == QThread::currentThread());
|
||||
|
||||
auto finder = [ & ](const PatternPair &pair) { return pair.first == pattern; };
|
||||
auto comparator = [](const PatternPair &a, const PatternPair &b) { return a.first.isProperSubsetOf(b.first); };
|
||||
auto finder = [ & ](const PatternPair & pair) { return pair.first == pattern; };
|
||||
auto comparator = [](const PatternPair & a, const PatternPair & b) { return a.first.isProperSubsetOf(b.first); };
|
||||
|
||||
auto it = std::find_if(m_patternHandlers.cbegin(), m_patternHandlers.cend(), finder);
|
||||
if (it == m_patternHandlers.cend())
|
||||
@@ -145,6 +145,17 @@ namespace BlackMisc
|
||||
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;
|
||||
auto bucket = m_tokenBuckets.find(statusMessage);
|
||||
if (bucket == m_tokenBuckets.end()) { bucket = m_tokenBuckets.insert(statusMessage, { { 5, CTime(1, CTimeUnit::s()), 1 }, 0 }); }
|
||||
@@ -203,7 +214,7 @@ namespace BlackMisc
|
||||
|
||||
void CLogHandler::removePatternHandler(CLogPatternHandler *handler)
|
||||
{
|
||||
auto it = std::find_if(m_patternHandlers.begin(), m_patternHandlers.end(), [handler](const PatternPair &pair)
|
||||
auto it = std::find_if(m_patternHandlers.begin(), m_patternHandlers.end(), [handler](const PatternPair & pair)
|
||||
{
|
||||
return pair.second == handler;
|
||||
});
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Latest &news and &about</string>
|
||||
<string>Latest &news and about</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_LatestNewsAndAbout">
|
||||
<item>
|
||||
|
||||
Reference in New Issue
Block a user