From 3831e835353070f73a4b5cf941e217b6a6ec7cc4 Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Fri, 10 Apr 2020 17:37:19 +0100 Subject: [PATCH] Migrate off ConsoleWriterFactory --- src/recorder/jamrecorder.cpp | 10 +++++----- src/recorder/jamrecorder.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/recorder/jamrecorder.cpp b/src/recorder/jamrecorder.cpp index c9623b0a..0d5d20d5 100755 --- a/src/recorder/jamrecorder.cpp +++ b/src/recorder/jamrecorder.cpp @@ -353,7 +353,7 @@ void CJamRecorder::OnEnd() if (fi.exists()) { - tsConsole << "CJamRecorder::OnEnd() - " << fi.absolutePath() << " exists and will not be overwritten." << endl; + qWarning() << "CJamRecorder::OnEnd():" << fi.absolutePath() << "exists and will not be overwritten."; } else { @@ -361,7 +361,7 @@ void CJamRecorder::OnEnd() outf.open(QFile::WriteOnly); QTextStream out(&outf); out << CReaperProject(currentSession->Tracks()).toString() << endl; - tsConsole << "Session RPP: " << reaperProjectFileName << endl; + qDebug() << "Session RPP:" << reaperProjectFileName; } delete currentSession; @@ -397,7 +397,7 @@ void CJamRecorder::SessionDirToReaper(QString& strSessionDirName) out << CReaperProject(CJamSession::TracksFromSessionDir(fiSessionDir.absoluteFilePath())).toString() << endl; - (*(new ConsoleWriterFactory())->get()) << "Session RPP: " << reaperProjectFileName << endl; + qDebug() << "Session RPP:" << reaperProjectFileName; } /** @@ -408,11 +408,11 @@ void CJamRecorder::OnDisconnected(int iChID) { if (!isRecording) { - tsConsole << "CJamRecorder::OnDisconnected: channel " << iChID << " disconnected but not recording" << endl; + qWarning() << "CJamRecorder::OnDisconnected: channel" << iChID << "disconnected but not recording"; } if (currentSession == nullptr) { - tsConsole << "CJamRecorder::OnDisconnected: channel " << iChID << " disconnected but no currentSession" << endl; + qWarning() << "CJamRecorder::OnDisconnected: channel" << iChID << "disconnected but no currentSession"; return; } currentSession->DisconnectClient(iChID); diff --git a/src/recorder/jamrecorder.h b/src/recorder/jamrecorder.h index 600faab6..3dd24e15 100755 --- a/src/recorder/jamrecorder.h +++ b/src/recorder/jamrecorder.h @@ -170,7 +170,6 @@ private: bool isRecording; CJamSession* currentSession; - QTextStream& tsConsole = *((new ConsoleWriterFactory())->get()); }; }