Logo Search packages:      
Sourcecode: q4wine version File versions  Download package

QVariant corelib::getSetting ( const QString  group,
const QString  key,
const bool  checkExist = TRUE,
const QVariant  defaultVal = QVariant() 
) const

This function get application settings.

group Settings group.
key Settings key.
defaultVal Default returned value.
checkExist If true - then we need to check exists file or dir by value or not.
Return an a key value.

Definition at line 217 of file q4wine-lib.cpp.

References showError().

Referenced by getMountedImages(), getWineDlls(), mountImage(), and umountImage().

      QVariant retVal;
      QSettings settings(APP_SHORT_NAME, "default");

      retVal = settings.value(key, defaultVal);
      if (checkExist==true)
            if (!QFileInfo(retVal.toString()).exists()){
            this->showError(QObject::tr("<p>Error while loading application settings by key: '%1'. File or path not exists: \"%2\"</p><p>Please, go to %3 options dialog and set it.</p>").arg(key).arg(retVal.toString()).arg(APP_SHORT_NAME));
            retVal = QVariant();
      return retVal;

Generated by  Doxygen 1.6.0   Back to index