Remove QOpenGLTexture dependency from QTextureFileData

Just print the hex value of the format.

Task-number: QTBUG-74409
Change-Id: I0441eda050735325f7686532b17ef765f71bec9b
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-12-12 14:06:31 +01:00
parent 65b8514cb5
commit d593c5865a

View File

@ -38,11 +38,7 @@
****************************************************************************/
#include "qtexturefiledata_p.h"
#include <QMetaEnum>
#include <QSize>
#if QT_CONFIG(opengl)
#include <QOpenGLTexture>
#endif
QT_BEGIN_NAMESPACE
@ -247,13 +243,7 @@ void QTextureFileData::setLogName(const QByteArray &name)
static QByteArray glFormatName(quint32 fmt)
{
const char *id = nullptr;
#if QT_CONFIG(opengl)
id = QMetaEnum::fromType<QOpenGLTexture::TextureFormat>().valueToKey(fmt);
#endif
QByteArray res(id ? id : "(?)");
res += " [0x" + QByteArray::number(fmt, 16).rightJustified(4, '0') + ']';
return res;
return QByteArray("0x" + QByteArray::number(fmt, 16).rightJustified(4, '0'));
}
QDebug operator<<(QDebug dbg, const QTextureFileData &d)