From 1ab03975f76fb6e0ea280d4a5c4f16202a5b6d2b Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 27 Jul 2021 21:07:32 -0500 Subject: [PATCH] Cleanup --- SlideController.pro | 1 + main.cpp | 3 ++- mainwindow.hpp | 1 + obsclient.cpp | 2 +- obsclient.hpp | 1 + openlpclient.cpp | 8 ++++---- openlpclient.hpp | 2 ++ slideview.hpp | 3 +-- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/SlideController.pro b/SlideController.pro index daba2c1..2bd5bba 100644 --- a/SlideController.pro +++ b/SlideController.pro @@ -16,6 +16,7 @@ SOURCES += \ slideview.cpp HEADERS += \ + consts.hpp \ mainwindow.hpp \ obsclient.hpp \ openlpclient.hpp \ diff --git a/main.cpp b/main.cpp index 2ba26e6..98e21be 100644 --- a/main.cpp +++ b/main.cpp @@ -5,10 +5,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "mainwindow.hpp" #include +#include "mainwindow.hpp" + int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; diff --git a/mainwindow.hpp b/mainwindow.hpp index 0a2d20a..edd715b 100644 --- a/mainwindow.hpp +++ b/mainwindow.hpp @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #pragma once #include diff --git a/obsclient.cpp b/obsclient.cpp index c46de11..714a51e 100644 --- a/obsclient.cpp +++ b/obsclient.cpp @@ -51,7 +51,7 @@ void OBSClient::poll() { void OBSClient::handlePollResponse(QNetworkReply *reply) { if (reply->error()) { - qDebug() << reply->errorString(); + qDebug() << "OBSClient error response:" << reply->errorString(); emit pollFailed(); return; } diff --git a/obsclient.hpp b/obsclient.hpp index 24d19cc..b53cf10 100644 --- a/obsclient.hpp +++ b/obsclient.hpp @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #pragma once #include diff --git a/openlpclient.cpp b/openlpclient.cpp index 6652fef..88fe0c2 100644 --- a/openlpclient.cpp +++ b/openlpclient.cpp @@ -86,13 +86,13 @@ void OpenLPClient::poll() { void OpenLPClient::handleGeneralResponse(QNetworkReply *reply) { if (reply->error()) { - qDebug() << reply->request().url() << ":" << reply->errorString(); + qDebug() << "OpenLPClient error response:" << reply->request().url() << ":" << reply->errorString(); } } void OpenLPClient::handlePollResponse(QNetworkReply *reply) { if (reply->error()) { - qDebug() << reply->errorString(); + qDebug() << "OpenLPClient error response:" << reply->errorString(); emit pollFailed(); m_currentServiceId = -1; m_currentSongId = ""; @@ -121,7 +121,7 @@ void OpenLPClient::handlePollResponse(QNetworkReply *reply) { void OpenLPClient::handleSongListResponse(QNetworkReply *reply) { if (reply->error()) { - qDebug() << reply->errorString(); + qDebug() << "OpenLPClient error response:" << reply->errorString(); } auto data = reply->readAll(); if (data.isEmpty()) { @@ -143,7 +143,7 @@ void OpenLPClient::handleSongListResponse(QNetworkReply *reply) { void OpenLPClient::handleSlideListResponse(QNetworkReply *reply) { if (reply->error()) { - qDebug() << reply->errorString(); + qDebug() << "OpenLPClient error response:" << reply->errorString(); } auto data = reply->readAll(); if (data.isEmpty()) { diff --git a/openlpclient.hpp b/openlpclient.hpp index 750b4f6..40821a4 100644 --- a/openlpclient.hpp +++ b/openlpclient.hpp @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #pragma once #include @@ -16,6 +17,7 @@ class OpenLPClient: public QObject { Q_OBJECT + private: struct Song { QString name; diff --git a/slideview.hpp b/slideview.hpp index 95b4fbe..f19b447 100644 --- a/slideview.hpp +++ b/slideview.hpp @@ -9,8 +9,7 @@ #include -class SlideView : public QWidget -{ +class SlideView: public QWidget { Q_OBJECT private: class QTableWidget *m_slideTable = nullptr;