[libcalamares] Make the zoneTab region list static
- there's only one zone.tab, it won't change during a run, load it only once (this allows for a single global list).
This commit is contained in:
parent
4089a01cb1
commit
3f57b929ee
@ -130,10 +130,11 @@ TZRegion::~TZRegion()
|
|||||||
qDeleteAll( m_zones );
|
qDeleteAll( m_zones );
|
||||||
}
|
}
|
||||||
|
|
||||||
CStringPairList
|
const CStringPairList&
|
||||||
TZRegion::fromZoneTab()
|
TZRegion::fromZoneTab()
|
||||||
{
|
{
|
||||||
return TZRegion::fromFile( TZ_DATA_FILE );
|
static CStringPairList zoneTab = TZRegion::fromFile( TZ_DATA_FILE );
|
||||||
|
return zoneTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
CStringPairList
|
CStringPairList
|
||||||
|
@ -103,7 +103,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static CStringPairList fromFile( const char* fileName );
|
static CStringPairList fromFile( const char* fileName );
|
||||||
/// @brief Calls fromFile with the standard zone.tab name
|
/// @brief Calls fromFile with the standard zone.tab name
|
||||||
static CStringPairList fromZoneTab();
|
static const CStringPairList& fromZoneTab();
|
||||||
|
|
||||||
const CStringPairList& zones() const { return m_zones; }
|
const CStringPairList& zones() const { return m_zones; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user