Changeset View
Changeset View
Standalone View
Standalone View
src/gui/faviconrequestjob.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 98 | { | |||
---|---|---|---|---|---|
134 | job->addMetaData(metaData); | 134 | job->addMetaData(metaData); | ||
135 | QObject::connect(job, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(slotData(KIO::Job*,QByteArray))); | 135 | QObject::connect(job, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(slotData(KIO::Job*,QByteArray))); | ||
136 | addSubjob(job); | 136 | addSubjob(job); | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | void FavIconRequestJob::slotResult(KJob *job) | 139 | void FavIconRequestJob::slotResult(KJob *job) | ||
140 | { | 140 | { | ||
141 | KIO::TransferJob *tjob = static_cast<KIO::TransferJob *>(job); | 141 | KIO::TransferJob *tjob = static_cast<KIO::TransferJob *>(job); | ||
142 | const QUrl iconUrl = tjob->url(); | 142 | const QUrl &iconUrl = tjob->url(); | ||
143 | KIO::FavIconsCache *cache = KIO::FavIconsCache::instance(); | 143 | KIO::FavIconsCache *cache = KIO::FavIconsCache::instance(); | ||
144 | if (!job->error()) { | 144 | if (!job->error()) { | ||
145 | QBuffer buffer(&d->m_iconData); | 145 | QBuffer buffer(&d->m_iconData); | ||
146 | buffer.open(QIODevice::ReadOnly); | 146 | buffer.open(QIODevice::ReadOnly); | ||
147 | QImageReader ir(&buffer); | 147 | QImageReader ir(&buffer); | ||
148 | QSize desired(16, 16); | 148 | QSize desired(16, 16); | ||
149 | if (ir.canRead()) { | 149 | if (ir.canRead()) { | ||
150 | while (ir.imageCount() > 1 | 150 | while (ir.imageCount() > 1 | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |