Skip to content

Commit

Permalink
Send dart measurement output to stdout with no prefix
Browse files Browse the repository at this point in the history
Or to put it differently, make the output usable for CDash also
with Qt5. Qt5 prefixes debug output with QDEBUG and adds quotes
before and after the message.

<DartMeasurement>...</DartMeasurement> messages are expected to
be put at the beginning and end of a line without pre- or suffix
by CDash.

We now send it to stdout without any modifications.
  • Loading branch information
m-kuhn committed Apr 17, 2016
1 parent 972f13e commit 32aee3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsdartmeasurement.cpp
Expand Up @@ -15,7 +15,7 @@

#include "qgsdartmeasurement.h"

#include <QDebug>
#include <QTextStream>

QgsDartMeasurement::QgsDartMeasurement( const QString& name, Type type, const QString& value )
: mName( name )
Expand All @@ -42,7 +42,8 @@ const QString QgsDartMeasurement::toString() const

void QgsDartMeasurement::send() const
{
qDebug() << toString() + '\n';
QTextStream out( stdout );
out << toString() << endl;
}

const QString QgsDartMeasurement::typeToString( QgsDartMeasurement::Type type )
Expand Down

1 comment on commit 32aee3d

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn nice!

Please sign in to comment.