|
|
@ -12,11 +12,15 @@
|
|
|
|
#include "Branding.h"
|
|
|
|
#include "Branding.h"
|
|
|
|
#include "DllMacro.h"
|
|
|
|
#include "DllMacro.h"
|
|
|
|
#include "utils/Logger.h"
|
|
|
|
#include "utils/Logger.h"
|
|
|
|
|
|
|
|
#include "utils/Units.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <QFile>
|
|
|
|
#include <QFile>
|
|
|
|
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QTcpSocket>
|
|
|
|
#include <QTcpSocket>
|
|
|
|
#include <QUrl>
|
|
|
|
#include <QUrl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using namespace CalamaresUtils::Units;
|
|
|
|
|
|
|
|
|
|
|
|
/** @brief Reads the logfile, returns its contents.
|
|
|
|
/** @brief Reads the logfile, returns its contents.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Returns an empty QByteArray() on any kind of error.
|
|
|
|
* Returns an empty QByteArray() on any kind of error.
|
|
|
@ -30,8 +34,12 @@ logFileContents()
|
|
|
|
cError() << "Could not open log file";
|
|
|
|
cError() << "Could not open log file";
|
|
|
|
return QByteArray();
|
|
|
|
return QByteArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// TODO: read the **last** 16kiB?
|
|
|
|
QFileInfo fi( pasteSourceFile );
|
|
|
|
return pasteSourceFile.read( 16384 /* bytes */ );
|
|
|
|
if ( fi.size() > 16_KiB )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pasteSourceFile.seek( fi.size() - 16_KiB );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return pasteSourceFile.read( 16_KiB );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|