summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-11-07 00:45:14 (GMT)
committerMarius Kintel <marius@kintel.net>2011-11-07 00:45:14 (GMT)
commit8a51e15666d1a1be32508891959e053bcbaa938d (patch)
tree7d509a89288e2f1c5ead985c7354e7e49e8b431e /src/value.cc
parentf107519cabee2d524653959cbb8b7ef6fc852ba8 (diff)
Custom stream operator for outputting relative filenames
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc
index 6685594..0b7cd9b 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -28,6 +28,7 @@
#include "mathc99.h"
#include <assert.h>
#include <sstream>
+#include <QDir>
Value::Value()
{
@@ -413,3 +414,9 @@ std::ostream &operator<<(std::ostream &stream, const Value &value)
return stream;
}
+std::ostream &operator<<(std::ostream &stream, const Filename &filename)
+{
+ stream << QDir::current().relativeFilePath(QString::fromStdString(filename)).toStdString();
+ return stream;
+}
+
contact: Jan Huwald // Impressum