I just figured out that our app name is Bitcoin-ABC, but we try to copy QSettings from app Bitcoin or Bitcoin-QT, but actually those apps may absent in our system:
static const QString legacyAppName("Bitcoin-Qt"), legacyOrg("Bitcoin");
QSettings legacy(legacyOrg, legacyAppName), abc;
const QStringList legacyKeys(legacy.allKeys());
// We only migrate settings if we have Core settings but no Bitcoin-ABC
// settings
if (!legacyKeys.isEmpty() && abc.allKeys().isEmpty()) {
for (const QString &key : legacyKeys) {
// now, copy settings over
abc.setValue(key, legacy.value(key));
}
}
so this code is seeking app Bitcoin or Bitcoin-QT and copy settings. And if there is no such apps this code produces warning:
QVariant::load: unknown user type with name BitcoinUnits::Unit.
So, first we need to check if apps Bitcoin or Bitcoin-Qt actually exist. Is it possible to check existence of apps in QT5?
I think this hack of copying settings from other apps is too self-confident action from Bitcoin-ABC developers, but if they want such, need to help them to check if such apps really exist. This hack might be related to old name of Bitcoin-ABC app, so in some commit number they changed app name and now try to copy settings from their app with old name. Please, is qt5 support such functionality of copying settings from other apps and how to check existence of apps Bitcoin, Bitcoin-Qt in this case?