mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Make the runtime configuration dialog non-modal. Fixes #5490
Major refactoring of the runtime code, Specifically: - Move the bulk of the core code from main() into a new Runtime class. - Break up the mass of code that was main() into a number of relatively simple functions. - Make the Configuration dialog synchronous so the Log dialog can be properly viewed. - Enable/disable menu options at the right time. - Remove support for Qt < 5.0. - Remove the application name constant and hardcode the name to simplify the code. - Improve log messages. - Replace the sdbm hashing with Qt's MD5 hashing.
This commit is contained in:
@@ -11,8 +11,12 @@
|
||||
|
||||
#include "pgAdmin4.h"
|
||||
#include "Logger.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QTextStream>
|
||||
#include <QStandardPaths>
|
||||
|
||||
Logger* Logger::m_pThis = Q_NULLPTR;
|
||||
QString Logger::m_sFileName = "";
|
||||
QFile* Logger::m_Logfile = Q_NULLPTR;
|
||||
|
||||
Logger::Logger()
|
||||
@@ -28,9 +32,8 @@ Logger* Logger::GetLogger()
|
||||
if (m_pThis == Q_NULLPTR)
|
||||
{
|
||||
m_pThis = new Logger();
|
||||
m_sFileName = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + (QString("/.%1.startup.log").arg(PGA_APP_NAME)).remove(" ");
|
||||
m_Logfile = new QFile;
|
||||
m_Logfile->setFileName(m_sFileName);
|
||||
m_Logfile->setFileName(getStartupLogFile());
|
||||
m_Logfile->open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
m_Logfile->setPermissions(QFile::ReadOwner|QFile::WriteOwner);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user