Changeset 51558 in webkit


Ignore:
Timestamp:
Dec 1, 2009 2:05:02 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-01 Daniel Bates <dbates@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

https://bugs.webkit.org/show_bug.cgi?id=31898

Makes QtLauncher default to the http scheme for URLs.

  • QtLauncher/main.cpp: (MainWindow::MainWindow): (MainWindow::changeLocation): (main):
Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r51515 r51558  
     12009-12-01  Daniel Bates  <dbates@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=31898
     6
     7        Makes QtLauncher default to the http scheme for URLs.
     8
     9        * QtLauncher/main.cpp:
     10        (MainWindow::MainWindow):
     11        (MainWindow::changeLocation):
     12        (main):
     13
    1142009-11-30  Abhinav Mithal  <abhinav.mithal@nokia.com>
    215
  • trunk/WebKit/qt/QtLauncher/main.cpp

    r51174 r51558  
    188188
    189189        QUrl qurl = urlFromUserInput(url);
     190        if (qurl.scheme().isEmpty())
     191            qurl = QUrl("http://" + url + "/");
    190192        if (qurl.isValid()) {
    191193            urlEdit->setText(qurl.toEncoded());
    192194            view->load(qurl);
    193 
    194195        }
    195196
     
    213214        QString string = urlEdit->text();
    214215        QUrl url = urlFromUserInput(string);
    215         if (!url.isValid())
     216        if (url.scheme().isEmpty())
    216217            url = QUrl("http://" + string + "/");
    217         urlEdit->setText(url.toEncoded());
    218         view->load(url);
    219         view->setFocus(Qt::OtherFocusReason);
     218        if (url.isValid()) {
     219            urlEdit->setText(url.toEncoded());
     220            view->load(url);
     221            view->setFocus(Qt::OtherFocusReason);
     222        }
    220223    }
    221224
     
    563566{
    564567    QApplication app(argc, argv);
    565     QString url = QString("%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
     568    QString url = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
    566569
    567570    QWebSettings::setMaximumPagesInCache(4);
Note: See TracChangeset for help on using the changeset viewer.