Commit d2da1a5e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove endl at the end of QDebug. It already adds it

parent 3a95e37d
......@@ -187,8 +187,7 @@ QStringList LocalLogFileReader::readContent(QIODevice *inputDevice)
// Get the size file for the next calculation
d->previousFilePosition = inputDevice->size();
logDebug() << "New file position : " << d->previousFilePosition << " (" << d->logFile.url().path() << ")"
<< endl;
logDebug() << "New file position : " << d->previousFilePosition << " (" << d->logFile.url().path() << ")";
return rawBuffer;
}
......
......@@ -133,8 +133,7 @@ void ProcessOutputLogFileReader::closeProcess()
// Get the size file for the next calculation
d->previousLinesCount = d->availableStandardOutput.count();
logDebug() << "New lines count : " << d->previousLinesCount << " (" << d->logFile.url().path() << ")"
<< endl;
logDebug() << "New lines count : " << d->previousLinesCount << " (" << d->logFile.url().path() << ")";
d->availableStandardOutput.clear();
......
......@@ -131,7 +131,7 @@ protected:
list.append(function);
list.append(lineNumber);
logDebug() << "Creating new line " << endl;
logDebug() << "Creating new line ";
LogLine *returnedLogLine = currentLogLine;
......
......@@ -51,7 +51,7 @@ private:
void KioLogFileReaderTest::initTestCase()
{
logDebug() << "Hello" << endl;
logDebug() << "Hello";
}
void KioLogFileReaderTest::testKioLogFileReader()
......@@ -63,7 +63,7 @@ void KioLogFileReaderTest::testKioLogFileReader()
KioLogFileReader *logFileReader = new KioLogFileReader(logFile);
logFileReader->open();
connect(logFileReader, &KioLogFileReader::lineRead, this, [=](const QString &line) { logDebug() << "Line " << line << endl; static QFile file(fixturePath); static bool open = false; if (!open) { QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); open = true; } static QTextStream stream(&file); QCOMPARE(line, stream.readLine());
connect(logFileReader, &KioLogFileReader::lineRead, this, [=](const QString &line) { logDebug() << "Line " << line; static QFile file(fixturePath); static bool open = false; if (!open) { QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); open = true; } static QTextStream stream(&file); QCOMPARE(line, stream.readLine());
});
}
......
......@@ -350,7 +350,7 @@ void SystemAnalyzerTest::testMaxLines()
void SystemAnalyzerTest::compareWithMinTime(QList<LogLine *> logLines, const QDateTime &minTime)
{
logDebug() << "Min time : " << minTime.toString() << endl;
logDebug() << "Min time : " << minTime.toString();
foreach (LogLine *logLine, logLines) {
if (logLine->time() < minTime) {
......
......@@ -46,7 +46,7 @@ TestUtil::~TestUtil()
void TestUtil::registerLogModeFactories() const
{
logDebug() << "Registering existing log mode factories" << endl;
logDebug() << "Registering existing log mode factories";
Globals::instance().registerLogModeFactory(new SystemLogModeFactory());
Globals::instance().registerLogModeFactory(new KernelLogModeFactory());
}
......@@ -79,7 +79,7 @@ void TestUtil::destroyReader(Analyzer *analyzer) const
QList<LogFile> TestUtil::createLogFiles(const QString &resourceFileName) const
{
QTemporaryFile *tempFile = QTemporaryFile::createNativeFile(resourceFileName);
logDebug() << "Using log file name " << tempFile << endl;
logDebug() << "Using log file name " << tempFile;
tempFile->setPermissions(QFile::WriteUser | QFile::ReadUser | QFile::ReadOwner | QFile::WriteOwner);
LogLevel *informationLogLevel = Globals::instance().informationLogLevel();
......@@ -111,11 +111,11 @@ void TestUtil::addLogLines(const QString &fileName, const QStringList &addedLine
QFile data(fileName);
if (data.open(QFile::Append | QIODevice::Text)) {
logDebug() << "Opening " << fileName << " for writing " << addedLines.count() << " line(s)." << endl;
logDebug() << "Opening " << fileName << " for writing " << addedLines.count() << " line(s).";
QTextStream out(&data);
foreach (const QString &line, addedLines) {
out << line << endl;
out << line << '\n';
}
out.flush();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment