From ad79ba907d76f774cd7711feb42b2eb6f9b76caf Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 17 Feb 2025 14:14:26 -0500 Subject: [PATCH] refactor: Mainwindow localFingerPrintDb => localFingerprintDb --- src/apps/deskflow-gui/MainWindow.cpp | 12 ++++++------ src/apps/deskflow-gui/MainWindow.h | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/apps/deskflow-gui/MainWindow.cpp b/src/apps/deskflow-gui/MainWindow.cpp index 7e2717d29..efc2a59c4 100644 --- a/src/apps/deskflow-gui/MainWindow.cpp +++ b/src/apps/deskflow-gui/MainWindow.cpp @@ -156,13 +156,13 @@ MainWindow::MainWindow(ConfigScopes &configScopes, AppConfig &appConfig) // Force generation of SHA256 for the localhost if (m_appConfig.tlsEnabled()) { - if (!QFile::exists(localFingerPrintDb())) { + if (!QFile::exists(localFingerprintDb())) { regenerateLocalFingerprints(); return; } deskflow::FingerprintDatabase db; - db.read(localFingerPrintDb().toStdString()); + db.read(localFingerprintDb().toStdString()); if (db.fingerprints().size() != kTlsDbSize) { regenerateLocalFingerprints(); } @@ -482,14 +482,14 @@ void MainWindow::updateSize() void MainWindow::showMyFingerprint() { - if (!QFile::exists(localFingerPrintDb())) { + if (!QFile::exists(localFingerprintDb())) { if (regenerateLocalFingerprints()) showMyFingerprint(); return; } deskflow::FingerprintDatabase db; - db.read(localFingerPrintDb().toStdString()); + db.read(localFingerprintDb().toStdString()); if (db.fingerprints().size() != kTlsDbSize) { if (regenerateLocalFingerprints()) showMyFingerprint(); @@ -950,7 +950,7 @@ QString MainWindow::getIPAddresses() const void MainWindow::updateLocalFingerprint() { - ui->lblMyFingerprint->setVisible(m_appConfig.tlsEnabled() && QFile::exists(localFingerPrintDb())); + ui->lblMyFingerprint->setVisible(m_appConfig.tlsEnabled() && QFile::exists(localFingerprintDb())); } void MainWindow::autoAddScreen(const QString name) @@ -1071,7 +1071,7 @@ QString MainWindow::getTlsPath() return QStringLiteral("%1/%2").arg(coreTool.getProfileDir(), kSslDir); } -QString MainWindow::localFingerPrintDb() +QString MainWindow::localFingerprintDb() { return QStringLiteral("%1/%2").arg(getTlsPath(), kFingerprintLocalFilename); } diff --git a/src/apps/deskflow-gui/MainWindow.h b/src/apps/deskflow-gui/MainWindow.h index b54b02845..b4d7b2c86 100644 --- a/src/apps/deskflow-gui/MainWindow.h +++ b/src/apps/deskflow-gui/MainWindow.h @@ -166,7 +166,12 @@ private: void showAndActivate(); QString getTlsPath(); - QString localFingerPrintDb(); + + /** + * @brief localFingerprintDb + * @return The path to the local fingerprint file + */ + QString localFingerprintDb(); /** * @brief trustedFingerprintDb get the fingerprintDb for the trusted clients or trusted servers.