Trim leftover blank lines in nglapplication sources
This commit is contained in:
1 parent
a32481de09
commit
23cf641d36
10 files changed
+6
-50
No files matched your search
@@ -21,7 +21,6 @@ else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(nglapplication_SRCS
|
||||
nglapplication.cpp
|
||||
nglapplication.h
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
|
||||
|
||||
|
||||
#include "nglapplication.h"
|
||||
#include "ngl_signal_handler.inc"
|
||||
|
||||
|
||||
NGLApplication::NGLApplication(int &argc, char **argv)
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
|
||||
{
|
||||
signal(SIGTERM, &signalHandler);
|
||||
#ifdef Q_OS_WIN
|
||||
installNativeEventFilter(new MyEventFilter);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool NGLApplication::notify(QObject *o, QEvent *e)
|
||||
{
|
||||
bool bRet = false;
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
|
||||
|
||||
|
||||
#include "nglcoreapplication.h"
|
||||
|
||||
#include "ngl_signal_handler.inc"
|
||||
|
||||
|
||||
NGLCoreApplication::NGLCoreApplication(int &argc, char **argv)
|
||||
: QCoreApplication(argc, argv)
|
||||
{
|
||||
|
||||
{
|
||||
signal(SIGTERM, &signalHandler);
|
||||
#ifdef Q_OS_WIN
|
||||
installNativeEventFilter(new MyEventFilter);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
|
||||
|
||||
|
||||
#include "nglguiapplication.h"
|
||||
|
||||
#include "ngl_signal_handler.inc"
|
||||
|
||||
|
||||
NGLGuiApplication::NGLGuiApplication(int &argc, char **argv)
|
||||
: QGuiApplication(argc, argv)
|
||||
{
|
||||
|
||||
{
|
||||
signal(SIGTERM, &signalHandler);
|
||||
#ifdef Q_OS_WIN
|
||||
installNativeEventFilter(new MyEventFilter);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
|
||||
|
||||
|
||||
#include "nglloggerhandler.h"
|
||||
#include "ngl_qt_msg_handler.inc"
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <nglsettings/nglsettings_settings.h>
|
||||
#include <nglcoreapplication.h>
|
||||
@@ -22,13 +18,11 @@ static QByteArray username()
|
||||
|
||||
static void setEnvVars()
|
||||
{
|
||||
|
||||
const QString logPath = NGL::Settings::logPath();
|
||||
qputenv("LOG4QT_LOGDIR", logPath.toLocal8Bit());
|
||||
qputenv("LOG4QT_USER", username());
|
||||
}
|
||||
|
||||
|
||||
void LoggerHandler::createLogger(const QByteArray &baseName, const char *configFileName, bool quiet)
|
||||
{
|
||||
setEnvVars();
|
||||
@@ -41,12 +35,10 @@ void LoggerHandler::createLogger(const QByteArray &baseName, const char *configF
|
||||
|
||||
const QString logOutputName = m_loggerFilenamePostfix + m_loggerFilenamePrefix;
|
||||
NGL::NGLLoggerBootstrap::createNGLRootLogger(QString::fromLatin1(configFileName), false, logOutputName, quiet);
|
||||
|
||||
|
||||
|
||||
qInstallMessageHandler(&qtMsgHandler);
|
||||
}
|
||||
|
||||
|
||||
void LoggerHandler::createLogger(const QByteArray &baseName, int exerciseId, int additionalId, bool quiet)
|
||||
{
|
||||
setEnvVars();
|
||||
@@ -64,25 +56,20 @@ void LoggerHandler::createLogger(const QByteArray &baseName, int exerciseId, int
|
||||
m_baseLoggerName = baseName + QByteArray(".main");
|
||||
|
||||
const QString logOutputName = m_loggerFilenamePostfix + m_loggerFilenamePrefix;
|
||||
NGL::NGLLoggerBootstrap::createNGLRootLogger(configFileName, false, logOutputName, quiet);
|
||||
|
||||
|
||||
NGL::NGLLoggerBootstrap::createNGLRootLogger(configFileName, false, logOutputName, quiet);
|
||||
qInstallMessageHandler(&qtMsgHandler);
|
||||
}
|
||||
|
||||
|
||||
NGL::INGLLogger &LoggerHandler::baseLogger() const
|
||||
{
|
||||
return NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger(m_baseLoggerName.data());
|
||||
}
|
||||
|
||||
|
||||
NGL::INGLLogger &LoggerHandler::logger(const char *loggerName) const
|
||||
{
|
||||
return NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger(loggerName);
|
||||
}
|
||||
|
||||
|
||||
LoggerHandler *LoggerHandler::getLoggerHandler()
|
||||
{
|
||||
return dynamic_cast<LoggerHandler*>(QCoreApplication::instance());
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtSingleApplication/QtSingleApplication>
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
|
||||
|
||||
|
||||
#include "nglsinglecoreapplication.h"
|
||||
|
||||
#include "ngl_signal_handler.inc"
|
||||
|
||||
|
||||
NGLSingleCoreApplication::NGLSingleCoreApplication(int &argc, char **argv)
|
||||
: QtSingleCoreApplication(argc, argv)
|
||||
{
|
||||
|
||||
{
|
||||
signal(SIGTERM, &signalHandler);
|
||||
#ifdef Q_OS_WIN
|
||||
installNativeEventFilter(new MyEventFilter);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtSingleApplication/QtSingleCoreApplication>
|
||||
|
||||
Reference in new issue
Block a user