2019-09-15 15:45:04 +02:00
|
|
|
#include "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())
|
|
|
|
{
|
2019-09-15 16:56:44 +02:00
|
|
|
auto line = QString(file.readLine()).trimmed();
|
2019-09-15 15:45:04 +02:00
|
|
|
|
|
|
|
// 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::getInstance()
|
|
|
|
{
|
|
|
|
static Modes instance;
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace chatterino
|