mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 10:28:57 +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
|
||||
|
||||
public:
|
||||
AbstractLoggerInterface(QObject* parent = NULL) : QObject(parent) {};
|
||||
inline bool extraDebugging() { return _extraDebugging; };
|
||||
inline void setExtraDebugging(bool debugging) { _extraDebugging = debugging; };
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
_resetRecentMaxPacketsSoon(true),
|
||||
_swatch(NULL),
|
||||
_pasteMode(false),
|
||||
_logger(new FileLogger()),
|
||||
_logger(new FileLogger(this)),
|
||||
_persistThread(NULL)
|
||||
{
|
||||
_myAvatar = _avatarManager.getMyAvatar();
|
||||
|
@ -328,12 +328,7 @@ Application::~Application() {
|
|||
|
||||
VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown
|
||||
Menu::getInstance()->deleteLater();
|
||||
|
||||
_avatarManager.clear();
|
||||
_myAvatar = NULL;
|
||||
|
||||
delete _logger;
|
||||
delete _settings;
|
||||
|
||||
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 LOGS_DIRECTORY = "Logs";
|
||||
|
||||
FileLogger::FileLogger() : _logData(NULL) {
|
||||
FileLogger::FileLogger(QObject* parent) :
|
||||
AbstractLoggerInterface(parent),
|
||||
_logData(NULL)
|
||||
{
|
||||
setExtraDebugging(false);
|
||||
|
||||
_fileName = FileUtils::standardPath(LOGS_DIRECTORY);
|
||||
|
|
|
@ -16,7 +16,7 @@ class FileLogger : public AbstractLoggerInterface {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileLogger();
|
||||
FileLogger(QObject* parent = NULL);
|
||||
|
||||
virtual void addMessage(QString);
|
||||
virtual QStringList getLogData() { return _logData; };
|
||||
|
|
Loading…
Reference in a new issue