mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-04 00:51:23 +02:00
some application destructor cleanup
This commit is contained in:
parent
d65a3ee174
commit
40a963cf92
4 changed files with 8 additions and 9 deletions
|
@ -17,6 +17,7 @@ class AbstractLoggerInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
AbstractLoggerInterface(QObject* parent = NULL) : QObject(parent) {};
|
||||||
inline bool extraDebugging() { return _extraDebugging; };
|
inline bool extraDebugging() { return _extraDebugging; };
|
||||||
inline void setExtraDebugging(bool debugging) { _extraDebugging = debugging; };
|
inline void setExtraDebugging(bool debugging) { _extraDebugging = debugging; };
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
_resetRecentMaxPacketsSoon(true),
|
_resetRecentMaxPacketsSoon(true),
|
||||||
_swatch(NULL),
|
_swatch(NULL),
|
||||||
_pasteMode(false),
|
_pasteMode(false),
|
||||||
_logger(new FileLogger()),
|
_logger(new FileLogger(this)),
|
||||||
_persistThread(NULL)
|
_persistThread(NULL)
|
||||||
{
|
{
|
||||||
_myAvatar = _avatarManager.getMyAvatar();
|
_myAvatar = _avatarManager.getMyAvatar();
|
||||||
|
@ -328,12 +328,7 @@ Application::~Application() {
|
||||||
|
|
||||||
VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown
|
VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown
|
||||||
Menu::getInstance()->deleteLater();
|
Menu::getInstance()->deleteLater();
|
||||||
|
|
||||||
_avatarManager.clear();
|
|
||||||
_myAvatar = NULL;
|
|
||||||
|
|
||||||
delete _logger;
|
|
||||||
delete _settings;
|
|
||||||
delete _glWidget;
|
delete _glWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,10 @@ const QString FILENAME_FORMAT = "hifi-log_%1_%2.txt";
|
||||||
const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss";
|
const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss";
|
||||||
const QString LOGS_DIRECTORY = "Logs";
|
const QString LOGS_DIRECTORY = "Logs";
|
||||||
|
|
||||||
FileLogger::FileLogger() : _logData(NULL) {
|
FileLogger::FileLogger(QObject* parent) :
|
||||||
|
AbstractLoggerInterface(parent),
|
||||||
|
_logData(NULL)
|
||||||
|
{
|
||||||
setExtraDebugging(false);
|
setExtraDebugging(false);
|
||||||
|
|
||||||
_fileName = FileUtils::standardPath(LOGS_DIRECTORY);
|
_fileName = FileUtils::standardPath(LOGS_DIRECTORY);
|
||||||
|
|
|
@ -16,7 +16,7 @@ class FileLogger : public AbstractLoggerInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileLogger();
|
FileLogger(QObject* parent = NULL);
|
||||||
|
|
||||||
virtual void addMessage(QString);
|
virtual void addMessage(QString);
|
||||||
virtual QStringList getLogData() { return _logData; };
|
virtual QStringList getLogData() { return _logData; };
|
||||||
|
|
Loading…
Reference in a new issue