您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetConfigPath函数代码示例

51自学网 2021-06-01 21:05:28
  C++
这篇教程C++ GetConfigPath函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetConfigPath函数的典型用法代码示例。如果您正苦于以下问题:C++ GetConfigPath函数的具体用法?C++ GetConfigPath怎么用?C++ GetConfigPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetConfigPath函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TryDetectNonSysInPlaceEncSettings

// Returns the number of partitions where non-system in-place encryption is progress or had been in progress// but was interrupted. In addition, via the passed pointer, returns the last selected wipe algorithm ID.// nee int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm)int TryDetectNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm){	char *fileBuf = NULL;	char *fileBuf2 = NULL;	DWORD size, size2;	int count;	*wipeAlgorithm = TC_WIPE_NONE;	if (!FileExists (GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC)))		return 0;	if ((fileBuf = LoadFile (GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC), &size)) == NULL)		return 0;	if (FileExists (GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE)))	{		if ((fileBuf2 = LoadFile (GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE), &size2)) != NULL)			*wipeAlgorithm = (WipeAlgorithmId) atoi (fileBuf2);	}	count = atoi (fileBuf);	if (fileBuf != NULL)		TCfree (fileBuf);	if (fileBuf2 != NULL)		TCfree (fileBuf2);	return (count);}
开发者ID:nicnilov,项目名称:truecrypt-api,代码行数:34,


示例2: GetOptionsDB

void ServerConnectWnd::OkClicked(){    // record selected galaxy setup options as new defaults    GetOptionsDB().Set("multiplayersetup.player-name",  m_player_name_edit->Text());    GetOptionsDB().Set("multiplayersetup.host-address", m_IP_address_edit->Text());    // Save the changes:    {        boost::filesystem::ofstream ofs(GetConfigPath());        if (ofs) {            GetOptionsDB().GetXML().WriteDoc(ofs);        } else {            std::cerr << UserString("UNABLE_TO_WRITE_CONFIG_XML") << std::endl;            std::cerr << GetConfigPath().string() << std::endl;            Logger().errorStream() << UserString("UNABLE_TO_WRITE_CONFIG_XML");            Logger().errorStream() << GetConfigPath().string();        }    }    m_result.first = *m_player_name_edit;    if (m_host_or_join_radio_group->CheckedButton() == 0) {        m_result.second = "HOST GAME SELECTED";    } else {        m_result.second = *m_IP_address_edit;        if (m_result.second == "") {            m_result.second =                boost::polymorphic_downcast<GG::TextControl*>(                    (***m_servers_lb->Selections().begin())[0])->Text();        }    }    CUIWnd::CloseClicked();}
开发者ID:fatman2021,项目名称:FreeOrion,代码行数:32,


示例3: path

QString PathManager::GetDataBasePath(){	QString path("");	if (!GetConfigPath().isEmpty()){		path = GetConfigPath() + "/database.db";	}	return path;}
开发者ID:cnandroidlib,项目名称:AutopackingAndroid,代码行数:8,


示例4: GetEditorPrefs

void wxSTEditorOptions::LoadConfig(wxConfigBase &config){    if (HasConfigOption(STE_CONFIG_PREFS) && GetEditorPrefs().Ok())        GetEditorPrefs().LoadConfig(config, GetConfigPath(STE_OPTION_CFGPATH_PREFS));    if (HasConfigOption(STE_CONFIG_STYLES) && GetEditorStyles().Ok())        GetEditorStyles().LoadConfig(config, GetConfigPath(STE_OPTION_CFGPATH_STYLES));    if (HasConfigOption(STE_CONFIG_LANGS) && GetEditorLangs().Ok())        GetEditorLangs().LoadConfig(config, GetConfigPath(STE_OPTION_CFGPATH_LANGS));}
开发者ID:cubemoon,项目名称:game-editor,代码行数:9,


示例5: GuideAlgorithm

GuideAlgorithmLowpass::GuideAlgorithmLowpass(Mount *pMount, GuideAxis axis)    : GuideAlgorithm(pMount, axis){    double minMove     = pConfig->Profile.GetDouble(GetConfigPath() + "/minMove", DefaultMinMove);    SetMinMove(minMove);    double slopeWeight = pConfig->Profile.GetDouble(GetConfigPath() + "/SlopeWeight", DefaultSlopeWeight);    SetSlopeWeight(slopeWeight);    reset();}
开发者ID:hbaidu,项目名称:open-phd-guiding,代码行数:11,


示例6: GetConfigPath

/** * CSC_ParseDomainList * * @return     CDomainList* * @exception    - * @see         */CDomainList *CSC_ParseDomainList(BOOL fullDownload){    CDomainList *retval = new CDomainList;    CCsvParse parser;    CString filename = GetConfigPath() + (fullDownload?pszDomainFileName:pszOnlineDomainName);    HRESULT hr = parser.Open(filename);    if (FAILED(hr)) {        FC_DEBUGPRINT1(_T("CSVPARS> file not found: %s/n"), filename);        TrcPrint(TRC_ERROR, _T("CSVPARS> file not found: %s/n"), filename);        return retval;    }    BOOL syntax = TRUE;    for (;;) {      CSC_DOMAINENTRY domain;      CString strType, strFile;      if (!parser.IsEndOfLine()) {        syntax = FALSE;        break;      }      BOOL ok = parser.ParseNextField(strType);      if (!ok)          break;      strType.MakeLower();      if (strType == _T("code"))          domain.type = CSC_DOMAINTYPE_CODE;      else if (strType == _T("init"))          domain.type = CSC_DOMAINTYPE_INITIAL;      else if (strType == _T("config"))          domain.type = CSC_DOMAINTYPE_CONFIG;      else if (strType == _T("custom"))          domain.type = CSC_DOMAINTYPE_CUSTOM;      else if (strType == _T("debug"))          domain.type = CSC_DOMAINTYPE_DEBUG;      else          domain.type = CSC_DOMAINTYPE_UNKNOWN;      syntax = parser.ParseNextField(strFile);      if (!syntax)          break;      domain.file = GetConfigPath() + strFile;      retval->AddTail(domain);      while (!parser.IsEndOfLine() && parser.ParseNextField(strFile))          ;    }    if (!syntax) {        FC_DEBUGPRINT3(_T("CSVPARS> syntax error in %s(%d:%d)/n"), filename, parser.GetLineNo(), parser.GetLinePos());        TrcPrint(TRC_ERROR, _T("CSVPARS> syntax error in %s(%d:%d)/n"), filename, parser.GetLineNo(), parser.GetLinePos());    }    return retval;}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:58,


示例7: GuideAlgorithm

GuideAlgorithmResistSwitch::GuideAlgorithmResistSwitch(Mount *pMount, GuideAxis axis)    : GuideAlgorithm(pMount, axis){    double minMove  = pConfig->Profile.GetDouble(GetConfigPath() + "/minMove", DefaultMinMove);    SetMinMove(minMove);    double aggr = pConfig->Profile.GetDouble(GetConfigPath() + "/aggression", DefaultAggression);    SetAggression(aggr);    bool enable = pConfig->Profile.GetBoolean(GetConfigPath() + "/fastSwitch", true);    SetFastSwitchEnabled(enable);    reset();}
开发者ID:AndresPozo,项目名称:phd2,代码行数:14,


示例8: modList

Instance::Instance(const wxString &rootDir)    : modList(this), m_running(false){    if (!rootDir.EndsWith("/"))        this->rootDir = wxFileName::DirName(rootDir + "/");    else        this->rootDir = wxFileName::DirName(rootDir);    config = new wxFileConfig(wxEmptyString, wxEmptyString, GetConfigPath().GetFullPath(), wxEmptyString,                              wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH);    evtHandler = NULL;    MkDirs();    // initialize empty mod lists - they are filled later and only if requested (see apropriate Get* methods)    modList.SetDir(GetInstModsDir().GetFullPath());    mlModList.SetDir(GetMLModsDir().GetFullPath());    coreModList.SetDir(GetCoreModsDir().GetFullPath());    worldList.SetDir(GetSavesDir().GetFullPath());    tpList.SetDir(GetTexturePacksDir().GetFullPath());    modloader_list_inited = false;    coremod_list_inited = false;    jar_list_inited = false;    world_list_initialized = false;    tp_list_initialized = false;    parentModel = nullptr;    UpdateVersion();}
开发者ID:Glought,项目名称:MultiMC4,代码行数:26,


示例9: ERROR_INFO

bool GuideAlgorithmResistSwitch::SetMinMove(double minMove){    bool bError = false;    try    {        if (minMove <= 0.0)        {            throw ERROR_INFO("invalid minMove");        }        m_minMove = minMove;        m_currentSide = 0;    }    catch (wxString Msg)    {        POSSIBLY_UNUSED(Msg);        bError = true;        m_minMove = DefaultMinMove;    }    pConfig->Profile.SetDouble(GetConfigPath() + "/minMove", m_minMove);    Debug.Write(wxString::Format("GuideAlgorithmResistSwitch::SetMinMove() returns %d, m_minMove=%.2f/n", bError, m_minMove));    return bError;}
开发者ID:AndresPozo,项目名称:phd2,代码行数:27,


示例10: M_SaveDefaults

void STACK_ARGS M_SaveDefaults (void){	FILE *f;	if (!DefaultsLoaded)		return;	std::string configfile = GetConfigPath();	// Make sure the user hasn't changed configver	configver.Set(CONFIGVERSIONSTR);	if ( (f = fopen (configfile.c_str(), "w")) )	{		fprintf (f, "// Generated by Odamex " DOTVERSIONSTR " - don't hurt anything/n");		// Archive all cvars marked as CVAR_ARCHIVE		cvar_t::C_ArchiveCVars (f);		// Archive all active key bindings		//C_ArchiveBindings (f);		// Archive all aliases		DConsoleAlias::C_ArchiveAliases (f);		// Archive master list		SV_ArchiveMasters (f);		fclose (f);	}}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:31,


示例11: config_get_string

void OBSBasic::on_actionRemoveSceneCollection_triggered(){	std::string newName;	std::string newPath;	std::string oldFile = config_get_string(App()->GlobalConfig(),			"Basic", "SceneCollectionFile");	std::string oldName = config_get_string(App()->GlobalConfig(),			"Basic", "SceneCollection");	auto cb = [&](const char *name, const char *filePath)	{		if (strcmp(oldName.c_str(), name) != 0) {			newName = name;			newPath = filePath;			return false;		}		return true;	};	EnumSceneCollections(cb);	/* this should never be true due to menu item being grayed out */	if (newPath.empty())		return;	QString text = QTStr("ConfirmRemove.Text");	text.replace("$1", QT_UTF8(oldName.c_str()));	QMessageBox::StandardButton button = QMessageBox::question(this,			QTStr("ConfirmRemove.Title"), text);	if (button == QMessageBox::No)		return;	char path[512];	int ret = GetConfigPath(path, 512, "obs-studio/basic/scenes/");	if (ret <= 0) {		blog(LOG_WARNING, "Failed to get scene collection config path");		return;	}	oldFile.insert(0, path);	oldFile += ".json";	os_unlink(oldFile.c_str());	Load(newPath.c_str());	RefreshSceneCollections();	const char *newFile = config_get_string(App()->GlobalConfig(),			"Basic", "SceneCollectionFile");	blog(LOG_INFO, "Removed scene collection '%s' (%s.json), "			"switched to '%s' (%s.json)",			oldName.c_str(), oldFile.c_str(),			newName.c_str(), newFile);	blog(LOG_INFO, "------------------------------------------------");	UpdateTitleBar();}
开发者ID:chewcode,项目名称:obs-studio,代码行数:60,


示例12: ERROR_INFO

bool GuideAlgorithmHysteresis::SetHysteresis(double hysteresis){    bool bError = false;    try    {        if (hysteresis < 0.0 || hysteresis > MaxHysteresis)        {            throw ERROR_INFO("invalid hysteresis");        }        m_hysteresis = hysteresis;    }    catch (wxString Msg)    {        POSSIBLY_UNUSED(Msg);        bError = true;        m_hysteresis = wxMin(wxMax(hysteresis, 0.0), MaxHysteresis);    }    pConfig->Profile.SetDouble(GetConfigPath() + "/hysteresis", m_hysteresis);    return bError;}
开发者ID:hbaidu,项目名称:open-phd-guiding,代码行数:25,


示例13: CSC_GetFileType

BOOL CSC_GetFileType(const CString& strFileName, CString& strFileType){    CCsvParse parser;	int found = 0;	CString strFile;	CString filename = GetConfigPath() + pszDomainFileName;	HRESULT hr = parser.Open(filename);	if (FAILED(hr)) {		FC_DEBUGPRINT1(_T("CSVPARS> file not found: %s/n"), filename);		TrcPrint(TRC_ERROR, _T("CSVPARS> file not found: %s/n"), filename);	}	else {		while(1)		{			BOOL ok = parser.ParseNextField(strFileType);			if (!ok)				break;			ok = parser.ParseNextField(strFile);			if (!ok)				break;			if(strFileName.CompareNoCase(strFile) == 0)			{				found = 1;				break;			}		}		parser.Close();	}	if(!found) 		strFileType = _T("unknown");	return found;}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:35,


示例14: GetConfigPath

void CAppConfig::SaveFavorites(){	string fpath = GetConfigPath("favorites");	FILE* fo = fopen( fpath.c_str() , "w" );	if( fo )	{		// bool has_sensitive_data = false;		vector<CSite>::iterator it;		for( it = Favorites.begin(); it != Favorites.end(); ++it )		{			CSite& site = *it;			site.SaveToFile(fo);			fputc( '/n', fo );//			if( pSite->GetPasswd().length() )//				has_sensitive_data = true;		}		fclose(fo);//		if( ! has_sensitive_data )	// No data needs to be encrypted, cancel password.//			SetUserPasswd( wxEmptyString );		chmod(fpath.c_str(), 0600);	// Only the owner can access this file.	}}
开发者ID:lelou6666,项目名称:pcmanx-gtk2,代码行数:25,


示例15: M_SaveDefaults

void STACK_ARGS M_SaveDefaults (void){	FILE *f;	if (!DefaultsLoaded)		return;	std::string configfile = GetConfigPath();	// Make sure the user hasn't changed configver	configver.Set(CONFIGVERSIONSTR);	if ( (f = fopen (configfile.c_str(), "w")) )	{		fprintf (f, "// Generated by Odasrv " DOTVERSIONSTR "/n/n");		// Archive all cvars marked as CVAR_ARCHIVE		fprintf (f, "// --- Console variables ---/n/n");		cvar_t::C_ArchiveCVars (f);		// Archive all active key bindings		//fprintf (f, "// --- Key Bindings ---/n/n");		//C_ArchiveBindings (f);		// Archive all aliases		fprintf (f, "/n// --- Aliases ---/n/n");		DConsoleAlias::C_ArchiveAliases (f);		fclose (f);	}}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:31,


示例16: GetConfigPath

// Default technique to force a reset on algo parameters is simply to remove the keys from the Registry - a subsequent creation of the algo // class will then use default values for everything.  If this is too brute-force for a particular algo, the function can be overridden. // For algos that use a min-move parameter, a smart value will be applied based on image scalevoid GuideAlgorithm::ResetParams(){    wxString configPath = GetConfigPath();    pConfig->Profile.DeleteGroup(configPath);    if (GetMinMove() >= 0)        SetMinMove(SmartDefaultMinMove());}
开发者ID:AndresPozo,项目名称:phd2,代码行数:10,


示例17: settings

void PathManager::WriteLastPath(QString &key, QString &val){	QSettings settings(GetConfigPath() + QStringLiteral("/Config.ini"), QSettings::IniFormat);	settings.beginGroup("LastPathSetting");	settings.setValue(key, val);	settings.endGroup();}
开发者ID:cnandroidlib,项目名称:AutopackingAndroid,代码行数:7,


示例18: RefreshGlobal

	void RefreshGlobal()	{		DoDataExchange(true);		boost::filesystem::path configFile;		GetConfigPath(static_cast<const TCHAR *>(m_ConfigLabel), configFile);		CComPtr<IConfig> config = CreateIConfig(QUERYBUILDER_CFG, configFile);		CString accountServer = config->Get(GLOBAL_SERVER_ACCOUNT);		if (accountServer.IsEmpty())		{			GetDlgItem(IDC_EDIT_USER).EnableWindow(false);			GetDlgItem(IDC_EDIT_PASSWORD).EnableWindow(false);			m_User = _T("");			m_Password = _T("");		}		else		{			GetDlgItem(IDC_EDIT_USER).EnableWindow(true);			GetDlgItem(IDC_EDIT_PASSWORD).EnableWindow(true);			m_User = config->Get(GLOBAL_USER);			m_Password = config->Get(GLOBAL_PASSWORD);		}		if (m_configPrefs)			GetDlgItem(IDC_LOGIN_PREFS).EnableWindow(m_ConfigLabel.IsEmpty()==false);		DoDataExchange();		m_autoUpdateLink.ShowWindow(SW_HIDE);		if (!(bool)m_IniFile->Get(GLOBAL_DISABLEAUTOUPDATE))			clib::thread run(__FUNCTION__, boost::bind(&thread_CheckForUpdates, this, m_autoupdate));	}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:29,


示例19: CompareRadarAndCameraInArea

static void CompareRadarAndCameraInArea(const t_Point radar_point, const t_Point camera_point, const double area_width, const double area_length, int *p_max_similary) {	t_Point per_radar_point;	int per_similary;	int compare_count;	int compare_index;	int max_similary;	char config_path[255];	int basic_length;	ASSERT(NULL != p_max_similary);	max_similary = 0;	GetConfigPath(config_path, sizeof(config_path));	GetBasicLengthOfRadarCompareArea(config_path, &basic_length);	compare_count = (int)(area_length / basic_length * 1000);	for (compare_index = 0; compare_index < compare_count; compare_index++) {		per_radar_point.m_x = radar_point.m_x - area_length / 2 + (double)(basic_length) * compare_index / 1000;		per_radar_point.m_y = radar_point.m_y;		CompareRadarAndCameraInLine(per_radar_point, camera_point, area_width, &per_similary);		if (per_similary > max_similary)			max_similary = per_similary;		else			continue;	}	*p_max_similary = max_similary;}
开发者ID:SangYang,项目名称:ParseRadarData,代码行数:25,


示例20: RunRadarDataList

bool RunRadarDataList() {	const int c_PerComDataSize = 1024;	unsigned char com_data[1024];	int act_com_size;	bool ok_com;	char config_path[255];	int port_num;	int baud_rate;	GetConfigPath(config_path, sizeof(config_path));	GetPortNumOfSerialInterface(config_path, &port_num);	GetBaudRateOfSerialInterface(config_path, &baud_rate);	ok_com = OpenComport(port_num, baud_rate);	if (false == ok_com) {		LOG("OpenComport() error!/n");		return false;	}	else {		while (true) {			act_com_size = ReadComport(com_data, c_PerComDataSize);			if (0 == act_com_size)				continue;			else				AnalyseComData(com_data, act_com_size);		}		CloseComport();		return true;	}}
开发者ID:SangYang,项目名称:ParseRadarData,代码行数:29,


示例21: GetSpeed

bool GetSpeed(const t_PlateArea plate_area, double *p_speed, int *p_speed_confidence) {	t_CarArray car_array;	t_Car car;	double speed;	bool ok_get;	bool ok_find;	int car_similary;	char config_path[255];	int past_num;	ASSERT(NULL != p_speed && NULL != p_speed_confidence);	GetConfigPath(config_path, sizeof(config_path));	GetPastNumOfRadarDataList(config_path, &past_num);	ok_get = GetCarArrayFromList(past_num, &car_array);	if (false == ok_get) {		return false;	}	else {		ok_find = FindCar(plate_area, car_array, &car, &car_similary);		if (false == ok_find) {			return false;		}		else {			speed = car.m_speed.m_x;			*p_speed = speed;			*p_speed_confidence = car_similary;			return true;		}	}}
开发者ID:SangYang,项目名称:ParseRadarData,代码行数:30,


示例22: CSC_ReverseLookupTask

BOOL CSC_ReverseLookupTask(long taskid, CString &name){    CCsvParse parser;    CString filename = GetConfigPath() + pszTasksFileName;    HRESULT hr = parser.Open(filename);    if (FAILED(hr)) {        FC_DEBUGPRINT1(_T("CSVPARS> file not found: %s/n"), filename);        TrcPrint(TRC_ERROR, _T("CSVPARS> file not found: %s/n"), filename);        return FALSE;    }    BOOL syntax = TRUE;    for (;;) {      CString task, str_taskid,loaded;	  if (CConnection::GetFirmware() >= 20900 && CConnection::GetFirmware() < 21000)	  {		  // 04.04.06 SIS: do not check for end of line here (only for OSAI V2.09)	  }	  else	  {		  if (!parser.IsEndOfLine()) {			syntax = FALSE;			break;		  }	  }	        BOOL ok = parser.ParseNextField(task);      if (!ok)          break;      task.MakeLower();      syntax = parser.ParseNextField(str_taskid);      if (!syntax)          break;	  if (CConnection::GetFirmware() >= 20700)	  {		  // Skip loaded/unloaded flag		  ok = parser.ParseNextField(loaded);		  if (!ok)			  break;	  }      if (taskid == _ttol(str_taskid)){        name = task;        return TRUE;      }	  if (CConnection::GetFirmware() >= 20900 && CConnection::GetFirmware() < 21000)	  {		parser.SkipLine();	// 04.04.06 SIS: skip rest of line	  }    }    if (!syntax) {        FC_DEBUGPRINT3(_T("CSVPARS> syntax error in %s(%d:%d)/n"), filename, parser.GetLineNo(), parser.GetLinePos());        TrcPrint(TRC_ERROR, _T("CSVPARS> syntax error in %s(%d:%d)/n"), filename, parser.GetLineNo(), parser.GetLinePos());    }    return FALSE;}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:59,


示例23: ofs

void OptionsDB::Commit(){    if (!m_dirty)        return;    boost::filesystem::ofstream ofs(GetConfigPath());    if (ofs) {        XMLDoc doc;        GetOptionsDB().GetXML(doc);        doc.WriteDoc(ofs);        m_dirty = false;    } else {        std::cerr << UserString("UNABLE_TO_WRITE_CONFIG_XML") << std::endl;        std::cerr << PathString(GetConfigPath()) << std::endl;        ErrorLogger() << UserString("UNABLE_TO_WRITE_CONFIG_XML");        ErrorLogger() << PathString(GetConfigPath());    }}
开发者ID:MatGB,项目名称:freeorion,代码行数:17,


示例24: GetConfigPath

QString GetConfigPath(ConfigPath config) {  switch (config) {    case Path_Root: {      if (Application::kIsPortable) {        return QString("%1/data").arg(QCoreApplication::applicationDirPath());      }      #ifdef Q_OS_DARWIN        return mac::GetApplicationSupportPath() + "/" + QCoreApplication::organizationName();      #else        return QString("%1/.config/%2").arg(QDir::homePath(), QCoreApplication::organizationName());      #endif    }    break;    case Path_CacheRoot: {      if (Application::kIsPortable) {        return GetConfigPath(Path_Root) + "/cache";      }      #if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)        char* xdg = getenv("XDG_CACHE_HOME");        if (!xdg || !*xdg) {          return QString("%1/.cache/%2").arg(QDir::homePath(), QCoreApplication::organizationName());        } else {          return QString("%1/%2").arg(xdg, QCoreApplication::organizationName());        }      #else        return GetConfigPath(Path_Root);      #endif    }    break;    case Path_AlbumCovers:      return GetConfigPath(Path_Root) + "/albumcovers";    case Path_NetworkCache:      return GetConfigPath(Path_CacheRoot) + "/networkcache";    case Path_MoodbarCache:      return GetConfigPath(Path_CacheRoot) + "/moodbarcache";    case Path_GstreamerRegistry:      return GetConfigPath(Path_Root) +          QString("/gst-registry-%1-bin").arg(QCoreApplication::applicationVersion());    case Path_DefaultMusicLibrary:      #ifdef Q_OS_DARWIN        return mac::GetMusicDirectory();      #else        return QDir::homePath();      #endif    case Path_LocalSpotifyBlob:      return GetConfigPath(Path_Root) + "/spotifyblob";    default:      qFatal("%s", Q_FUNC_INFO);      return QString::null;  }}
开发者ID:BrummbQ,项目名称:Clementine,代码行数:59,



注:本文中的GetConfigPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetConfigValue函数代码示例
C++ GetConfig函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。