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

void HtmlOptionsPage::loadCountryList ( QComboBox *  combo  )  [private]

Load the list of avaliable countries and put them into a combo box This code is based on kdebase/kcontrol/locale/locale.cpp.

combo the combo where to put the result

Definition at line 255 of file htmloptionspage.cpp.

Referenced by setupPage().

  QString sub = QString::fromLatin1("l10n/");
  // clear the list
  // add all languages to the list
  QStringList countrylist = KGlobal::dirs()->findAllResources("locale",
                               sub + QString::fromLatin1("*/entry.desktop"));

  for(QStringList::ConstIterator it=++countrylist.begin();it!=countrylist.end();++it)
    KSimpleConfig entry(*it);
    entry.setGroup(QString::fromLatin1("KCM Locale"));
    QString name = entry.readEntry(QString::fromLatin1("Name"),
                       KGlobal::locale()->translate("without name"));
    QString tag = *it;
    int index = tag.findRev('/');
    index = tag.findRev('/');
    tag = tag.mid(index+1);
    combo->insertItem(name+" ("+tag+")");

Generated by  Doxygen 1.6.0   Back to index