aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/fileout.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/fileout.h')
-rw-r--r--sources/shiboken2/ApiExtractor/fileout.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/sources/shiboken2/ApiExtractor/fileout.h b/sources/shiboken2/ApiExtractor/fileout.h
index 539ae7a43..aace70131 100644
--- a/sources/shiboken2/ApiExtractor/fileout.h
+++ b/sources/shiboken2/ApiExtractor/fileout.h
@@ -43,18 +43,17 @@ private:
public:
enum State { Failure, Unchanged, Success };
- FileOut(QString name);
- ~FileOut()
- {
- if (!isDone)
- done();
- }
+ explicit FileOut(QString name);
+ ~FileOut();
+
+ QString filePath() const { return name; }
State done();
State done(QString *errorMessage);
- static QString msgCannotOpenForReading(const QFile &f);
- static QString msgCannotOpenForWriting(const QFile &f);
+ void touch() { touchFile(name); }
+
+ static void touchFile(const QString &filePath);
QTextStream stream;