Minor fixes, formatting, static const

This commit is contained in:
Klaus Basan
2017-10-24 12:21:32 +02:00
parent e25a3bdc93
commit 5612033924
8 changed files with 122 additions and 123 deletions

View File

@@ -90,7 +90,7 @@ namespace BlackGui
}
// write to disk
bool s = sGui->getWebDataServices()->writeDbDataToDisk(CDirectoryUtils::staticDbFilesDirectory());
const bool s = sGui->getWebDataServices()->writeDbDataToDisk(CDirectoryUtils::staticDbFilesDirectory());
if (s)
{
CLogMessage(this).info("Written DB data");
@@ -104,8 +104,8 @@ namespace BlackGui
bool CDataInfoAreaComponent::readDbDataFromResourceDir()
{
bool s = sGui &&
sGui->getWebDataServices()->readDbDataFromDisk(CDirectoryUtils::staticDbFilesDirectory(), true);
const bool s = sGui &&
sGui->getWebDataServices()->readDbDataFromDisk(CDirectoryUtils::staticDbFilesDirectory(), true);
// info
if (s)

View File

@@ -24,7 +24,6 @@ class QPixmap;
class QWidget;
namespace Ui { class CDataInfoAreaComponent; }
namespace BlackGui
{
namespace Components
@@ -62,7 +61,7 @@ namespace BlackGui
explicit CDataInfoAreaComponent(QWidget *parent = nullptr);
//! Destructor
~CDataInfoAreaComponent();
virtual ~CDataInfoAreaComponent();
//! DB model component
CDbModelComponent *getModelComponent() const;
@@ -105,7 +104,6 @@ namespace BlackGui
private:
QScopedPointer <Ui::CDataInfoAreaComponent> ui;
};
} // ns
} // ns

View File

@@ -17,6 +17,7 @@
using namespace BlackMisc;
using namespace BlackMisc::Simulation::Settings;
using namespace BlackGui::Settings;
using namespace BlackCore::Db;
namespace BlackGui
{
@@ -52,7 +53,7 @@ namespace BlackGui
return ok ? secs : -1;
}
void CSettingsModelComponent::setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater)
void CSettingsModelComponent::setBackgroundUpdater(const CBackgroundDataUpdater *updater)
{
m_updater = updater;
}
@@ -86,7 +87,7 @@ namespace BlackGui
const bool updater =
on &&
sApp && !sApp->isShuttingDown() &&
this->m_updater && this->m_updater->isEnabled();
m_updater && m_updater->isEnabled();
ui->comp_Led->setOn(updater);
// avoid unnecessary roundtrips