当前位置: 首页>>代码示例>>C++>>正文


C++ QStringList::removeAll方法代码示例

本文整理汇总了C++中QStringList::removeAll方法的典型用法代码示例。如果您正苦于以下问题:C++ QStringList::removeAll方法的具体用法?C++ QStringList::removeAll怎么用?C++ QStringList::removeAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QStringList的用法示例。


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

示例1: QString

static QString getEmail2(const KContacts::Addressee &addressee)
{
    // preferred might not be the first one, so remove it and take the first of
    // the remaining instead of always taking the second one
    QStringList emails = addressee.emails();
    emails.removeAll(addressee.preferredEmail());
    if (!emails.isEmpty()) {
        return emails.at( 0 );
    }

    return QString();
}
开发者ID:KDAB,项目名称:FatCRM,代码行数:12,代码来源:contactshandler.cpp

示例2: RemoveDeskPlugin

void LDesktop::RemoveDeskPlugin(QString ID){
  //This is called after a plugin is manually removed by the user
  //	just need to ensure that the plugin is also removed from the settings file
  QStringList plugs = settings->value(DPREFIX+"pluginlist", QStringList()).toStringList();
  if(plugs.contains(ID)){ 
    plugs.removeAll(ID); 
    issyncing=true; //don't let the change cause a refresh
    settings->setValue(DPREFIX+"pluginlist", plugs);
    settings->sync();
    QTimer::singleShot(200, this, SLOT(UnlockSettings()) );
  }
}
开发者ID:codersean,项目名称:lumina,代码行数:12,代码来源:LDesktop.cpp

示例3: applyGtkStyles

// -----------------------------------------------------------------------------
static void applyGtkStyles(bool active, int version)
{
   QString gtkkde = KStandardDirs::locateLocal("config", 2==version?"gtkrc-2.0":"gtkrc");
   QByteArray gtkrc = getenv(gtkEnvVar(version));
   QStringList list = QFile::decodeName(gtkrc).split( ':');
   QString userHomeGtkrc = QDir::homePath()+userGtkrc(version);
   if (!list.contains(userHomeGtkrc))
      list.prepend(userHomeGtkrc);
   QLatin1String systemGtkrc = QLatin1String(sysGtkrc(version));
   if (!list.contains(systemGtkrc))
      list.prepend(systemGtkrc);
   list.removeAll("");
   list.removeAll(gtkkde);
   list.append(gtkkde);

   // Pass env. var to kdeinit.
   QString name = gtkEnvVar(version);
   QString value = list.join(":");
   org::kde::KLauncher klauncher(QStringLiteral("org.kde.klauncher5"), QStringLiteral("/KLauncher"), QDBusConnection::sessionBus());
   klauncher.setLaunchEnv(name, value);
}
开发者ID:KDE,项目名称:kde-workspace,代码行数:22,代码来源:krdb.cpp

示例4: removeProfile

void QtSettingsProvider::removeProfile(const std::string& profile) {
    QString profileStart(QString(profile.c_str()) + ":");
    for (auto&& key : settings_.allKeys()) {
        if (key.startsWith(profileStart)) {
            settings_.remove(key);
        }
    }
    QStringList stringList = settings_.value("profileList").toStringList();
    stringList.removeAll(profile.c_str());
    settings_.setValue("profileList", stringList);
    updatePermissions();
}
开发者ID:swift,项目名称:swift,代码行数:12,代码来源:QtSettingsProvider.cpp

示例5: xtsettingsValue

void login2::updateRecentOptions()
{
  //if (_cloudOption->isChecked())
  //  return;
  QStringList list = xtsettingsValue("/xTuple/_recentOptionsList").toStringList();
  _recent->setEnabled(list.size());
  list.removeAll(_databaseURL);
  list.prepend(_databaseURL);
      
  xtsettingsSetValue("/xTuple/_recentOptionsList", list);
  xtsettingsSetValue("/xTuple/_databaseURL", _databaseURL);
}
开发者ID:Fortyseven,项目名称:qt-client,代码行数:12,代码来源:login2.cpp

示例6: _scan

void CClientExtractor::_scan(const string& dir)
{
	QDir directory(dir);
	if (!directory.exists())
		return;

	const QStringList files = directory.entryList(QStringList("*.res"), QDir::Files);

	for (int i = 0; i < files.size(); i++)
		m_files.append(dir % '/' % files[i]);

	QStringList subDirs = directory.entryList(QDir::Dirs);
	if (subDirs.size() > 0)
	{
		subDirs.removeAll(".");
		subDirs.removeAll("..");

		for (int i = 0; i < subDirs.size(); i++)
			_scan(dir % '/' % subDirs[i]);
	}
}
开发者ID:Aishiro,项目名称:ATools,代码行数:21,代码来源:ClientExtractor.cpp

示例7: extraFiles

QStringList PortStruct::extraFiles(){
  QDir dir(basepath);
  QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
  QStringList main = this->mainFiles();
  for(int i=0; i<main.length(); i++){ files.removeAll(main[i]); }
  if(dir.exists("files")){
    dir.cd("files");
    QStringList NF = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
    for(int i=0; i<NF.length(); i++){ files << "files/"+NF[i]; }
  }
  return files;
}
开发者ID:karlpilkington,项目名称:pcbsd-projects,代码行数:12,代码来源:portStruct.cpp

示例8: QString

static QString getEmail2(const KABC::Addressee &addressee)
{
    // preferred might not be the first one, so remove it and take the first of
    // the remaining instead of always taking the second one
    QStringList emails = addressee.emails();
    emails.removeAll(addressee.preferredEmail());
    if (emails.count() >= 1) {
        return emails[ 0 ];
    }

    return QString();
}
开发者ID:Acidburn0zzz,项目名称:FatCRM,代码行数:12,代码来源:contactshandler.cpp

示例9: removeAccount

void Protocol::removeAccount(Account *account, RemoveFlag flags)
{
	Config general = config().group("general");
	QStringList accounts = general.value("accounts",QStringList());
	accounts.removeAll(account->id());
	general.setValue("accounts",accounts);
	general.sync();
	emit accountRemoved(account);

	if (flags & DeleteAccount)
		account->deleteLater();
}
开发者ID:CyberSys,项目名称:qutim,代码行数:12,代码来源:protocol.cpp

示例10: addRecentFile

void GLShaderDev::addRecentFile(const QString& filename)
{
    QSettings settings;
    QStringList   recentFiles = settings.value("recentFiles").toStringList();

    recentFiles.removeAll(filename);
    recentFiles.prepend(filename);
    while (recentFiles.size() > MaxRecentFiles)
        recentFiles.removeLast();
    settings.setValue("recentFiles", recentFiles);
    updateRecentFiles();
}
开发者ID:Ryp,项目名称:GLShaderDev,代码行数:12,代码来源:GLShaderDev.cpp

示例11: getUninstalledPlugins

QStringList Plugins::getUninstalledPlugins() const
{
    QStringList plugins;

    // Gets all the plugins
    this->_findPlugins(Configurations::c().pluginsPath, "", plugins);
    // Removes the plugins installed
    QStringListIterator it(this->getInstalledPlugins());
    while (it.hasNext())
        plugins.removeAll(it.next());
    return (plugins);
}
开发者ID:nicolas-bertrand,项目名称:lightbird,代码行数:12,代码来源:Plugins.cpp

示例12: getUnloadedPlugins

QStringList Plugins::getUnloadedPlugins() const
{
    QStringList plugins;

    // Gets all the installed plugins
    plugins = this->getInstalledPlugins();
    // Removes the plugins loaded
    QStringListIterator it(this->getLoadedPlugins());
    while (it.hasNext())
        plugins.removeAll(it.next());
    return (plugins);
}
开发者ID:nicolas-bertrand,项目名称:lightbird,代码行数:12,代码来源:Plugins.cpp

示例13: addToRecentProjects

void MainWindow::addToRecentProjects(const QString& fileName)
{
	QSettings settings;
	QStringList files = settings.value("recentProjectList").toStringList();
	files.removeAll(fileName);
	files.prepend(fileName);
	while (files.size() > MAX_RECENT_FILES)
		files.removeLast();
	settings.setValue("recentProjectList", files);

	updateRecentProjectActions();
}
开发者ID:dev-life,项目名称:gideros,代码行数:12,代码来源:mainwindow.cpp

示例14: Search

	Media::IPendingAudioSearch* Plugin::Search (const Media::AudioSearchRequest& req)
	{
		auto realReq = req;
		if (realReq.FreeForm_.isEmpty ())
		{
			QStringList parts = { req.Artist_, req.Album_, req.Title_ };
			parts.removeAll (QString ());
			realReq.FreeForm_ = parts.join (" - ");
		}

		return new AudioSearch (Proxy_, realReq, AuthMgr_, Queue_);
	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:12,代码来源:touchstreams.cpp

示例15: setAudioConfiguration

void PlayerComponent::setAudioConfiguration()
{
  QStringList ao_defaults;

  QString deviceType = SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "devicetype").toString();

  if (SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "exclusive").toBool())
  {
    ao_defaults << "wasapi:exclusive=yes";
    ao_defaults << "coreaudio:exclusive=yes";
  }

  mpv::qt::set_option_variant(m_mpv, "ao-defaults", ao_defaults.join(','));

  // set the audio device
  QVariant device = SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "device");
  mpv::qt::set_property_variant(m_mpv, "audio-device", device);

  QString resampleOpts = "";
  bool normalize = SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "normalize").toBool();
  resampleOpts += QString(":normalize=") + (normalize ? "yes" : "no");

  // Make downmix more similar to PHT.
  resampleOpts += ":o=[surround_mix_level=1,lfe_mix_level=1]";

  mpv::qt::set_option_variant(m_mpv, "af-defaults", "lavrresample" + resampleOpts);

  QString passthroughCodecs;
  // passthrough doesn't make sense with basic type
  if (deviceType != AUDIO_DEVICE_TYPE_BASIC)
  {
    QStringList enabledCodecs;
    SettingsSection* audioSection = SettingsComponent::Get().getSection(SETTINGS_SECTION_AUDIO);

    QStringList codecs;
    if (deviceType == AUDIO_DEVICE_TYPE_SPDIF)
      codecs = AudioCodecsSPDIF();
    else if (deviceType == AUDIO_DEVICE_TYPE_HDMI && audioSection->value("advanced").toBool())
      codecs = AudioCodecsAll();

    foreach (const QString& key, codecs)
    {
      if (audioSection->value("passthrough." + key).toBool())
        enabledCodecs << key;
    }

    // dts-hd includes dts, but listing dts before dts-hd may disable dts-hd.
    if (enabledCodecs.indexOf("dts-hd") != -1)
      enabledCodecs.removeAll("dts");

    passthroughCodecs = enabledCodecs.join(",");
  }
开发者ID:speedst3r,项目名称:plex-media-player,代码行数:52,代码来源:PlayerComponent.cpp


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