mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
aed55ac1ba
bye bye nuuls
37 lines
719 B
C++
37 lines
719 B
C++
#include "common/Modes.hpp"
|
|
|
|
#include "util/CombinePath.hpp"
|
|
|
|
#include <QCoreApplication>
|
|
|
|
namespace chatterino {
|
|
|
|
Modes::Modes()
|
|
{
|
|
QFile file(combinePath(QCoreApplication::applicationDirPath(), "modes"));
|
|
file.open(QIODevice::ReadOnly);
|
|
|
|
while (!file.atEnd())
|
|
{
|
|
auto line = QString(file.readLine()).trimmed();
|
|
|
|
// we need to know if it is a nightly build to disable updates on windows
|
|
if (line == "nightly")
|
|
{
|
|
this->isNightly = true;
|
|
}
|
|
else if (line == "portable")
|
|
{
|
|
this->isPortable = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
const Modes &Modes::instance()
|
|
{
|
|
static Modes instance;
|
|
return instance;
|
|
}
|
|
|
|
} // namespace chatterino
|