renamed getInstance() -> instance() for singletons
This commit is contained in:
@@ -178,7 +178,7 @@ void Channel::addOrReplaceTimeout(MessagePtr message)
|
||||
}
|
||||
|
||||
// XXX: Might need the following line
|
||||
// WindowManager::getInstance().repaintVisibleChatWidgets(this);
|
||||
// WindowManager::instance().repaintVisibleChatWidgets(this);
|
||||
}
|
||||
|
||||
void Channel::disableAllMessages()
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace {
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Credentials &Credentials::getInstance()
|
||||
Credentials &Credentials::instance()
|
||||
{
|
||||
static Credentials creds;
|
||||
return creds;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace chatterino {
|
||||
class Credentials
|
||||
{
|
||||
public:
|
||||
static Credentials &getInstance();
|
||||
static Credentials &instance();
|
||||
|
||||
void get(const QString &provider, const QString &name, QObject *receiver,
|
||||
std::function<void(const QString &)> &&onLoaded);
|
||||
|
||||
@@ -27,7 +27,7 @@ Modes::Modes()
|
||||
}
|
||||
}
|
||||
|
||||
const Modes &Modes::getInstance()
|
||||
const Modes &Modes::instance()
|
||||
{
|
||||
static Modes instance;
|
||||
return instance;
|
||||
|
||||
@@ -7,7 +7,7 @@ class Modes
|
||||
public:
|
||||
Modes();
|
||||
|
||||
static const Modes &getInstance();
|
||||
static const Modes &instance();
|
||||
|
||||
bool isNightly{};
|
||||
bool isPortable{};
|
||||
|
||||
@@ -26,7 +26,7 @@ Version::Version()
|
||||
|
||||
// "Full" version string, as displayed in window title
|
||||
this->fullVersion_ = "Chatterino ";
|
||||
if (Modes::getInstance().isNightly)
|
||||
if (Modes::instance().isNightly)
|
||||
{
|
||||
this->fullVersion_ += "Nightly ";
|
||||
}
|
||||
@@ -34,7 +34,7 @@ Version::Version()
|
||||
this->fullVersion_ += this->version_;
|
||||
}
|
||||
|
||||
const Version &Version::getInstance()
|
||||
const Version &Version::instance()
|
||||
{
|
||||
static Version instance;
|
||||
return instance;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace chatterino {
|
||||
class Version
|
||||
{
|
||||
public:
|
||||
static const Version &getInstance();
|
||||
static const Version &instance();
|
||||
|
||||
const QString &version() const;
|
||||
const QString &commitHash() const;
|
||||
|
||||
Reference in New Issue
Block a user