Skip to content
Snippets Groups Projects
Commit 8a7e12c1 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qt: correct respected verbosity levels for the filter rules

Although in Qt messages dialog level "2" corresponds to
debug level, in a general aspect "3" corresponds to debug.

Since we are using a non-Qt parameter "verbose" here to
probe the level, we should treat the levels as according
to the `vlc_log_type` enumeration.
parent 46d9063b
No related branches found
No related tags found
1 merge request!5488qt: correct respected verbosity levels for the filter rules
Pipeline #483985 passed with warnings with stage
in 17 minutes and 36 seconds
......@@ -96,6 +96,7 @@ extern "C" char **environ;
#include <vlc_window.h>
#include <vlc_player.h>
#include <vlc_threads.h>
#include <vlc_messages.h>
#include <QQuickWindow>
......@@ -744,11 +745,21 @@ static void *Thread( void *obj )
QString filterRules;
const int verbosity = var_InheritInteger(p_intf, "verbose");
if (verbosity < 2)
if (verbosity < VLC_MSG_DBG)
{
filterRules += QStringLiteral("*.debug=false\n");
if (verbosity < 1)
if (verbosity < VLC_MSG_WARN)
{
filterRules += QStringLiteral("*.warning=false\n");
if (verbosity < VLC_MSG_ERR)
{
filterRules += QStringLiteral("*.critical=false\n");
if (verbosity < VLC_MSG_INFO)
{
filterRules += QStringLiteral("*.info=false\n");
}
}
}
}
if (var_InheritBool(p_intf, "qt-verbose"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment