diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2017-01-09 16:08:37 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2017-01-24 08:38:21 +0000 |
commit | 325051bc42cd081bfd3a698a16c44235164be2af (patch) | |
tree | 2b7c77018fe3add319860e5c651b31e80b133f4a /src/quick/util | |
parent | fb36e37928a6267a4f1881995b3aa53740a0a399 (diff) |
Remove qWarning about QQuickImageProviderWithOptions
If you're an user it's a bit annoying since it may show a lot and you don't know what to do with it
If you're a developer it's a bit annoying since it's telling you to use a private class
If we had a "debug for developers only mode" we could improve the message to be a bit more fine tuned
and suggest that if they really want to be precise they can implement QQuickImageProviderWithOptions
but as far as i know we don't have it, so i think it's better to remove the message altogether.
Also mark the internal classes with the private export and add \internal to documentation of the internal class
Change-Id: I5d7fc8d8b333c9a12321ed8135433603251815fc
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickimageprovider.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 9 | ||||
-rw-r--r-- | src/quick/util/qquickpixmapcache_p.h | 4 |
3 files changed, 3 insertions, 12 deletions
diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index c4182d9f93..7788635e3e 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -514,9 +514,9 @@ public: /*! \class QQuickImageProviderOptions - \since 5.9 \brief The QQuickImageProviderOptions class provides options for QQuickImageProviderWithOptions image requests. \inmodule QtQuick + \internal \sa QQuickImageProviderWithOptions */ diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 7b369a2d0f..1c6b2afb54 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -695,15 +695,6 @@ void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &u QQuickImageProviderWithOptions *providerV2 = provider->d->isProviderWithOptions ? static_cast<QQuickImageProviderWithOptions *>(provider) : nullptr; - if (!provider->d->isProviderWithOptions && - (providerOptions.autoTransform() != QQuickImageProviderOptions::UsePluginDefaultTransform - || providerOptions.preserveAspectRatioCrop() - || providerOptions.preserveAspectRatioFit()) - ) - { - qWarning() << "Trying to pass extra request flags to provider but it is not a QQuickImageProviderWithOptions"; - } - switch (imageType) { case QQuickImageProvider::Invalid: { diff --git a/src/quick/util/qquickpixmapcache_p.h b/src/quick/util/qquickpixmapcache_p.h index eea6a7a454..f7cdfa7d07 100644 --- a/src/quick/util/qquickpixmapcache_p.h +++ b/src/quick/util/qquickpixmapcache_p.h @@ -91,7 +91,7 @@ public: }; // ### Qt 6: Make public moving to qquickimageprovider.h -class Q_QUICK_EXPORT QQuickImageProviderOptions +class Q_QUICK_PRIVATE_EXPORT QQuickImageProviderOptions { public: enum AutoTransform { @@ -188,7 +188,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPixmap::Options) // This class will disappear with Qt6 and will just be the regular QQuickImageProvider // ### Qt 6: Remove this class and fold it with QQuickImageProvider -class Q_QUICK_EXPORT QQuickImageProviderWithOptions : public QQuickAsyncImageProvider +class Q_QUICK_PRIVATE_EXPORT QQuickImageProviderWithOptions : public QQuickAsyncImageProvider { public: QQuickImageProviderWithOptions(ImageType type, Flags flags = Flags()); |