diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
commit | 2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0 (patch) | |
tree | 4d48ece1b8ad6b5eca854d05f00eea82733af389 /tests/arthur | |
parent | e37684d2899b8f2cbc14fa0ab19ab12ed23d495a (diff) | |
download | Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.zip Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.gz Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.bz2 |
Remove obsolete code from autotests.
Each version of Qt has its own set of autotests, therefore
preprocessor directives relating to obsolete QT_VERSION's
are not necessary.
Reviewed-by: Carlos Duclos
Diffstat (limited to 'tests/arthur')
-rw-r--r-- | tests/arthur/common/paintcommands.cpp | 19 | ||||
-rw-r--r-- | tests/arthur/common/qengines.cpp | 4 |
2 files changed, 1 insertions, 22 deletions
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp index a72e689..6ab71f8 100644 --- a/tests/arthur/common/paintcommands.cpp +++ b/tests/arthur/common/paintcommands.cpp @@ -1886,7 +1886,6 @@ void PaintCommands::command_setBrushOrigin(QRegExp re) /***************************************************************************************************/ void PaintCommands::command_brushTranslate(QRegExp re) { -#if QT_VERSION > 0x040200 QStringList caps = re.capturedTexts(); double dx = convertToDouble(caps.at(1)); double dy = convertToDouble(caps.at(2)); @@ -1899,13 +1898,11 @@ void PaintCommands::command_brushTranslate(QRegExp re) brush_matrix.translate(dx, dy); new_brush.setTransform(brush_matrix); m_painter->setBrush(new_brush); -#endif } /***************************************************************************************************/ void PaintCommands::command_brushScale(QRegExp re) { -#if QT_VERSION > 0x040200 QStringList caps = re.capturedTexts(); double sx = convertToDouble(caps.at(1)); double sy = convertToDouble(caps.at(2)); @@ -1918,13 +1915,11 @@ void PaintCommands::command_brushScale(QRegExp re) brush_matrix.scale(sx, sy); new_brush.setTransform(brush_matrix); m_painter->setBrush(new_brush); -#endif } /***************************************************************************************************/ void PaintCommands::command_brushRotate(QRegExp re) { -#if QT_VERSION > 0x040200 QStringList caps = re.capturedTexts(); double rot = convertToDouble(caps.at(1)); @@ -1936,13 +1931,11 @@ void PaintCommands::command_brushRotate(QRegExp re) brush_matrix.rotate(rot); new_brush.setTransform(brush_matrix); m_painter->setBrush(new_brush); -#endif } /***************************************************************************************************/ void PaintCommands::command_brushShear(QRegExp re) { -#if QT_VERSION > 0x040200 QStringList caps = re.capturedTexts(); double sx = convertToDouble(caps.at(1)); double sy = convertToDouble(caps.at(2)); @@ -1955,7 +1948,6 @@ void PaintCommands::command_brushShear(QRegExp re) brush_matrix.shear(sx, sy); new_brush.setTransform(brush_matrix); m_painter->setBrush(new_brush); -#endif } /***************************************************************************************************/ @@ -2326,10 +2318,8 @@ void PaintCommands::command_gradient_setLinear(QRegExp re) lg.setSpread(m_gradientSpread); lg.setCoordinateMode(m_gradientCoordinate); QBrush brush(lg); -#if QT_VERSION > 0x040200 QTransform brush_matrix = m_painter->brush().transform(); brush.setTransform(brush_matrix); -#endif m_painter->setBrush(brush); } @@ -2375,10 +2365,8 @@ void PaintCommands::command_gradient_setRadial(QRegExp re) rg.setSpread(m_gradientSpread); rg.setCoordinateMode(m_gradientCoordinate); QBrush brush(rg); -#if QT_VERSION > 0x040200 QTransform brush_matrix = m_painter->brush().transform(); brush.setTransform(brush_matrix); -#endif m_painter->setBrush(brush); } @@ -2400,10 +2388,8 @@ void PaintCommands::command_gradient_setConical(QRegExp re) cg.setSpread(m_gradientSpread); cg.setCoordinateMode(m_gradientCoordinate); QBrush brush(cg); -#if QT_VERSION > 0x040200 QTransform brush_matrix = m_painter->brush().transform(); brush.setTransform(brush_matrix); -#endif m_painter->setBrush(brush); } @@ -2448,7 +2434,6 @@ void PaintCommands::command_surface_begin(QRegExp re) m_surface_painter = m_painter; -#if QT_VERSION > 0x040200 if (m_type == OpenGLType || m_type == OpenGLPBufferType) { #ifndef QT_NO_OPENGL m_surface_pbuffer = new QGLPixelBuffer(qRound(w), qRound(h)); @@ -2461,9 +2446,7 @@ void PaintCommands::command_surface_begin(QRegExp re) m_surface_pixmap.fill(Qt::transparent); m_painter = new QPainter(&m_surface_pixmap); #endif - } else -#endif - { + } else { m_surface_image = QImage(qRound(w), qRound(h), QImage::Format_ARGB32_Premultiplied); m_surface_image.fill(0); m_painter = new QPainter(&m_surface_image); diff --git a/tests/arthur/common/qengines.cpp b/tests/arthur/common/qengines.cpp index 46f4e6b..9cd2389 100644 --- a/tests/arthur/common/qengines.cpp +++ b/tests/arthur/common/qengines.cpp @@ -243,11 +243,7 @@ void GLEngine::prepare(const QSize &_size, const QColor &color) size = _size; fillColor = color; if (usePixelBuffers) { -#if (QT_VERSION < 0x040200) && defined(Q_WS_MAC) - pbuffer = new QGLPixelBuffer(QSize(512, 512), QGLFormat(QGL::SampleBuffers)); -#else pbuffer = new QGLPixelBuffer(size, QGLFormat(QGL::SampleBuffers)); -#endif } else { widget = new QGLWidget(QGLFormat(QGL::SampleBuffers)); widget->setAutoFillBackground(false); |