replace CoreInterface syntool calls with DataDirectory calls

This commit is contained in:
walker0643 2018-03-29 16:38:50 -04:00
parent 451bd72b30
commit 6e5b340bcc
7 changed files with 6 additions and 14 deletions

View File

@ -17,7 +17,7 @@
#include "Fingerprint.h"
#include "CoreInterface.h"
#include "common/DataDirectories.h"
#include <QDir>
#include <QTextStream>
@ -125,8 +125,7 @@ void Fingerprint::persistDirectory()
QString Fingerprint::directoryPath()
{
CoreInterface coreInterface;
QString profileDir = coreInterface.getProfileDir();
auto profileDir = QString::fromStdString(DataDirectories::profile());
return QString("%1/%2")
.arg(profileDir)

View File

@ -31,6 +31,7 @@
#include "ProcessorArch.h"
#include "SslCertificate.h"
#include "ShutdownCh.h"
#include "common/DataDirectories.h"
#include <QtCore>
#include <QtGui>
@ -1254,8 +1255,7 @@ void MainWindow::bonjourInstallFinished()
QString MainWindow::getProfileRootForArg()
{
CoreInterface coreInterface;
QString dir = coreInterface.getProfileDir();
auto dir = QString::fromStdString(DataDirectories::profile());
// HACK: strip our app name since we're returning the root dir.
#if defined(Q_OS_WIN)

View File

@ -18,7 +18,6 @@
#include "SettingsDialog.h"
#include "CoreInterface.h"
#include "BarrierLocale.h"
#include "QBarrierApplication.h"
#include "QUtility.h"

View File

@ -23,7 +23,6 @@
#include <QDialog>
#include "ui_SettingsDialogBase.h"
#include "BarrierLocale.h"
#include "CoreInterface.h"
class AppConfig;
@ -43,7 +42,6 @@ class SettingsDialog : public QDialog, public Ui::SettingsDialogBase
private:
AppConfig& m_appConfig;
BarrierLocale m_Locale;
CoreInterface m_CoreInterface;
private slots:
void on_m_pComboLanguage_currentIndexChanged(int index);

View File

@ -17,7 +17,6 @@
#include "SetupWizard.h"
#include "MainWindow.h"
#include "WebClient.h"
#include "QBarrierApplication.h"
#include "QUtility.h"

View File

@ -16,8 +16,8 @@
*/
#include "SslCertificate.h"
#include "Fingerprint.h"
#include "common/DataDirectories.h"
#include <QProcess>
#include <QDir>
@ -37,7 +37,7 @@ static const char kConfigFile[] = "barrier.conf";
SslCertificate::SslCertificate(QObject *parent) :
QObject(parent)
{
m_ProfileDir = m_CoreInterface.getProfileDir();
m_ProfileDir = QString::fromStdString(DataDirectories::profile());
if (m_ProfileDir.isEmpty()) {
emit error(tr("Failed to get profile directory."));
}

View File

@ -17,8 +17,6 @@
#pragma once
#include "CoreInterface.h"
#include <QObject>
class SslCertificate : public QObject
@ -43,5 +41,4 @@ private:
private:
QString m_ProfileDir;
QString m_ToolOutput;
CoreInterface m_CoreInterface;
};