1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Add cleaner message output if the widgets or the wallpaper call qDebug()

This commit is contained in:
Elias 2018-12-15 21:30:04 +01:00
parent fd7db29147
commit dcfa165d85
2 changed files with 9 additions and 7 deletions

View File

@ -48,6 +48,9 @@ public:
connect(m_socket, &QLocalSocket::readyRead, this, &SDKConnection::readyRead);
connect(m_socket, &QLocalSocket::disconnected, this, &SDKConnection::close);
}
~SDKConnection (){
qDebug() << "Terminating connection object";
}
QString appID() const
{
@ -77,10 +80,10 @@ public slots:
//Only use the first 32 chars for the appID
m_appID = msg.remove("appID=").mid(0, 32);
msg.remove(m_appID);
qDebug() << "###### Wallpaper created at:";
qDebug() << "### APPID:\t " << m_appID; // TODO << "\n### Monitor: "<< m_monitor.at(0);
qDebug() << "###### Wallpaper width APPID created:" << "\n######" << m_appID;
} else {
qDebug() << "### Message from: " << m_appID << "\n###" << msg;
}
// TODO We now get all debug messages from apps here
// show them inside ScreenPlay somewhere
}
@ -93,8 +96,7 @@ public slots:
m_socket->disconnectFromServer();
m_socket->close();
qDebug() << "###### Destroy: ";
qDebug() << "### APPID:\t " << m_appID << " State: " << m_socket->state();
qDebug() << "### Destroy APPID:\t " << m_appID << " State: " << m_socket->state();
}
void setAppID(QString appID)

View File

@ -13,11 +13,11 @@ void redirectMessageOutputToMainWindow(QtMsgType type, const QMessageLogContext&
QByteArray line = "in line " + QByteArray::number(context.line) + ", ";
//QByteArray function = "function " + QByteArray(context.function) + ", Message: ";
localMsg = file + line + localMsg;
//localMsg = file + line + localMsg;
switch (type) {
case QtDebugMsg:
localMsg = " SDK START: " /*+ QByteArray::fromStdString(global_sdkPtr->contentType().toStdString()) + " "*/ + localMsg + " SDK END!";
//localMsg = " SDK START: " /*+ QByteArray::fromStdString(global_sdkPtr->contentType().toStdString()) + " "*/ + localMsg;
global_sdkPtr->redirectMessage(localMsg);
break;
case QtInfoMsg: