Esempio n. 1
0
void KLSHistoryCombo::saveItems()
{
    if(items_saved_)
        return;

    QStringList items = historyItems();

    KLSConfig::setComboUrlHistory(items);
    KLSConfig::writeConfig();
    
    items_saved_ = true;
}
Esempio n. 2
0
void KHistoryComboBox::setPixmapProvider( KPixmapProvider *prov )
{
    if ( d->myPixProvider == prov )
        return;

    delete d->myPixProvider;
    d->myPixProvider = prov;

    // re-insert all the items with/without pixmap
    // I would prefer to use changeItem(), but that doesn't honor the pixmap
    // when using an editable combobox (what we do)
    if ( count() > 0 ) {
        QStringList items( historyItems() );
        clear();
        insertItems( items );
    }
}