Revert "Test #6"

This reverts commit 533516a9ed.
This commit is contained in:
fourtf 2019-10-05 16:13:11 +02:00
parent a18fa71fe1
commit 96a6d94699
3 changed files with 0 additions and 48 deletions

View file

@ -24,10 +24,6 @@ Modes::Modes()
{ {
this->isPortable = true; this->isPortable = true;
} }
else if (line.startsWith("test"))
{
this->test = line.mid(4);
}
} }
} }

View file

@ -11,7 +11,6 @@ public:
bool isNightly{}; bool isNightly{};
bool isPortable{}; bool isPortable{};
QString test{};
}; };
} // namespace chatterino } // namespace chatterino

View file

@ -219,15 +219,6 @@ void Updates::checkForUpdates()
NetworkRequest(url) NetworkRequest(url)
.timeout(60000) .timeout(60000)
.onSuccess([this](auto result) -> Outcome { .onSuccess([this](auto result) -> Outcome {
if (Modes::getInstance().test == "0")
{
return Success;
}
if (Modes::getInstance().test == "1")
{
return Failure;
}
auto object = result.parseJson(); auto object = result.parseJson();
/// Version available on every platform /// Version available on every platform
QJsonValue version_val = object.value("version"); QJsonValue version_val = object.value("version");
@ -238,10 +229,6 @@ void Updates::checkForUpdates()
qDebug() << "error updating"; qDebug() << "error updating";
return Failure; return Failure;
} }
if (Modes::getInstance().test == "2")
{
return Failure;
}
#if defined Q_OS_WIN || defined Q_OS_MACOS #if defined Q_OS_WIN || defined Q_OS_MACOS
/// Windows downloads an installer for the new version /// Windows downloads an installer for the new version
@ -253,10 +240,6 @@ void Updates::checkForUpdates()
return Failure; return Failure;
} }
this->updateExe_ = updateExe_val.toString(); this->updateExe_ = updateExe_val.toString();
if (Modes::getInstance().test == "3")
{
return Failure;
}
/// Windows portable /// Windows portable
QJsonValue portable_val = object.value("portable_download"); QJsonValue portable_val = object.value("portable_download");
@ -278,19 +261,9 @@ void Updates::checkForUpdates()
return Failure; return Failure;
#endif #endif
if (Modes::getInstance().test == "4")
{
return Failure;
}
/// Current version /// Current version
this->onlineVersion_ = version_val.toString(); this->onlineVersion_ = version_val.toString();
if (Modes::getInstance().test == "5")
{
return Failure;
}
/// Update available :) /// Update available :)
if (this->currentVersion_ != this->onlineVersion_) if (this->currentVersion_ != this->onlineVersion_)
{ {
@ -313,16 +286,6 @@ Updates::Status Updates::getStatus() const
bool Updates::shouldShowUpdateButton() const bool Updates::shouldShowUpdateButton() const
{ {
if (Modes::getInstance().test == "8")
{
return false;
}
if (Modes::getInstance().test == "9")
{
return true;
}
switch (this->getStatus()) switch (this->getStatus())
{ {
case UpdateAvailable: case UpdateAvailable:
@ -356,12 +319,6 @@ void Updates::setStatus_(Status status)
if (this->status_ != status) if (this->status_ != status)
{ {
this->status_ = status; this->status_ = status;
if (Modes::getInstance().test == "6")
{
return;
}
postToThread([this, status] { this->statusUpdated.invoke(status); }); postToThread([this, status] { this->statusUpdated.invoke(status); });
} }
} }