[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:
Adriaan de Groot 2019-05-31 12:38:34 +02:00
parent a263381996
commit 69dabcae32

View File

@ -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;
} }
} }