QUrl's operator== used to perform allocations by comparing normalized URLs, but
even then, this code seemingly would not apply: Qt 4's QUrl still has a fast
path for the case where the URLs are empty, the same as this code implemented.
Change-Id: I69e82c848f47f5e5660bd707bfba0ff7343c8a42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
void QQuickBorderImage::setSource(const QUrl &url)
{
Q_D(QQuickBorderImage);
- //equality is fairly expensive, so we bypass for simple, common case
- if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
+
+ if (url == d->url)
return;
if (d->sciReply) {
void QQuickImageBase::setSource(const QUrl &url)
{
Q_D(QQuickImageBase);
- //equality is fairly expensive, so we bypass for simple, common case
- if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
+
+ if (url == d->url)
return;
d->url = url;