diff options
author | Marius Kintel <marius@kintel.net> | 2011-11-07 00:45:14 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-11-07 00:45:14 (GMT) |
commit | 8a51e15666d1a1be32508891959e053bcbaa938d (patch) | |
tree | 7d509a89288e2f1c5ead985c7354e7e49e8b431e /src/value.cc | |
parent | f107519cabee2d524653959cbb8b7ef6fc852ba8 (diff) |
Custom stream operator for outputting relative filenames
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 7 |
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; +} + |