From 6fb0110f972b8d9de22c7c06246b68bd7b6ebe50 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Mon, 16 Apr 2012 13:16:11 -0700 Subject: Using QLatin1String instead of QLatin1Literal QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart --- src/widgets/styles/qgtkstyle.cpp | 2 +- src/widgets/styles/qplastiquestyle.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp index 87d335baad..dbaee40913 100644 --- a/src/widgets/styles/qgtkstyle.cpp +++ b/src/widgets/styles/qgtkstyle.cpp @@ -707,7 +707,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // thin rectangular images const int pmSize = 64; const int border = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget); - const QString pmKey = QLatin1Literal("windowframe") % HexString(option->state); + const QString pmKey = QLatin1String("windowframe") % HexString(option->state); QPixmap pixmap; QRect pmRect(QPoint(0,0), QSize(pmSize, pmSize)); diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp index cae015ff82..51c6c441d0 100644 --- a/src/widgets/styles/qplastiquestyle.cpp +++ b/src/widgets/styles/qplastiquestyle.cpp @@ -487,7 +487,7 @@ static void qBrushSetAlphaF(QBrush *brush, qreal alpha) // Modify the texture - ridiculously expensive. QPixmap texture = brush->texture(); QPixmap pixmap; - QString name = QLatin1Literal("qbrushtexture-alpha") + QString name = QLatin1String("qbrushtexture-alpha") % HexString(alpha) % HexString(texture.cacheKey()); if (!QPixmapCache::find(name, pixmap)) { @@ -550,7 +550,7 @@ static QBrush qBrushLight(QBrush brush, int light) // Modify the texture - ridiculously expensive. QPixmap texture = brush.texture(); QPixmap pixmap; - QString name = QLatin1Literal("qbrushtexture-light") + QString name = QLatin1String("qbrushtexture-light") % HexString(light) % HexString(texture.cacheKey()); @@ -612,7 +612,7 @@ static QBrush qBrushDark(QBrush brush, int dark) // Modify the texture - ridiculously expensive. QPixmap texture = brush.texture(); QPixmap pixmap; - QString name = QLatin1Literal("qbrushtexture-dark") + QString name = QLatin1String("qbrushtexture-dark") % HexString(dark) % HexString(texture.cacheKey()); @@ -739,7 +739,7 @@ static QColor mergedColors(const QColor &colorA, const QColor &colorB, int facto static void qt_plastique_draw_gradient(QPainter *painter, const QRect &rect, const QColor &gradientStart, const QColor &gradientStop) { - QString gradientName = QLatin1Literal("qplastique-g") + QString gradientName = QLatin1String("qplastique-g") % HexString(rect.width()) % HexString(rect.height()) % HexString(gradientStart.rgba()) -- cgit v1.2.3