mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Merge pull request 'DebugInfoDialog: Add Tails version' (#69) from tobtoht/feather:tails_version into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/69
This commit is contained in:
		
						commit
						06cee3f03e
					
				
					 3 changed files with 20 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -43,7 +43,11 @@ DebugInfoDialog::DebugInfoDialog(AppContext *ctx, QWidget *parent)
 | 
			
		|||
    ui->label_seedType->setText(ctx->currentWallet->getCacheAttribute("feather.seed").isEmpty() ? "25 word" : "14 word");
 | 
			
		||||
    ui->label_viewOnly->setText(ctx->currentWallet->viewOnly() ? "True" : "False");
 | 
			
		||||
 | 
			
		||||
    ui->label_OS->setText(QSysInfo::prettyProductName());
 | 
			
		||||
    QString os = QSysInfo::prettyProductName();
 | 
			
		||||
    if (ctx->isTails) {
 | 
			
		||||
        os = QString("Tails %1").arg(TailsOS::version());
 | 
			
		||||
    }
 | 
			
		||||
    ui->label_OS->setText(os);
 | 
			
		||||
    ui->label_timestamp->setText(QString::number(QDateTime::currentSecsSinceEpoch()));
 | 
			
		||||
 | 
			
		||||
    connect(ui->btn_Copy, &QPushButton::clicked, this, &DebugInfoDialog::copyToClipboad);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,6 +38,20 @@ bool TailsOS::detectDotPersistence()
 | 
			
		|||
    return QDir(tailsPathData + "dotfiles").exists();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString TailsOS::version()
 | 
			
		||||
{
 | 
			
		||||
    if (!Utils::fileExists("/etc/os-release"))
 | 
			
		||||
        return "";
 | 
			
		||||
 | 
			
		||||
    QByteArray data = Utils::fileOpen("/etc/os-release");
 | 
			
		||||
    QRegExp re(R"(TAILS_VERSION_ID="(\d+.\d+))");
 | 
			
		||||
    int pos = re.indexIn(data);
 | 
			
		||||
    if (pos >= 0) {
 | 
			
		||||
        return re.cap(1);
 | 
			
		||||
    }
 | 
			
		||||
    return "";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TailsOS::showDataPersistenceDisabledWarning()
 | 
			
		||||
{
 | 
			
		||||
    QMessageBox msgBox;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,6 +13,7 @@ public:
 | 
			
		|||
    static bool detect();
 | 
			
		||||
    static bool detectDataPersistence();
 | 
			
		||||
    static bool detectDotPersistence();
 | 
			
		||||
    static QString version();
 | 
			
		||||
 | 
			
		||||
    static void showDataPersistenceDisabledWarning();
 | 
			
		||||
    static void askPersistence();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue