summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-03-30 10:18:23 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-30 12:04:49 +0200
commitac2f7eff88e2ca1b283f739d464a6b3ee58a611a (patch)
tree5bb2cbecfacd03e15bba92bd5e29435a77e0f9c8 /src
parent831943d7f12addef79fb536e5550da0f72480217 (diff)
QDoc: Write proper output file name for debug output.
Change-Id: I55138c47960a4d9e1595ef648a8d0982e3bfd19b Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/qdoc/generator.cpp5
-rw-r--r--src/tools/qdoc/generator.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 623c0a299a..a2d5277c88 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -1553,6 +1553,11 @@ QTextStream &Generator::out()
return *outStreamStack.top();
}
+QString Generator::outFileName()
+{
+ return QFileInfo(static_cast<QFile*>(out().device())->fileName()).fileName();
+}
+
QString Generator::outputPrefix(const QString &nodeType)
{
return outputPrefixes[nodeType];
diff --git a/src/tools/qdoc/generator.h b/src/tools/qdoc/generator.h
index bc1b12b958..5676dd23a2 100644
--- a/src/tools/qdoc/generator.h
+++ b/src/tools/qdoc/generator.h
@@ -46,6 +46,8 @@
#ifndef GENERATOR_H
#define GENERATOR_H
+#include <QFile>
+#include <QFileInfo>
#include <QList>
#include <QMap>
#include <QRegExp>
@@ -125,8 +127,7 @@ protected:
const Node *relative,
CodeMarker *marker);
virtual QString imageFileName(const Node *relative, const QString& fileBase);
- virtual QString outFileName() { return QString(); }
- virtual int skipAtoms(const Atom *atom, Atom::Type type) const;
+ virtual int skipAtoms(const Atom *atom, Atom::Type type) const;
virtual void startText(const Node *relative, CodeMarker *marker);
virtual QString typeString(const Node *node);
@@ -158,6 +159,7 @@ protected:
QStringList getMetadataElements(const InnerNode* inner, const QString& t);
QString indent(int level, const QString& markedCode);
QTextStream& out();
+ QString outFileName();
bool parseArg(const QString& src,
const QString& tag,
int* pos,