1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Add regular message printing when using ScreenPlaySDK

This is now useful when directly starting ScreenPlayWallpaper
or ScreenPlayWidget
This commit is contained in:
Elias Steurer 2023-07-01 11:06:47 +02:00
parent beaf7e96e7
commit ad10683a74

View File

@ -183,4 +183,25 @@ void ScreenPlaySDK::ScreenPlaySDK::redirectMessageOutputToMainWindow(QtMsgType t
localMsg += "\nin line " + QByteArray::number(context.line) + ", ";
global_sdkPtr->redirectMessage(localMsg);
// Also redirect to regular output if we debug
// wallpaper or widgets directly
switch (type)
{
case QtDebugMsg:
qDebug() << msg;
break;
case QtWarningMsg:
qWarning() << msg;
break;
case QtCriticalMsg:
case QtFatalMsg:
qCritical() << msg;
break;
case QtInfoMsg:
qInfo() << msg;
break;
default:
break;
}
}