예제 #1
0
void KLSHistoryCombo::saveItems()
{
    if(items_saved_)
        return;

    QStringList items = historyItems();

    KLSConfig::setComboUrlHistory(items);
    KLSConfig::writeConfig();
    
    items_saved_ = true;
}
예제 #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 );
    }
}