mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
Fix storage location of config files
This commit is contained in:
@@ -6,14 +6,21 @@
|
||||
#include <QTextStream>
|
||||
#include <QSslCertificate>
|
||||
#include <QSslKey>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
|
||||
IdentityManager::IdentityManager(QDir directory)
|
||||
IdentityManager::IdentityManager()
|
||||
{
|
||||
QFile uniqueIdFile(directory.filePath("uniqueid"));
|
||||
m_RootDirectory = QDir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation));
|
||||
if (!m_RootDirectory.exists())
|
||||
{
|
||||
m_RootDirectory.mkpath(".");
|
||||
}
|
||||
|
||||
QFile uniqueIdFile(m_RootDirectory.filePath("uniqueid"));
|
||||
if (uniqueIdFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
m_CachedUniqueId = QTextStream(&uniqueIdFile).readAll();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
class IdentityManager
|
||||
{
|
||||
public:
|
||||
IdentityManager(QDir directory);
|
||||
IdentityManager();
|
||||
|
||||
QString
|
||||
getUniqueId();
|
||||
|
||||
@@ -52,7 +52,7 @@ void MainWindow::on_newHostBtn_clicked()
|
||||
QString hostname = popupmanager::getHostnameDialog(this);
|
||||
if (!hostname.isEmpty()) {
|
||||
|
||||
IdentityManager im = IdentityManager(QDir(QDir::current()));
|
||||
IdentityManager im = IdentityManager();
|
||||
NvPairingManager pm(hostname, im);
|
||||
|
||||
QString pin = pm.generatePinString();
|
||||
|
||||
Reference in New Issue
Block a user