mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
windowmanager destructor free _mainwindow, fix save - remove const in (#36)
* windowmanager destructor free _mainwindow, fix save - remove const in settingsPath that is being written to from ptree tree * syntax error * remove destructor, singleton, let OS claim the resource as no special cleanup of _mainWindow is not needed
This commit is contained in:
parent
d96c4a5c91
commit
744940ffd5
5 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
#define MESSAGEBUILDER_H
|
#define MESSAGEBUILDER_H
|
||||||
|
|
||||||
#include "messages/message.h"
|
#include "messages/message.h"
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
namespace messages {
|
namespace messages {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef WINNATIVEWINDOW_H
|
#ifndef WINNATIVEWINDOW_H
|
||||||
#define WINNATIVEWINDOW_H
|
#define WINNATIVEWINDOW_H
|
||||||
|
|
||||||
|
#define NOMINMAX
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
#include "Windowsx.h"
|
#include "Windowsx.h"
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "twitch/twitchuser.h"
|
#include "twitch/twitchuser.h"
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
#ifdef USEWINSDK
|
#ifdef USEWINSDK
|
||||||
|
#define NOMINMAX
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@ namespace chatterino {
|
||||||
WindowManager WindowManager::instance;
|
WindowManager WindowManager::instance;
|
||||||
|
|
||||||
WindowManager::WindowManager()
|
WindowManager::WindowManager()
|
||||||
: _windowMutex()
|
: _mainWindow(nullptr)
|
||||||
, _mainWindow(nullptr)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +102,7 @@ void WindowManager::load()
|
||||||
|
|
||||||
void WindowManager::save()
|
void WindowManager::save()
|
||||||
{
|
{
|
||||||
const auto &settingsPath = getSettingsPath();
|
auto &settingsPath = getSettingsPath();
|
||||||
boost::property_tree::ptree tree;
|
boost::property_tree::ptree tree;
|
||||||
|
|
||||||
// Create windows array
|
// Create windows array
|
||||||
|
|
Loading…
Reference in a new issue