VirtualBox

Changeset 23389 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 28, 2009 3:24:09 PM (15 years ago)
Author:
vboxsync
Message:

Fe/Qt: Use an .ini file in <VBox-InstDir>\custom\custom.ini instead of other global configuration spaces (like registry).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r23368 r23389  
    761761    if (aForce)
    762762        return true;
    763     return !VBoxGlobal::brandingGetKey("VerSuffix").isEmpty();
    764 }
    765 
    766 /**
    767   * Gets a value from the global (platform-specific) application settings
    768   * (e.g. on Windows using the registry) for branding stuff
     763
     764    if (mBrandingConfig.isEmpty())
     765    {
     766        mBrandingConfig = QDir(QApplication::applicationDirPath()).absolutePath();
     767        mBrandingConfig += "/custom/custom.ini";
     768    }
     769    return QFile::exists (mBrandingConfig);
     770}
     771
     772/**
     773  * Gets a value from the custom .ini file
    769774  */
    770775QString VBoxGlobal::brandingGetKey (QString aKey)
    771776{
    772     QSettings settings("Sun", "VirtualBox");
    773     return settings.value(QString("Branding/%1").arg(aKey)).toString();
     777    QSettings settings(mBrandingConfig, QSettings::IniFormat);
     778    return settings.value(QString("%1").arg(aKey)).toString();
    774779}
    775780
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette