本文整理汇总了C++中ConfigFile::configPath方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigFile::configPath方法的具体用法?C++ ConfigFile::configPath怎么用?C++ ConfigFile::configPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile::configPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: versionInfoArrived
void NSISUpdater::versionInfoArrived(const UpdateInfo &info)
{
ConfigFile cfg;
QSettings settings(cfg.configFile(), QSettings::IniFormat);
qint64 infoVersion = Helper::stringVersionToInt(info.version());
qint64 seenVersion = Helper::stringVersionToInt(settings.value(seenVersionC).toString());
qint64 currVersion = Helper::currentVersionToInt();
if (info.version().isEmpty()
|| infoVersion <= currVersion
|| infoVersion <= seenVersion) {
qCInfo(lcUpdater) << "Client is on latest version!";
setDownloadState(UpToDate);
} else {
QString url = info.downloadUrl();
qint64 autoUpdateFailedVersion =
Helper::stringVersionToInt(settings.value(autoUpdateFailedVersionC).toString());
if (url.isEmpty() || _showFallbackMessage || infoVersion == autoUpdateFailedVersion) {
showDialog(info);
}
if (!url.isEmpty()) {
_targetFile = cfg.configPath() + url.mid(url.lastIndexOf('/'));
if (QFile(_targetFile).exists()) {
setDownloadState(DownloadComplete);
} else {
QNetworkReply *reply = qnam()->get(QNetworkRequest(QUrl(url)));
connect(reply, &QIODevice::readyRead, this, &NSISUpdater::slotWriteFile);
connect(reply, &QNetworkReply::finished, this, &NSISUpdater::slotDownloadFinished);
setDownloadState(Downloading);
_file.reset(new QTemporaryFile);
_file->setAutoRemove(true);
_file->open();
}
}
}
}
示例2: setConfiguration
void setConfiguration(ConfigFile config) {
cout << "Using set-up for nTuple version " << config.nTupleVersion() << endl;
cout << "Using set-up for center of mass energy = " << config.centerOfMassEnergy() << endl;
cout << "Loading configuration..." << endl;
cout << "Using config-file '" << config.configPath() << endl;
cout << "Using Dataset info file: '" << config.datasetInfoFile() << endl;
cout << "Using pileup-file '" << config.PUFile() << endl;
cout << "Using L7 jet energy corrections: " << config.bJetResoFile() << ", ";
cout << config.lightJetResoFile() << endl;
if (config.jesSystematic()!=0)
cout << "Varying all the jets by " << config.jesSystematic() << " sigma(s) (JEC uncertainty)\n";
long maxEvents(config.maxEvents());
cout << "Maximal number of events to be processed: ";
if (maxEvents > 0)
cout << maxEvents << ".\n";
else
cout << "all available" << ".\n";
cout << "Scaling to luminosity " << config.lumi() << "pb-1" << endl;
if (config.useHitFit())
cout << "Using HitFit.\n";
config.loadIntoMemory();
//@Deprecated: move to selections
//jets
Globals::jetAlgorithm = JetAlgorithm::PF2PAT;
//electrons
Globals::electronAlgorithm = ElectronAlgorithm::ParticleFlow;
//muons
Globals::muonAlgorithm = MuonAlgorithm::ParticleFlow;
//mets
Globals::metAlgorithm = METAlgorithm::patMETsPFlow;
}
示例3: setupFoldersMigration
int FolderMan::setupFoldersMigration()
{
ConfigFile cfg;
QDir storageDir(cfg.configPath());
_folderConfigPath = cfg.configPath() + QLatin1String("folders");
qCInfo(lcFolderMan) << "Setup folders from " << _folderConfigPath << "(migration)";
QDir dir(_folderConfigPath);
//We need to include hidden files just in case the alias starts with '.'
dir.setFilter(QDir::Files | QDir::Hidden);
QStringList list = dir.entryList();
// Normally there should be only one account when migrating.
AccountState *accountState = AccountManager::instance()->accounts().value(0).data();
foreach (const QString &alias, list) {
Folder *f = setupFolderFromOldConfigFile(alias, accountState);
if (f) {
scheduleFolder(f);
emit folderSyncStateChange(f);
}
}
示例4: setConfiguration
void setConfiguration(ConfigFile config) {
// cout << "Using set-up for nTuple version " << config.nTupleVersion() << endl;
cout << "Using set-up for center of mass energy = " << config.centerOfMassEnergy() << endl;
cout << "Loading configuration..." << endl;
cout << "Using config-file '" << config.configPath() << endl;
cout << "Using Dataset info file: '" << config.datasetInfoFile() << endl;
cout << "Using pileup-file '" << config.PUFile() << endl;
if (config.jesSystematic()!=0)
cout << "Varying all the jets by " << config.jesSystematic() << " sigma(s) (JEC uncertainty)\n";
long maxEvents(config.maxEvents());
cout << "Maximum number of events to be processed: ";
if (maxEvents > 0)
cout << maxEvents << ".\n";
else
cout << "all available" << ".\n";
cout << "Scaling to luminosity " << config.lumi() << "pb-1" << endl;
if (config.useHitFit())
cout << "Using HitFit.\n";
cout << "Loading in to memory" << endl;
config.loadIntoMemory();
}