mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 17:30:12 +08:00
Used new cache features ( #494 ) with GUI
This commit is contained in:
committed by
Mathew Sutcliffe
parent
71c219842f
commit
99802cb98b
@@ -22,7 +22,7 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QProcess>
|
||||
#include <QFontDialog>
|
||||
|
||||
#include <QDir>
|
||||
|
||||
using namespace BlackGui;
|
||||
using namespace BlackCore;
|
||||
@@ -78,19 +78,45 @@ void SwiftGuiStd::ps_onMenuClicked()
|
||||
CLogMessage(this).info("Closing");
|
||||
this->close();
|
||||
}
|
||||
else if (sender == this->ui->menu_FileSettingsDirectory)
|
||||
else if (sender == this->ui->menu_SettingsDirectory)
|
||||
{
|
||||
QString path(QDir::toNativeSeparators(CSettingsCache::persistentStore()));
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
if (QDir(path).exists())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
}
|
||||
}
|
||||
else if (sender == this->ui->menu_FileCacheDirectory)
|
||||
else if (sender == this->ui->menu_SettingsReset)
|
||||
{
|
||||
CSettingsCache::instance()->clearAllValues();
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole("Cleared all settings!");
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_SettingsFiles)
|
||||
{
|
||||
QStringList cachedFiles(CSettingsCache::instance()->enumerateStore());
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(cachedFiles.join("\n"));
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_CacheDirectory)
|
||||
{
|
||||
QString path(QDir::toNativeSeparators(CDataCache::persistentStore()));
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
if (QDir(path).exists())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
}
|
||||
}
|
||||
else if (sender == this->ui->menu_FileResetSettings)
|
||||
else if (sender == this->ui->menu_CacheFiles)
|
||||
{
|
||||
//! \todo
|
||||
QStringList cachedFiles(CDataCache::instance()->enumerateStore());
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(cachedFiles.join("\n"));
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_CacheReset)
|
||||
{
|
||||
CDataCache::instance()->clearAllValues();
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole("Cleared all cached values!");
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_Internals)
|
||||
{
|
||||
@@ -120,16 +146,6 @@ void SwiftGuiStd::ps_onMenuClicked()
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(project);
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_InternalsDisplayCachedFiles)
|
||||
{
|
||||
//! \todo
|
||||
this->displayConsole();
|
||||
}
|
||||
else if (sender == this->ui->menu_InternalsDeleteCachedFiles)
|
||||
{
|
||||
//! \todo
|
||||
this->displayConsole();
|
||||
}
|
||||
}
|
||||
|
||||
void SwiftGuiStd::initDynamicMenus()
|
||||
|
||||
Reference in New Issue
Block a user