mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Merge pull request 'Whonix: detect version' (#301) from tobtoht/feather:whonix_version into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/301
This commit is contained in:
		
						commit
						7627c89162
					
				
					 5 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -6,7 +6,6 @@
 | 
			
		|||
 | 
			
		||||
#include "appcontext.h"
 | 
			
		||||
#include "globals.h"
 | 
			
		||||
#include "utils/whonix.h"
 | 
			
		||||
 | 
			
		||||
// libwalletqt
 | 
			
		||||
#include "libwalletqt/TransactionHistory.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@
 | 
			
		|||
#include <QTimer>
 | 
			
		||||
 | 
			
		||||
#include "utils/tails.h"
 | 
			
		||||
#include "utils/whonix.h"
 | 
			
		||||
#include "utils/prices.h"
 | 
			
		||||
#include "utils/networking.h"
 | 
			
		||||
#include "utils/tor.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,6 +64,9 @@ void DebugInfoDialog::updateInfo() {
 | 
			
		|||
    if (m_ctx->isTails) {
 | 
			
		||||
        os = QString("Tails %1").arg(TailsOS::version());
 | 
			
		||||
    }
 | 
			
		||||
    if (m_ctx->isWhonix) {
 | 
			
		||||
        os = QString("Whonix %1").arg(WhonixOS::version());
 | 
			
		||||
    }
 | 
			
		||||
    ui->label_OS->setText(os);
 | 
			
		||||
    ui->label_timestamp->setText(QString::number(QDateTime::currentSecsSinceEpoch()));
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,3 +8,10 @@
 | 
			
		|||
bool WhonixOS::detect() {
 | 
			
		||||
    return !QString::fromLocal8Bit(qgetenv("WHONIX")).isEmpty();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString WhonixOS::version() {
 | 
			
		||||
    if (!Utils::fileExists("/etc/whonix_version"))
 | 
			
		||||
        return "";
 | 
			
		||||
 | 
			
		||||
    return Utils::barrayToString(Utils::fileOpen("/etc/whonix_version")).trimmed();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -4,9 +4,11 @@
 | 
			
		|||
#ifndef FEATHER_WHONIX_H
 | 
			
		||||
#define FEATHER_WHONIX_H
 | 
			
		||||
 | 
			
		||||
#include <QString>
 | 
			
		||||
 | 
			
		||||
struct WhonixOS {
 | 
			
		||||
    static bool detect();
 | 
			
		||||
    static QString version();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue