Re-fix build error with ICC 17 on Windows

This is a repeat of ae880beb7d, which had
fixed the problem for ICC 16. That commit was a repeat of
acf80b9a2b, which had fixed it for ICC 15.

As reported in ae880beb7, ICC doesn't like polymorphic exported classes
with inline constructors. That commit added the default constructor, but
we forgot the copy constructor. This constructor should have been
protected, so users are forced to use the virtual clone() function, but
we can't make it so in Qt 5 because MSVC encodes the protection and has
exported the inline function in debug builds.

qsvgiconengine.obj : error LNK2001: unresolved external symbol "const QIconEngine::`vftable'" (??_7QIconEngine@@6)

Change-Id: I427336c52fc342638c74fffd149033b990ea7ade
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Thiago Macieira 2016-12-14 10:45:49 -08:00 committed by Jani Heikkinen
parent 104854708c
commit d8b678661b
2 changed files with 12 additions and 0 deletions

View File

@ -91,6 +91,14 @@ QIconEngine::QIconEngine()
{
}
/*!
\since 5.8
\internal
*/
QIconEngine::QIconEngine(const QIconEngine &)
{
}
/*!
Destroys the icon engine.
*/

View File

@ -51,6 +51,7 @@ class Q_GUI_EXPORT QIconEngine
{
public:
QIconEngine();
QIconEngine(const QIconEngine &other); // ### Qt6: make protected
virtual ~QIconEngine();
virtual void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) = 0;
virtual QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state);
@ -80,6 +81,9 @@ public:
bool isNull() const; // ### Qt6 make virtual
virtual void virtual_hook(int id, void *data);
private:
QIconEngine &operator=(const QIconEngine &other) Q_DECL_EQ_DELETE;
};
#if QT_DEPRECATED_SINCE(5, 0)