De-inline virtuals of some non-exported private classes in QtGui

This is to work around a bug in GCC 4.7's link-time optimiser. Without
it, linking QtOpenGL and QtPrintSupport fails because the compiler
generates the code for the virtuals, including the virtual table, but
not the methods.

Change-Id: Idcecd51c32e6228e0eefe67f1bd630ea1f5d5da7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Thiago Macieira 2013-09-22 18:48:42 -07:00 committed by The Qt Project
parent 58b08ba40b
commit c81d0586b5
4 changed files with 25 additions and 6 deletions

View File

@ -1880,4 +1880,13 @@ QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosit
return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, t);
}
QTestFontEngine::QTestFontEngine(int size)
: QFontEngineBox(size)
{}
QFontEngine::Type QTestFontEngine::type() const
{
return TestFontEngine;
}
QT_END_NAMESPACE

View File

@ -434,8 +434,8 @@ protected:
class QTestFontEngine : public QFontEngineBox
{
public:
QTestFontEngine(int size) : QFontEngineBox(size) {}
virtual Type type() const { return TestFontEngine; }
QTestFontEngine(int size);
virtual Type type() const;
};
QT_END_NAMESPACE

View File

@ -2370,8 +2370,20 @@ void CloseButton::paintEvent(QPaintEvent *)
style()->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, &p, this);
}
void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant &current)
{
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
}
void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State newState)
{
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
}
QT_END_NAMESPACE
#include "moc_qtabbar.cpp"
#endif // QT_NO_TABBAR

View File

@ -126,11 +126,9 @@ public:
TabBarAnimation(Tab *t, QTabBarPrivate *_priv) : tab(t), priv(_priv)
{ setEasingCurve(QEasingCurve::InOutQuad); }
void updateCurrentValue(const QVariant &current)
{ priv->moveTab(priv->tabList.indexOf(*tab), current.toInt()); }
void updateCurrentValue(const QVariant &current);
void updateState(State, State newState)
{ if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab)); }
void updateState(State, State newState);
private:
//these are needed for the callbacks
Tab *tab;