Commit 6f26bcbf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Logging text

parent 1b2cf4b1
......@@ -19,9 +19,13 @@
#include "logcreatingressource.h"
#include <QTemporaryFile>
LogCreatingResource::LogCreatingResource(QObject *parent)
: QObject(parent)
{
mTmpLogFile = new QTemporaryFile(this);
mTmpLogFile->open();
}
LogCreatingResource::~LogCreatingResource()
......@@ -35,6 +39,5 @@ void LogCreatingResource::appendText(const QString &str)
QString LogCreatingResource::logPath() const
{
//TODO
return {};
return mTmpLogFile->fileName();
}
......@@ -21,7 +21,7 @@
#define LOGCREATINGRESOURCE_H
#include <QObject>
class QTemporaryFile;
class LogCreatingResource : public QObject
{
Q_OBJECT
......@@ -30,6 +30,8 @@ public:
~LogCreatingResource();
void appendText(const QString &str);
Q_REQUIRED_RESULT QString logPath() const;
private:
QTemporaryFile *mTmpLogFile = nullptr;
};
#endif // LOGCREATINGRESOURCE_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment