mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T103, Unified naming of directory functions
* some started with get/some not (removed get, get is normally used for our getters) * some used swift, getSwiftXZY dir (removed swift) * used full word "directory", not dir/directory mixed
This commit is contained in:
committed by
Mathew Sutcliffe
parent
debd9c802f
commit
a9198e4f13
@@ -43,8 +43,8 @@ namespace BlackGui
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->cb_OtherVersions->clear();
|
||||
ui->cb_OtherVersions->addItems(CDirectoryUtils::swiftApplicationDataDirectoryList(true, true));
|
||||
m_otherVersionDirs = CDirectoryUtils::swiftApplicationDataDirectoryList(true, false); // not beautified
|
||||
ui->cb_OtherVersions->addItems(CDirectoryUtils::applicationDataDirectoryList(true, true));
|
||||
m_otherVersionDirs = CDirectoryUtils::applicationDataDirectoryList(true, false); // not beautified
|
||||
|
||||
connect(ui->rb_Cache, &QRadioButton::toggled, [ = ](bool) { this->initCurrentDirectories(true); });
|
||||
connect(ui->cb_OtherVersions, &QComboBox::currentTextChanged, [ = ] { this->initCurrentDirectories(true); });
|
||||
@@ -277,7 +277,7 @@ namespace BlackGui
|
||||
QString CCopyConfigurationComponent::getOtherVersionsSelectedDirectory() const
|
||||
{
|
||||
if (ui->cb_OtherVersions->count() < 1) { return ""; }
|
||||
const QFileInfoList dirs(CDirectoryUtils::swiftApplicationDataDirectories());
|
||||
const QFileInfoList dirs(CDirectoryUtils::applicationDataDirectories());
|
||||
if (dirs.isEmpty()) { return ""; }
|
||||
const QString otherVersionDir = m_otherVersionDirs.at(ui->cb_OtherVersions->currentIndex());
|
||||
QString dir;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
// write to disk
|
||||
bool s = sGui->getWebDataServices()->writeDbDataToDisk(CDirectoryUtils::getSwiftStaticDbFilesDir());
|
||||
bool s = sGui->getWebDataServices()->writeDbDataToDisk(CDirectoryUtils::staticDbFilesDirectory());
|
||||
if (s)
|
||||
{
|
||||
CLogMessage(this).info("Written DB data");
|
||||
@@ -105,12 +105,12 @@ namespace BlackGui
|
||||
bool CDataInfoAreaComponent::readDbDataFromResourceDir()
|
||||
{
|
||||
bool s = sGui &&
|
||||
sGui->getWebDataServices()->readDbDataFromDisk(CDirectoryUtils::getSwiftStaticDbFilesDir(), true);
|
||||
sGui->getWebDataServices()->readDbDataFromDisk(CDirectoryUtils::staticDbFilesDirectory(), true);
|
||||
|
||||
// info
|
||||
if (s)
|
||||
{
|
||||
CLogMessage(this).info("Read DB data from directory: %1") << CDirectoryUtils::getSwiftStaticDbFilesDir();
|
||||
CLogMessage(this).info("Read DB data from directory: %1") << CDirectoryUtils::staticDbFilesDirectory();
|
||||
ui->comp_DbAircraftIcao->showLoadIndicator();
|
||||
ui->comp_DbAirlineIcao->showLoadIndicator();
|
||||
ui->comp_DbCountries->showLoadIndicator();
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace BlackGui
|
||||
QString CFlightPlanComponent::getDefaultFilename(bool load)
|
||||
{
|
||||
// some logic to find a useful default name
|
||||
QString dir = CDirectoryUtils::getDocumentationDirectory();
|
||||
QString dir = CDirectoryUtils::documentationDirectory();
|
||||
|
||||
if (load)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user