Changeset 64297 in webkit


Ignore:
Timestamp:
Jul 29, 2010 11:44:37 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-07-29 Antonio Gomes <tonikitoo@webkit.org>

Reviewed by Kenneth Christiansen.

[Qt] QtTestBrowser: Move WebPage class methods definitions from main.cpp to webpage.cpp
https://bugs.webkit.org/show_bug.cgi?id=43199

There is no sense in keeping WebPage method definitions in main.cpp once
webpage.cpp already exists.

No behavior change.

  • QtTestBrowser/main.cpp:
  • QtTestBrowser/webpage.cpp: (WebPage::createWindow): (WebPage::createPlugin):
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r64291 r64297  
     12010-07-29  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] QtTestBrowser: Move WebPage class methods definitions from main.cpp to webpage.cpp
     6        https://bugs.webkit.org/show_bug.cgi?id=43199
     7
     8        There is no sense in keeping WebPage method definitions in main.cpp once
     9        webpage.cpp already exists.
     10
     11        No behavior change.
     12
     13        * QtTestBrowser/main.cpp:
     14        * QtTestBrowser/webpage.cpp:
     15        (WebPage::createWindow):
     16        (WebPage::createPlugin):
     17
    1182010-07-29  Antonio Gomes  <tonikitoo@webkit.org>
    219
  • trunk/WebKitTools/QtTestBrowser/main.cpp

    r64291 r64297  
    3434#include "urlloader.h"
    3535
    36 QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
    37 {
    38     LauncherWindow* mw = new LauncherWindow;
    39     if (type == WebModalDialog)
    40         mw->setWindowModality(Qt::ApplicationModal);
    41     mw->show();
    42     return mw->page();
    43 }
    44 
    45 QObject* WebPage::createPlugin(const QString &classId, const QUrl&, const QStringList&, const QStringList&)
    46 {
    47     if (classId == "alien_QLabel") {
    48         QLabel* l = new QLabel;
    49         l->winId();
    50         return l;
    51     }
    52 
    53 #ifndef QT_NO_UITOOLS
    54     QUiLoader loader;
    55     return loader.createWidget(classId, view());
    56 #else
    57     Q_UNUSED(classId);
    58     return 0;
    59 #endif
    60 }
    61 
    6236int launcherMain(const QApplication& app)
    6337{
  • trunk/WebKitTools/QtTestBrowser/webpage.cpp

    r63921 r64297  
    3333#include "webpage.h"
    3434
     35#include "launcherwindow.h"
     36
    3537#include <QAuthenticator>
    3638#include <QDesktopServices>
     
    186188{
    187189}
     190
     191QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
     192{
     193    LauncherWindow* mw = new LauncherWindow;
     194    if (type == WebModalDialog)
     195        mw->setWindowModality(Qt::ApplicationModal);
     196    mw->show();
     197    return mw->page();
     198}
     199
     200QObject* WebPage::createPlugin(const QString &classId, const QUrl&, const QStringList&, const QStringList&)
     201{
     202    if (classId == "alien_QLabel") {
     203        QLabel* l = new QLabel;
     204        l->winId();
     205        return l;
     206    }
     207
     208#ifndef QT_NO_UITOOLS
     209    QUiLoader loader;
     210    return loader.createWidget(classId, view());
     211#else
     212    Q_UNUSED(classId);
     213    return 0;
     214#endif
     215}
     216
Note: See TracChangeset for help on using the changeset viewer.