From 1eac22a1b9dad7f843916afa9b7c820aa1c23777 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 May 2012 16:32:26 +0200 Subject: Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets] This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart --- .../graphicsview/qgraphicsanchorlayout_p.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp') diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp index 3d20f0b07c..a935179a2a 100644 --- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp @@ -611,10 +611,10 @@ QString GraphPath::toString() const { QString string(QLatin1String("Path: ")); foreach(AnchorData *edge, positives) - string += QString::fromAscii(" (+++) %1").arg(edge->toString()); + string += QString::fromLatin1(" (+++) %1").arg(edge->toString()); foreach(AnchorData *edge, negatives) - string += QString::fromAscii(" (---) %1").arg(edge->toString()); + string += QString::fromLatin1(" (---) %1").arg(edge->toString()); return string; } @@ -765,9 +765,9 @@ static AnchorData *createSequence(Graph *graph, #if defined(QT_DEBUG) && 0 QString strVertices; for (int i = 0; i < vertices.count(); ++i) { - strVertices += QString::fromAscii("%1 - ").arg(vertices.at(i)->toString()); + strVertices += QString::fromLatin1("%1 - ").arg(vertices.at(i)->toString()); } - QString strPath = QString::fromAscii("%1 - %2%3").arg(before->toString(), strVertices, after->toString()); + QString strPath = QString::fromLatin1("%1 - %2%3").arg(before->toString(), strVertices, after->toString()); qDebug("simplifying [%s] to [%s - %s]", qPrintable(strPath), qPrintable(before->toString()), qPrintable(after->toString())); #endif @@ -847,7 +847,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation) static int count = 0; if (orientation == Horizontal) { count++; - dumpGraph(QString::fromAscii("%1-full").arg(count)); + dumpGraph(QString::fromLatin1("%1-full").arg(count)); } #endif @@ -872,8 +872,8 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation) } #if defined(QT_DEBUG) && 0 - dumpGraph(QString::fromAscii("%1-simplified-%2").arg(count).arg( - QString::fromAscii(orientation == Horizontal ? "Horizontal" : "Vertical"))); + dumpGraph(QString::fromLatin1("%1-simplified-%2").arg(count).arg( + QString::fromLatin1(orientation == Horizontal ? "Horizontal" : "Vertical"))); #endif return true; @@ -903,7 +903,7 @@ bool QGraphicsAnchorLayoutPrivate::replaceVertex(Orientation orientation, Anchor AnchorVertex *otherV = replaceVertex_helper(ad, oldV, newV); #if defined(QT_DEBUG) - ad->name = QString::fromAscii("%1 --to--> %2").arg(ad->from->toString()).arg(ad->to->toString()); + ad->name = QString::fromLatin1("%1 --to--> %2").arg(ad->from->toString()).arg(ad->to->toString()); #endif bool newFeasible; @@ -1766,7 +1766,7 @@ void QGraphicsAnchorLayoutPrivate::addAnchor_helper(QGraphicsLayoutItem *firstIt data->from = v1; data->to = v2; #ifdef QT_DEBUG - data->name = QString::fromAscii("%1 --to--> %2").arg(v1->toString()).arg(v2->toString()); + data->name = QString::fromLatin1("%1 --to--> %2").arg(v1->toString()).arg(v2->toString()); #endif // ### bit to track internal anchors, since inside AnchorData methods // we don't have access to the 'q' pointer. @@ -2999,11 +2999,11 @@ bool QGraphicsAnchorLayoutPrivate::hasConflicts() const #ifdef QT_DEBUG void QGraphicsAnchorLayoutPrivate::dumpGraph(const QString &name) { - QFile file(QString::fromAscii("anchorlayout.%1.dot").arg(name)); + QFile file(QString::fromLatin1("anchorlayout.%1.dot").arg(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) qWarning("Could not write to %s", file.fileName().toLocal8Bit().constData()); - QString str = QString::fromAscii("digraph anchorlayout {\nnode [shape=\"rect\"]\n%1}"); + QString str = QString::fromLatin1("digraph anchorlayout {\nnode [shape=\"rect\"]\n%1}"); QString dotContents = graph[0].serializeToDot(); dotContents += graph[1].serializeToDot(); file.write(str.arg(dotContents).toLocal8Bit()); -- cgit v1.2.3