Changeset 56386 in webkit


Ignore:
Timestamp:
Mar 23, 2010 5:52:17 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-23 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Remove support for Qt v4.4
https://bugs.webkit.org/show_bug.cgi?id=36389

No new tests as there is no new functionality.

  • WebCore.pri:
  • WebCore.pro:
  • platform/network/qt/ResourceHandleQt.cpp: (WebCore::ResourceHandle::willLoadFromCache):
  • platform/qt/CookieJarQt.cpp: (WebCore::setCookies): (WebCore::cookies):
  • platform/qt/KURLQt.cpp: (WebCore::KURL::operator QUrl):
  • platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paintScrollCorner):
  • plugins/mac/PluginViewMac.cpp:

2010-03-23 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Remove support for Qt v4.4
https://bugs.webkit.org/show_bug.cgi?id=36389

  • Api/qwebelement.cpp: (QWebElement::classes):
  • Api/qwebpage.cpp: (QWebPagePrivate::editorActionForKeyEvent): (QWebPage::userAgentForUrl):
  • WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::handleKeyboardEvent):
  • tests/tests.pro:

2010-03-23 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Remove support for Qt v4.4
https://bugs.webkit.org/show_bug.cgi?id=36389

  • DumpRenderTree/qt/main.cpp: (main):
  • QtLauncher/mainwindow.cpp: (MainWindow::MainWindow):
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56385 r56386  
     12010-03-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Remove support for Qt v4.4
     6        https://bugs.webkit.org/show_bug.cgi?id=36389
     7
     8        No new tests as there is no new functionality.
     9
     10        * WebCore.pri:
     11        * WebCore.pro:
     12        * platform/network/qt/ResourceHandleQt.cpp:
     13        (WebCore::ResourceHandle::willLoadFromCache):
     14        * platform/qt/CookieJarQt.cpp:
     15        (WebCore::setCookies):
     16        (WebCore::cookies):
     17        * platform/qt/KURLQt.cpp:
     18        (WebCore::KURL::operator QUrl):
     19        * platform/qt/ScrollbarThemeQt.cpp:
     20        (WebCore::ScrollbarThemeQt::paintScrollCorner):
     21        * plugins/mac/PluginViewMac.cpp:
     22
    1232010-03-23  Kent Tamura  <tkent@chromium.org>
    224
  • trunk/WebCore/WebCore.pri

    r56292 r56386  
    9999# XSLT support with QtXmlPatterns
    100100!contains(DEFINES, ENABLE_XSLT=.) {
    101     contains(QT_CONFIG, xmlpatterns):!lessThan(QT_MINOR_VERSION, 5):DEFINES += ENABLE_XSLT=1
     101    contains(QT_CONFIG, xmlpatterns):DEFINES += ENABLE_XSLT=1
    102102    else:DEFINES += ENABLE_XSLT=0
    103103}
  • trunk/WebCore/WebCore.pro

    r56292 r56386  
    28882888}
    28892889
    2890 CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) {
    2891     # start with 4.5
     2890CONFIG(QTDIR_build) {
    28922891    # Remove the following 2 lines if you want debug information in WebCore
    28932892    CONFIG -= separate_debug_info
  • trunk/WebCore/platform/network/qt/ResourceHandleQt.cpp

    r55691 r56386  
    4646#include "qwebpage_p.h"
    4747
    48 #if QT_VERSION >= 0x040500
    4948#include <QAbstractNetworkCache>
    50 #endif
    5149#include <QCoreApplication>
    5250#include <QUrl>
     
    161159        return false;
    162160
    163 #if QT_VERSION >= 0x040500
    164161    QNetworkAccessManager* manager = QWebFramePrivate::kit(frame)->page()->networkAccessManager();
    165162    QAbstractNetworkCache* cache = manager->cache();
     
    175172
    176173    return false;
    177 #else
    178     return false;
    179 #endif
    180174}
    181175
  • trunk/WebCore/platform/qt/CookieJarQt.cpp

    r54707 r56386  
    6868
    6969    QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(QString(value).toAscii());
    70 #if QT_VERSION >= 0x040500
    7170    QList<QNetworkCookie>::Iterator it = cookies.begin();
    7271    while (it != cookies.end()) {
     
    7675            ++it;
    7776    }
    78 #endif
    7977    jar->setCookiesFromUrl(cookies, u);
    8078}
     
    9391    QStringList resultCookies;
    9492    foreach (QNetworkCookie networkCookie, cookies) {
    95 #if QT_VERSION >= 0x040500
    9693        if (networkCookie.isHttpOnly())
    9794            continue;
    98 #endif
    9995        resultCookies.append(QString::fromAscii(
    10096                             networkCookie.toRawForm(QNetworkCookie::NameAndValueOnly).constData()));
  • trunk/WebCore/platform/qt/KURLQt.cpp

    r53995 r56386  
    2828namespace WebCore {
    2929
    30 #if QT_VERSION < 0x040500
    31 static const char hexnumbers[] = "0123456789ABCDEF";
    32 static inline char toHex(char c)
    33 {
    34     return hexnumbers[c & 0xf];
    35 }
    36 #endif
    37 
    3830KURL::KURL(const QUrl& url)
    3931{
     
    4335KURL::operator QUrl() const
    4436{
    45 #if QT_VERSION < 0x040500
    46     unsigned length = m_string.length();
    47 
    48     QByteArray ba;
    49     ba.reserve(length);
    50 
    51     int path = -1;
    52     int host = m_string.find("://");
    53     if (host != -1) {
    54         host += 3;
    55 
    56         path = m_string.find('/', host);
    57     }
    58 
    59     for (unsigned i = 0; i < length; ++i) {
    60         const char chr = static_cast<char>(m_string[i]);
    61 
    62         switch (chr) {
    63             encode:
    64             case '{':
    65             case '}':
    66             case '|':
    67             case '\\':
    68             case '^':
    69             case '`':
    70                 ba.append('%');
    71                 ba.append(toHex((chr & 0xf0) >> 4));
    72                 ba.append(toHex(chr & 0xf));
    73                 break;
    74             case '[':
    75             case ']':
    76                 // special case: if this is the host part, don't encode
    77                 // otherwise, encode
    78                 if (host == -1 || (path != -1 && i >= path))
    79                     goto encode;
    80                 // fall through
    81             default:
    82                 ba.append(chr);
    83                 break;
    84         }
    85     }
    86 #else
    87     // Qt 4.5 or later
    88     // No need for special encoding
    8937    QString str = QString::fromRawData(reinterpret_cast<const QChar*>(m_string.characters()), m_string.length());
    9038    QByteArray ba = str.toUtf8();
    91 #endif
    9239
    9340    QUrl url = QUrl::fromEncoded(ba);
  • trunk/WebCore/platform/qt/ScrollbarThemeQt.cpp

    r53803 r56386  
    234234    }
    235235
    236 #if QT_VERSION < 0x040500
    237     context->fillRect(rect, QApplication::palette().color(QPalette::Normal, QPalette::Window), DeviceColorSpace);
    238 #else
    239236    StylePainter p(this, context);
    240237    if (!p.isValid())
     
    244241    option.rect = rect;
    245242    p.drawPrimitive(QStyle::PE_PanelScrollAreaCorner, option);
    246 #endif
    247243}
    248244
  • trunk/WebCore/plugins/mac/PluginViewMac.cpp

    r55432 r56386  
    7979#include "QWebPageClient.h"
    8080QT_BEGIN_NAMESPACE
    81 #if QT_VERSION < 0x040500
    82 extern Q_GUI_EXPORT WindowPtr qt_mac_window_for(const QWidget* w);
    83 #else
    8481extern Q_GUI_EXPORT OSWindowRef qt_mac_window_for(const QWidget* w);
    85 #endif
    8682QT_END_NAMESPACE
    8783#endif
  • trunk/WebKit/qt/Api/qwebelement.cpp

    r54421 r56386  
    865865
    866866    QStringList classes =  attribute(QLatin1String("class")).simplified().split(QLatin1Char(' '), QString::SkipEmptyParts);
    867 #if QT_VERSION >= 0x040500
    868867    classes.removeDuplicates();
    869 #else
    870     int n = classes.size();
    871     int j = 0;
    872     QSet<QString> seen;
    873     seen.reserve(n);
    874     for (int i = 0; i < n; ++i) {
    875         const QString& s = classes.at(i);
    876         if (seen.contains(s))
    877             continue;
    878         seen.insert(s);
    879         if (j != i)
    880             classes[j] = s;
    881         ++j;
    882     }
    883     if (n != j)
    884         classes.erase(classes.begin() + j, classes.end());
    885 #endif
    886868    return classes;
    887869}
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r56334 r56386  
    10561056        { QKeySequence::DeleteStartOfWord, QWebPage::DeleteStartOfWord },
    10571057        { QKeySequence::DeleteEndOfWord, QWebPage::DeleteEndOfWord },
    1058 #if QT_VERSION >= 0x040500
    10591058        { QKeySequence::InsertParagraphSeparator, QWebPage::InsertParagraphSeparator },
    10601059        { QKeySequence::InsertLineSeparator, QWebPage::InsertLineSeparator },
    1061 #endif
    10621060        { QKeySequence::SelectAll, QWebPage::SelectAll },
    10631061        { QKeySequence::UnknownKey, QWebPage::NoWebAction }
  • trunk/WebKit/qt/ChangeLog

    r56373 r56386  
     12010-03-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Remove support for Qt v4.4
     6        https://bugs.webkit.org/show_bug.cgi?id=36389
     7
     8        * Api/qwebelement.cpp:
     9        (QWebElement::classes):
     10        * Api/qwebpage.cpp:
     11        (QWebPagePrivate::editorActionForKeyEvent):
     12        (QWebPage::userAgentForUrl):
     13        * WebCoreSupport/EditorClientQt.cpp:
     14        (WebCore::EditorClientQt::handleKeyboardEvent):
     15        * tests/tests.pro:
     16
    1172010-03-22  Kent Hansen  <kent.hansen@nokia.com>
    218
  • trunk/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r54064 r56386  
    385385#endif // QT_NO_SHORTCUT
    386386        switch (kevent->windowsVirtualKeyCode()) {
    387 #if QT_VERSION < 0x040500
    388             case VK_RETURN:
    389 #ifdef QT_WS_MAC
    390                 if (kevent->shiftKey() || kevent->metaKey())
    391 #else
    392                 if (kevent->shiftKey())
    393 #endif
    394                     frame->editor()->command("InsertLineBreak").execute();
    395                 else
    396                     frame->editor()->command("InsertNewline").execute();
    397                 break;
    398 #endif
    399387            case VK_BACK:
    400388                frame->editor()->deleteWithDirection(SelectionController::BACKWARD,
  • trunk/WebKit/qt/tests/tests.pro

    r53611 r56386  
    22TEMPLATE = subdirs
    33SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap
    4 greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting benchmarks/loading
     4SUBDIRS += benchmarks/painting benchmarks/loading
  • trunk/WebKitTools/ChangeLog

    r56372 r56386  
     12010-03-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Remove support for Qt v4.4
     6        https://bugs.webkit.org/show_bug.cgi?id=36389
     7
     8        * DumpRenderTree/qt/main.cpp:
     9        (main):
     10        * QtLauncher/mainwindow.cpp:
     11        (MainWindow::MainWindow):
     12
    1132010-03-22  Csaba Osztrogonác  <ossy@webkit.org>
    214
  • trunk/WebKitTools/DumpRenderTree/qt/main.cpp

    r55082 r56386  
    115115#endif
    116116
    117 #if QT_VERSION >= 0x040500
    118117    QApplication::setGraphicsSystem("raster");
    119 #endif
    120 
    121118    QApplication::setStyle(new QWindowsStyle);
    122119
  • trunk/WebKitTools/QtLauncher/mainwindow.cpp

    r54721 r56386  
    4040{
    4141    setAttribute(Qt::WA_DeleteOnClose);
    42 #if QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)
    4342    if (qgetenv("QTLAUNCHER_USE_ARGB_VISUALS").toInt() == 1)
    4443        setAttribute(Qt::WA_TranslucentBackground);
    45 #endif
    4644
    4745    buildUI();
Note: See TracChangeset for help on using the changeset viewer.