summaryrefslogtreecommitdiffstats
path: root/src/gui/util
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-11 17:03:48 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-03-11 19:15:49 +0000
commitcfa4879b41a786f5493ff73c59d55c65334856d8 (patch)
tree2f2b86c3303859b59cdce8af5e109f4721f3552f /src/gui/util
parent61e3fe7fd903981a75951ab360b37d186335afcb (diff)
De-inline dtors of QTextureFileHandler hierarchy
Destructors of polymorphic classes should be out-of-line to pin vtable and type_info objects to a single TU. Pick-to: 6.3 Task-number: QTBUG-45582 Change-Id: I541437a3ff53852527f6278355f7b549e62e17f7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qastchandler.cpp2
-rw-r--r--src/gui/util/qastchandler_p.h1
-rw-r--r--src/gui/util/qktxhandler.cpp2
-rw-r--r--src/gui/util/qktxhandler_p.h1
-rw-r--r--src/gui/util/qpkmhandler.cpp2
-rw-r--r--src/gui/util/qpkmhandler_p.h1
-rw-r--r--src/gui/util/qtexturefilehandler_p.h2
-rw-r--r--src/gui/util/qtexturefilereader.cpp2
8 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/util/qastchandler.cpp b/src/gui/util/qastchandler.cpp
index 94cb42e29b..19d6325f03 100644
--- a/src/gui/util/qastchandler.cpp
+++ b/src/gui/util/qastchandler.cpp
@@ -59,6 +59,8 @@ struct AstcHeader
quint8 zSize[3];
};
+QAstcHandler::~QAstcHandler() = default;
+
bool QAstcHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix);
diff --git a/src/gui/util/qastchandler_p.h b/src/gui/util/qastchandler_p.h
index 398f1833b6..2b9cbc5b54 100644
--- a/src/gui/util/qastchandler_p.h
+++ b/src/gui/util/qastchandler_p.h
@@ -59,6 +59,7 @@ class QAstcHandler : public QTextureFileHandler
{
public:
using QTextureFileHandler::QTextureFileHandler;
+ ~QAstcHandler() override;
static bool canRead(const QByteArray &suffix, const QByteArray &block);
diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
index 9f4545f3af..2ab67d7c15 100644
--- a/src/gui/util/qktxhandler.cpp
+++ b/src/gui/util/qktxhandler.cpp
@@ -111,6 +111,8 @@ constexpr quint32 withPadding(quint32 value, quint32 rounding)
return value + (rounding - 1) - ((value + (rounding - 1)) % rounding);
}
+QKtxHandler::~QKtxHandler() = default;
+
bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix);
diff --git a/src/gui/util/qktxhandler_p.h b/src/gui/util/qktxhandler_p.h
index 4298433f36..b45115d3d9 100644
--- a/src/gui/util/qktxhandler_p.h
+++ b/src/gui/util/qktxhandler_p.h
@@ -61,6 +61,7 @@ class QKtxHandler : public QTextureFileHandler
{
public:
using QTextureFileHandler::QTextureFileHandler;
+ ~QKtxHandler() override;
static bool canRead(const QByteArray &suffix, const QByteArray &block);
diff --git a/src/gui/util/qpkmhandler.cpp b/src/gui/util/qpkmhandler.cpp
index 9b1337a658..7741f56afd 100644
--- a/src/gui/util/qpkmhandler.cpp
+++ b/src/gui/util/qpkmhandler.cpp
@@ -65,6 +65,8 @@ static constexpr PkmType typeMap[5] = {
{ 0x9276, 8 } // GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
};
+QPkmHandler::~QPkmHandler() = default;
+
bool QPkmHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix);
diff --git a/src/gui/util/qpkmhandler_p.h b/src/gui/util/qpkmhandler_p.h
index 2f7618bc53..ea77443cd7 100644
--- a/src/gui/util/qpkmhandler_p.h
+++ b/src/gui/util/qpkmhandler_p.h
@@ -59,6 +59,7 @@ class QPkmHandler : public QTextureFileHandler
{
public:
using QTextureFileHandler::QTextureFileHandler;
+ ~QPkmHandler() override;
static bool canRead(const QByteArray &suffix, const QByteArray &block);
diff --git a/src/gui/util/qtexturefilehandler_p.h b/src/gui/util/qtexturefilehandler_p.h
index 3d4f42526f..b0d28b87b1 100644
--- a/src/gui/util/qtexturefilehandler_p.h
+++ b/src/gui/util/qtexturefilehandler_p.h
@@ -63,7 +63,7 @@ public:
{
m_logName = !logName.isEmpty() ? logName : QByteArrayLiteral("(unknown)");
}
- virtual ~QTextureFileHandler() {}
+ virtual ~QTextureFileHandler();
virtual QTextureFileData read() = 0;
QIODevice *device() const { return m_device; }
diff --git a/src/gui/util/qtexturefilereader.cpp b/src/gui/util/qtexturefilereader.cpp
index fefb957323..b71edcd504 100644
--- a/src/gui/util/qtexturefilereader.cpp
+++ b/src/gui/util/qtexturefilereader.cpp
@@ -47,6 +47,8 @@
QT_BEGIN_NAMESPACE
+QTextureFileHandler::~QTextureFileHandler() = default;
+
QTextureFileReader::QTextureFileReader(QIODevice *device, const QString &fileName)
: m_device(device), m_fileName(fileName)
{