Commit 7ef028a4 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

WelcomePage: Report sizes of loaded images

It's so much nicer for the qml profiler to know the actual sizes of
images ...

Change-Id: Ib1c0d38b002a061e7cffe2619034e144e4d5f2cf
Reviewed-by: default avatarUlf Hermann <>
Reviewed-by: default avatarThomas Hartmann <>
parent 29d68366
......@@ -181,16 +181,19 @@ public:
// gets called by declarative in separate thread
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize)
QMutexLocker lock(&m_mutex);
QUrl url = QUrl::fromEncoded(id.toLatin1());
if (!m_fetcher.asynchronousFetchData(url))
return QImage();
if (
if (!m_fetcher.asynchronousFetchData(url) || {
if (size) {
return QImage();
QByteArray data =;
QBuffer imgBuffer(&data);;
......@@ -198,7 +201,11 @@ public:
QImage img =;
return ScreenshotCropper::croppedImage(img, id, requestedSize);
img = ScreenshotCropper::croppedImage(img, id, requestedSize);
if (size)
*size = img.size();
return img;
Fetcher m_fetcher;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment