Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
/*
* @RDE_HEADER@
* <short description>
* $Id$
* $HeadURL$
* $Author$
* Created by Malte Schröder, SLSE, 2016-06-08
*/
#include "showLogFile.h"
#include "ui_showLogFile.h"
#include <nglsettings/nglsettings_settings.h>
namespace DBAdministration
{
ShowLogFile::ShowLogFile(QWidget *parent)
: QWidget(parent)
, m_ui(new Ui::ShowLogFile)
, m_logger(getLogger("ShowLogFile"))
{
m_ui->setupUi(this);
connect(m_ui->pbClose, &QPushButton::clicked, this, &ShowLogFile::onClosedClicked);
}
ShowLogFile::~ShowLogFile()
{
delete m_ui;
}
bool ShowLogFile::init()
{
QString logFile = NGL::Settings::logPath() + QStringLiteral("/") + QString::fromLatin1(qgetenv("USER")) + QStringLiteral("_scm.log");
ERROR_LOG(m_logger) << "Logfile: " << logFile;
QFile file(logFile);
if (!file.open(QIODevice::ReadOnly))
{
ERROR_LOG(m_logger) << "Cannot open file " << logFile;
return false;
}
QByteArray output = file.readAll();
m_ui->plainTextEdit->setPlainText(QString::fromLocal8Bit(output));
return true;
}
void ShowLogFile::onClosedClicked()
{
close();
}
} // namespace DBAdministration