[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.
main
Adriaan de Groot 6 years ago
parent a263381996
commit 69dabcae32

@ -125,8 +125,8 @@ LabelModel::find( const QString& countryCode ) const
LabelModel* availableTranslations() LabelModel* availableTranslations()
{ {
static LabelModel model( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') ); static LabelModel* model = new LabelModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') );
return &model; return model;
} }
} }

Loading…
Cancel
Save