[vlc-commits] [Git][videolan/vlc][master] qt: classify qml errors for logging
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat Mar 11 11:37:11 UTC 2023
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
d9e5c65d by Fatih Uzunoglu at 2023-03-11T11:11:35+00:00
qt: classify qml errors for logging
- - - - -
1 changed file:
- modules/gui/qt/maininterface/mainui.cpp
Changes:
=====================================
modules/gui/qt/maininterface/mainui.cpp
=====================================
@@ -404,8 +404,29 @@ void MainUI::registerQMLTypes()
void MainUI::onQmlWarning(const QList<QQmlError>& qmlErrors)
{
- for (auto& error: qmlErrors)
+ for( const auto& error: qmlErrors )
{
- msg_Warn( m_intf, "qml error %s:%i %s", qtu(error.url().toString()), error.line(), qtu(error.description()) );
+ vlc_log_type type;
+
+ switch( error.messageType() )
+ {
+ case QtInfoMsg:
+ type = VLC_MSG_INFO; break;
+ case QtWarningMsg:
+ type = VLC_MSG_WARN; break;
+ case QtCriticalMsg:
+ case QtFatalMsg:
+ type = VLC_MSG_ERR; break;
+ case QtDebugMsg:
+ default:
+ type = VLC_MSG_DBG;
+ }
+
+ msg_Generic( m_intf,
+ type,
+ "qml message %s:%i %s",
+ qtu(error.url().toString()),
+ error.line(),
+ qtu(error.description()) );
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d9e5c65d33681dbf2eed8891bd6540b152e847c7
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d9e5c65d33681dbf2eed8891bd6540b152e847c7
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list