mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
chore: unsingletonize Resources/Resources2 (#5460)
This commit is contained in:
parent
d053a681a0
commit
85d6ff1e6c
|
@ -28,6 +28,7 @@
|
||||||
- Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421, #5435)
|
- Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421, #5435)
|
||||||
- Dev: Reduced the amount of scale events. (#5404, #5406)
|
- Dev: Reduced the amount of scale events. (#5404, #5406)
|
||||||
- Dev: Removed unused timegate settings. (#5361)
|
- Dev: Removed unused timegate settings. (#5361)
|
||||||
|
- Dev: Unsingletonize `Resources2`. (#5460)
|
||||||
- Dev: All Lua globals now show in the `c2` global in the LuaLS metadata. (#5385)
|
- Dev: All Lua globals now show in the `c2` global in the LuaLS metadata. (#5385)
|
||||||
- Dev: Images are now loaded in worker threads. (#5431)
|
- Dev: Images are now loaded in worker threads. (#5431)
|
||||||
- Dev: Qt Creator now auto-configures Conan when loading the project and skips vcpkg. (#5305)
|
- Dev: Qt Creator now auto-configures Conan when loading the project and skips vcpkg. (#5305)
|
||||||
|
|
|
@ -3,15 +3,14 @@
|
||||||
** WARNING! All changes made in this file will be lost!
|
** WARNING! All changes made in this file will be lost!
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include "common/Singleton.hpp"
|
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class Resources2 : public Singleton
|
class Resources2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Resources2();
|
Resources2();
|
||||||
|
|
||||||
@RES_HEADER_CONTENT@
|
@RES_HEADER_CONTENT@
|
||||||
};
|
};
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -2,10 +2,15 @@
|
||||||
|
|
||||||
#include "debug/AssertInGuiThread.hpp"
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
|
||||||
namespace {
|
namespace {
|
||||||
static Resources2 *resources = nullptr;
|
|
||||||
}
|
using namespace chatterino;
|
||||||
|
|
||||||
|
static Resources2 *resources = nullptr;
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
Resources2 &getResources()
|
Resources2 &getResources()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue