1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01: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::readyRead, this, &SDKConnection::readyRead);
connect(m_socket, &QLocalSocket::disconnected, this, &SDKConnection::close); connect(m_socket, &QLocalSocket::disconnected, this, &SDKConnection::close);
} }
~SDKConnection (){
qDebug() << "Terminating connection object";
}
QString appID() const QString appID() const
{ {
@ -77,10 +80,10 @@ public slots:
//Only use the first 32 chars for the appID //Only use the first 32 chars for the appID
m_appID = msg.remove("appID=").mid(0, 32); m_appID = msg.remove("appID=").mid(0, 32);
msg.remove(m_appID); msg.remove(m_appID);
qDebug() << "###### Wallpaper created at:"; qDebug() << "###### Wallpaper width APPID created:" << "\n######" << m_appID;
qDebug() << "### APPID:\t " << m_appID; // TODO << "\n### Monitor: "<< m_monitor.at(0); } else {
qDebug() << "### Message from: " << m_appID << "\n###" << msg;
} }
// TODO We now get all debug messages from apps here // TODO We now get all debug messages from apps here
// show them inside ScreenPlay somewhere // show them inside ScreenPlay somewhere
} }
@ -93,8 +96,7 @@ public slots:
m_socket->disconnectFromServer(); m_socket->disconnectFromServer();
m_socket->close(); m_socket->close();
qDebug() << "###### Destroy: "; qDebug() << "### Destroy APPID:\t " << m_appID << " State: " << m_socket->state();
qDebug() << "### APPID:\t " << m_appID << " State: " << m_socket->state();
} }
void setAppID(QString appID) 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 line = "in line " + QByteArray::number(context.line) + ", ";
//QByteArray function = "function " + QByteArray(context.function) + ", Message: "; //QByteArray function = "function " + QByteArray(context.function) + ", Message: ";
localMsg = file + line + localMsg; //localMsg = file + line + localMsg;
switch (type) { switch (type) {
case QtDebugMsg: 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); global_sdkPtr->redirectMessage(localMsg);
break; break;
case QtInfoMsg: case QtInfoMsg: