mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +08:00
Ref T199, do not use hardcoded names of file names
This commit is contained in:
@@ -165,12 +165,21 @@ namespace BlackGui
|
|||||||
if (ui->rb_Cache->isChecked())
|
if (ui->rb_Cache->isChecked())
|
||||||
{
|
{
|
||||||
// only copy setup and model caches
|
// only copy setup and model caches
|
||||||
static const QStringList cacheFilter(
|
static const QStringList cacheFilter = [ = ]
|
||||||
{
|
{
|
||||||
"modelset*.json",
|
QStringList cf({
|
||||||
"modelcache*.json",
|
m_modelSetCurrentSimulator.getFilename(),
|
||||||
"*setup.json"
|
m_modelsCurrentSimulator.getFilename(),
|
||||||
|
m_launcherSetup.getFilename(),
|
||||||
|
m_vatsimSetup.getFilename(),
|
||||||
|
m_lastVatsimServer.getFilename(),
|
||||||
|
m_lastServer.getFilename(),
|
||||||
|
m_lastAircraftModel.getFilename()
|
||||||
});
|
});
|
||||||
|
cf.append(m_modelSetCaches.getAllFilenames());
|
||||||
|
cf.append(m_modelCaches.getAllFilenames());
|
||||||
|
return CFileUtils::getFileNamesOnly(cf);
|
||||||
|
}();
|
||||||
if (!m_withBootstrapFile) { return cacheFilter; }
|
if (!m_withBootstrapFile) { return cacheFilter; }
|
||||||
|
|
||||||
static const QStringList cacheFilterBs = [ = ]
|
static const QStringList cacheFilterBs = [ = ]
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#include "blackcore/data/launchersetup.h"
|
#include "blackcore/data/launchersetup.h"
|
||||||
#include "blackcore/data/vatsimsetup.h"
|
#include "blackcore/data/vatsimsetup.h"
|
||||||
#include "blackmisc/simulation/data/modelcaches.h"
|
#include "blackmisc/simulation/data/modelcaches.h"
|
||||||
|
#include "blackmisc/simulation/data/lastmodel.h"
|
||||||
|
#include "blackmisc/network/data/lastserver.h"
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QWizardPage>
|
#include <QWizardPage>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -126,10 +128,13 @@ namespace BlackGui
|
|||||||
// caches will be initialized so they can be overriden
|
// caches will be initialized so they can be overriden
|
||||||
// those caches do not harm if they exists default initialized
|
// those caches do not harm if they exists default initialized
|
||||||
//! \fixme this is a workaround, as it creates files on disk even if those are not copied. It was much nicer if the cache would init themself if the file appears
|
//! \fixme this is a workaround, as it creates files on disk even if those are not copied. It was much nicer if the cache would init themself if the file appears
|
||||||
|
BlackMisc::CData<BlackMisc::Network::Data::TLastServer> m_lastServer { this }; //!< recently used server (VATSIM, other)
|
||||||
BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetLastSelection> m_modelSetCurrentSimulator { this };
|
BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetLastSelection> m_modelSetCurrentSimulator { this };
|
||||||
BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheLastSelection> m_modelsCurrentSimulator { this };
|
BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheLastSelection> m_modelsCurrentSimulator { this };
|
||||||
|
BlackMisc::CData<BlackMisc::Simulation::Data::TLastModel> m_lastAircraftModel { this }; //!< recently used aircraft model
|
||||||
BlackMisc::CData<BlackCore::Data::TLauncherSetup> m_launcherSetup { this };
|
BlackMisc::CData<BlackCore::Data::TLauncherSetup> m_launcherSetup { this };
|
||||||
BlackMisc::CData<BlackCore::Data::TVatsimSetup> m_vatsimSetup { this };
|
BlackMisc::CData<BlackCore::Data::TVatsimSetup> m_vatsimSetup { this };
|
||||||
|
BlackMisc::CData<BlackCore::Data::TVatsimLastServer> m_lastVatsimServer { this }; //!< recently used VATSIM server
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user