Changeset 80424 in webkit


Ignore:
Timestamp:
Mar 5, 2011 9:32:09 AM (13 years ago)
Author:
qi.2.zhang@nokia.com
Message:

2011-03-05 Qi Zhang <qi.2.zhang@nokia.com>

Reviewed by Laszlo Gombos.

[Qt] Mobile Devices should include Model and Firmware Version in Webkit Generated User Agent String
https://bugs.webkit.org/show_bug.cgi?id=48636

Add model infomation into user agent string when qtmobility is available, but only for symbian, Maemo and MeeGo.

  • WebCore.pri:
  • features.pri:

2011-03-05 Qi Zhang <qi.2.zhang@nokia.com>

Reviewed by Laszlo Gombos.

[Qt] Mobile Devices should include Model and Firmware Version in Webkit Generated User Agent String
https://bugs.webkit.org/show_bug.cgi?id=48636

Add model infomation into user agent string when qtmobility is available, but only for symbian, Maemo and MeeGo.

  • Api/qwebpage.cpp: (QWebPage::userAgentForUrl):
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80423 r80424  
     12011-03-05  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] Mobile Devices should include Model and Firmware Version in Webkit Generated User Agent String
     6        https://bugs.webkit.org/show_bug.cgi?id=48636
     7
     8        Add model infomation into user agent string when qtmobility is available, but only for symbian, Maemo and MeeGo.
     9
     10        * WebCore.pri:
     11        * features.pri:
     12
    1132011-03-05  Pavel Feldman  <pfeldman@chromium.org>
    214
  • trunk/Source/WebCore/WebCore.pri

    r79999 r80424  
    230230}
    231231
     232contains(DEFINES, ENABLE_QT_USERAGENT_DEVICEMODEL=1) {
     233     CONFIG *= mobility
     234     MOBILITY *= systeminfo
     235}
     236
    232237contains(DEFINES, ENABLE_QT_BEARER=1) {
    233238    # Bearer management is part of Qt 4.7, so don't accidentially
  • trunk/Source/WebCore/features.pri

    r80274 r80424  
    130130   CONFIG *= mobility
    131131   MOBILITY *= sensors
     132}
     133
     134# systeminfo support if QtMobility systeminfo module exists, but only for symbian, maemo and meego
     135symbian|maemo5|maemo6 {
     136    !CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_USERAGENT_DEVICEMODEL=.) {
     137        contains(MOBILITY_CONFIG, systeminfo) {
     138            DEFINES += QT_USERAGENT_DEVICEMODEL=1
     139        }
     140    }
    132141}
    133142
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r80319 r80424  
    141141#include <QX11Info>
    142142#endif
    143 
     143#if ENABLE(QT_USERAGENT_DEVICEMODEL)
     144#include <qsysteminfo.h>
     145#endif
    144146
    145147using namespace WebCore;
     
    37203722#elif defined Q_WS_QWS
    37213723        "QtEmbedded; "
     3724#elif defined Q_WS_MAEMO_5
     3725        "Maemo"
     3726#elif defined Q_WS_MAEMO_6
     3727        "MeeGo"
    37223728#elif defined Q_WS_WIN
    37233729        // Nothing
     
    38393845        firstPartTemp += QString::fromLatin1("SGI Irix");
    38403846#elif defined Q_OS_LINUX
     3847#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
    38413848
    38423849#if defined(__x86_64__)
     
    38463853#else
    38473854        firstPartTemp += QString::fromLatin1("Linux");
     3855#endif
    38483856#endif
    38493857
     
    38963904#endif
    38973905
     3906#if ENABLE(QT_USERAGENT_DEVICEMODEL)
     3907        // adding Model Number
     3908        QtMobility::QSystemDeviceInfo systemDeviceInfo;
     3909
     3910        QString model = systemDeviceInfo.model();
     3911        if (!model.isEmpty()) {
     3912            if (!firstPartTemp.endsWith("; "))
     3913                firstPartTemp += QString::fromLatin1("; ");
     3914            firstPartTemp += systemDeviceInfo.model();
     3915        }
     3916#endif
    38983917        firstPartTemp.squeeze();
    38993918        firstPart = firstPartTemp;
     
    39153934        QString thirdPartTemp;
    39163935        thirdPartTemp.reserve(150);
    3917 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
     3936#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
    39183937        thirdPartTemp += QLatin1String(" Mobile Safari/");
    39193938#else
  • trunk/Source/WebKit/qt/ChangeLog

    r80319 r80424  
     12011-03-05  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] Mobile Devices should include Model and Firmware Version in Webkit Generated User Agent String
     6        https://bugs.webkit.org/show_bug.cgi?id=48636
     7
     8        Add model infomation into user agent string when qtmobility is available, but only for symbian, Maemo and MeeGo.
     9
     10        * Api/qwebpage.cpp:
     11        (QWebPage::userAgentForUrl):
     12
    1132011-03-03  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
    214
Note: See TracChangeset for help on using the changeset viewer.