[vlc-devel] [PATCH] gui/skins2: polish error diagnostics on dialog provider failure

Filip Roséen filip at atch.se
Wed Mar 15 10:07:45 CET 2017


There can be more dialogs providers than qt, and qt might be compiled
even though the affected diagnostics are issued. To make the behavior
more relevant in/suitable for all circumstances:

 - the duplicate diagnostic has been removed, and;
 - mention of qt is removed.

--

As an example, starting vlc with --extraintf=qt where qt is the
default interface will result in an error saying that qt cannot be
spawned more than once per process. When the affected diagnostic is
issued it looks very confusing:

[0000612000232a78] qt interface error: cannot start Qt multiple times
[000061200036bf78] qt generic error: cannot start Qt multiple times
[0000612000232a78] skins2 interface error: no suitable dialogs provider found (hint: compile the qt plugin, and make sure it is loaded properly)
[0000612000232a78] skins2 interface error: cannot instantiate qt dialogs provider
---
 modules/gui/skins2/src/dialogs.cpp   | 1 -
 modules/gui/skins2/src/skin_main.cpp | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/gui/skins2/src/dialogs.cpp b/modules/gui/skins2/src/dialogs.cpp
index 0e866878a8..79885ea5d8 100644
--- a/modules/gui/skins2/src/dialogs.cpp
+++ b/modules/gui/skins2/src/dialogs.cpp
@@ -164,7 +164,6 @@ bool Dialogs::init()
     m_pModule = module_need( m_pProvider, "dialogs provider", NULL, false );
     if( m_pModule == NULL )
     {
-        msg_Err( getIntf(), "no suitable dialogs provider found (hint: compile the qt plugin, and make sure it is loaded properly)" );
         vlc_object_release( m_pProvider );
         m_pProvider = NULL;
         return false;
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 00c011a964..cc93d603ce 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -244,7 +244,7 @@ static void *Run( void * p_obj )
     }
     if( Dialogs::instance( p_intf ) == NULL )
     {
-        msg_Err( p_intf, "cannot instantiate qt dialogs provider" );
+        msg_Err( p_intf, "cannot instantiate dialogs provider" );
         b_error = true;
         goto end;
     }
-- 
2.12.0


More information about the vlc-devel mailing list