Removed version-check related dialogs

This commit is contained in:
Valentino Orlandi 2022-11-13 01:37:44 +01:00
parent fcd1dfb3c9
commit 755a52329e
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
2 changed files with 0 additions and 80 deletions

View File

@ -117,79 +117,6 @@ void DialogSec::errFailedApplyingConfigs( const QString& msg, QWidget *parent )
///////////////////////
//// VERSION CHECK ////
///////////////////////
void DialogSec::errVersionCheckFailed( const int& err_code, QWidget *parent )
{
QString msg;
switch (err_code) {
case 1:
msg = QString("%1\n\n%2").arg(
DialogSec::tr("An error occured while establishing a connection with any of the hosts"),
DialogSec::tr("Please check your internet connection and retry\nIf this error persists, please report this issue") );
break;
case 10:
msg = DialogSec::tr("An error occured while parsing:\nversion mark not found");
break;
case 11:
msg = DialogSec::tr("An error occured while parsing:\nmalformed version");
break;
case 20:
msg = DialogSec::tr("An error occured while comparing:\nversion lesser than 0");
break;
default:
throw("Unexpected err_code in VersionCheck dialog: "+std::to_string(err_code));
break;
}
DialogMsg dialog = DialogMsg(
DialogSec::tr("Version check failed"),
QString("%1\n\n%2").arg(
DialogSec::tr("Failed to fetch the upstream version"),
msg ),
"", 2, parent );
std::ignore = dialog.exec();
}
void DialogSec::warnConnectionFailed( const QString& link, const QString& err_msg, QWidget *parent )
{
DialogMsg dialog = DialogMsg(
DialogSec::tr("Failed to establish a connection"),
QString("%1:\n%2").arg(
DialogSec::tr("An error occured while trying to establish a connection with"),
link ),
err_msg, 1, parent );
std::ignore = dialog.exec();
}
void DialogSec::msgNewVersion( QWidget *parent )
{
DialogMsg dialog = DialogMsg(
DialogSec::tr("Version check"),
DialogSec::tr("A new version available!\n\nPlease visit LogDoctor's git repository\nand follow the instruction about how to update"),
"", 0, parent );
std::ignore = dialog.exec();
}
void DialogSec::msgSameVersion( QWidget *parent )
{
DialogMsg dialog = DialogMsg(
DialogSec::tr("Version check"),
DialogSec::tr("LogDoctor is up-to-date"),
"", 0, parent );
std::ignore = dialog.exec();
}
void DialogSec::warnFutureVersion( QWidget *parent )
{
DialogMsg dialog = DialogMsg(
DialogSec::tr("Version check"),
DialogSec::tr("You're running a version from the future!\n\nYour version is beyond the current upstream version\n\nAre you running the original LogDoctor?\nIf you think so, you may be a victim of a malware\nPlease visit the LogDoctor's repository and get a fresh version of it"),
"", 1, parent );
std::ignore = dialog.exec();
}
//////////////
//// HELP ////
//////////////

View File

@ -29,13 +29,6 @@ public:
static void errConfDirNotWritable( const QString& dir, QWidget *parent=nullptr );
static void errFailedApplyingConfigs( const QString& msg="", QWidget *parent=nullptr );
// update
static void errVersionCheckFailed( const int& err_code, QWidget *parent=nullptr );
static void warnConnectionFailed( const QString& link, const QString& err_msg, QWidget *parent=nullptr );
static void msgNewVersion( QWidget *parent=nullptr );
static void msgSameVersion( QWidget *parent=nullptr );
static void warnFutureVersion( QWidget *parent=nullptr );
// help
static void errHelpFailed( const QString& link, const QString& msg="", QWidget *parent=nullptr );
static void errHelpNotFound( const QString& link, QWidget *parent=nullptr );