[libcalamares] Avoid static destructor
- The static destructor issues a warning on exit: QBasicTimer::start: QBasicTimer can only be used with threads started with QThread so instead, heap-allocate the model. This leaks memory, but it's a singleton *and* we're exiting anyway.
This commit is contained in:
parent
a263381996
commit
69dabcae32
@ -125,8 +125,8 @@ LabelModel::find( const QString& countryCode ) const
|
||||
|
||||
LabelModel* availableTranslations()
|
||||
{
|
||||
static LabelModel model( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') );
|
||||
return &model;
|
||||
static LabelModel* model = new LabelModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') );
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user