Changeset 32486 in webkit


Ignore:
Timestamp:
Apr 24, 2008 6:45:27 AM (16 years ago)
Author:
Simon Hausmann
Message:

Paul Olav Tvete <paul@trolltech.com>

Fix various compiler warnings related to QString(const char *)
construction by using QLatin1String.

Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r32484 r32486  
     12008-04-24  Paul Olav Tvete <paul@trolltech.com>
     2
     3        Reviewed by Simon.
     4
     5        Fix various compiler warnings related to QString(const char *)
     6        construction by using QLatin1String.
     7
     8        * bridge/qt/qt_instance.cpp:
     9        (KJS::Bindings::QtField::valueFromInstance):
     10        (KJS::Bindings::QtField::setValueToInstance):
     11        * dom/XMLTokenizer.cpp:
     12        (WebCore::):
     13        * platform/graphics/qt/PathQt.cpp:
     14        (WebCore::Path::debugString):
     15
    1162008-04-24  Morten Johan Sørvig  <msorvig@trolltech.com>
    217
  • trunk/WebCore/bridge/qt/qt_instance.cpp

    r32392 r32486  
    379379        return ret;
    380380    } else {
    381         QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(name());
     381        QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name()));
    382382        return throwError(exec, GeneralError, msg.toLatin1().constData());
    383383    }
     
    404404            obj->setProperty(m_dynamicProperty.constData(), val);
    405405    } else {
    406         QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(name());
     406        QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name()));
    407407        throwError(exec, GeneralError, msg.toLatin1().constData());
    408408    }
  • trunk/WebCore/dom/XMLTokenizer.cpp

    r31860 r32486  
    16901690#else
    16911691    QXmlStreamReader stream;
    1692     QString dummy = QString("<?xml version=\"1.0\"?><attrs %1 />").arg(string);
     1692    QString dummy = QString(QLatin1String("<?xml version=\"1.0\"?><attrs %1 />")).arg(string);
    16931693    stream.addData(dummy);
    16941694    while (!stream.atEnd()) {
     
    20942094
    20952095    //qDebug() << dtd << name << publicId << systemId;
    2096     if ((publicId == "-//W3C//DTD XHTML 1.0 Transitional//EN")
    2097         || (publicId == "-//W3C//DTD XHTML 1.1//EN")
    2098         || (publicId == "-//W3C//DTD XHTML 1.0 Strict//EN")
    2099         || (publicId == "-//W3C//DTD XHTML 1.0 Frameset//EN")
    2100         || (publicId == "-//W3C//DTD XHTML Basic 1.0//EN")
    2101         || (publicId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")
    2102         || (publicId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN")
    2103         || (publicId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN")) {
     2096    if ((publicId == QLatin1String("-//W3C//DTD XHTML 1.0 Transitional//EN"))
     2097        || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1//EN"))
     2098        || (publicId == QLatin1String("-//W3C//DTD XHTML 1.0 Strict//EN"))
     2099        || (publicId == QLatin1String("-//W3C//DTD XHTML 1.0 Frameset//EN"))
     2100        || (publicId == QLatin1String("-//W3C//DTD XHTML Basic 1.0//EN"))
     2101        || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"))
     2102        || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"))
     2103        || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN"))) {
    21042104        setIsXHTMLDocument(true); // controls if we replace entities or not.
    21052105    }
  • trunk/WebCore/platform/graphics/qt/PathQt.cpp

    r29663 r32486  
    195195        switch (cur.type) {
    196196            case QPainterPath::MoveToElement:
    197                 ret += QString("M %1 %2").arg(cur.x).arg(cur.y);
     197                ret += QString(QLatin1String("M %1 %2")).arg(cur.x).arg(cur.y);
    198198                break;
    199199            case QPainterPath::LineToElement:
    200                 ret += QString("L %1 %2").arg(cur.x).arg(cur.y);
     200                ret += QString(QLatin1String("L %1 %2")).arg(cur.x).arg(cur.y);
    201201                break;
    202202            case QPainterPath::CurveToElement:
     
    208208                Q_ASSERT(c2.type == QPainterPath::CurveToDataElement);
    209209
    210                 ret += QString("C %1 %2 %3 %4 %5 %6").arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y);
     210                ret += QString(QLatin1String("C %1 %2 %3 %4 %5 %6")).arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y);
    211211
    212212                i += 2;
Note: See TracChangeset for help on using the changeset viewer.