void BookmarksImportIconFetcher::slotFetcherFinished() { IconFetcher* fetcher = qobject_cast<IconFetcher*>(sender()); if (!fetcher) { return; } m_fetchers.removeOne(fetcher); emit oneFinished(); }
} else { item->setIcon(0, QIcon(QPixmap::fromImage(b.image))); } item->setText(1, b.url.toString()); item->setData(0, Qt::UserRole + 10, bookmarkVariant); ui->treeWidget->addTopLevelItem(item); m_fetcher->addEntry(b.url, item); } ui->treeWidget->expandAll(); connect(m_fetcher, SIGNAL(iconFetched(QImage, QTreeWidgetItem*)), this, SLOT(iconFetched(QImage, QTreeWidgetItem*))); connect(m_fetcher, SIGNAL(oneFinished()), this, SLOT(loadFinished())); m_fetcherThread->start(); m_fetcher->startFetching(); } void BookmarksImportDialog::stopDownloading() { ui->nextButton->setEnabled(true); ui->stopButton->hide(); ui->progressBar->setValue(ui->progressBar->maximum()); ui->fetchingLabel->setText(tr("Please press Finish to complete importing process.")); } void BookmarksImportDialog::loadFinished() {