~osomon/webbrowser-app/ua-override

« back to all changes in this revision

Viewing changes to src/app/webbrowser-app.cpp

  • Committer: Tarmac
  • Author(s): Olivier Tilloy
  • Date: 2013-08-06 13:27:54 UTC
  • mfrom: (268.3.1 webbrowser-app)
  • Revision ID: tarmac-20130806132754-1n9wv9q02nkcorsu
Cosmetics, for increased consistency across the code base.

Approved by Günter Schwann, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
    m_window = qobject_cast<QQuickWindow*>(browser);
106
106
    browser->setProperty("chromeless", m_arguments->chromeless());
107
107
    browser->setProperty("developerExtrasEnabled", m_arguments->remoteInspector());
 
108
    browser->setProperty("webapp", m_arguments->webapp());
108
109
    browser->setProperty("webappName", m_arguments->webappName());
109
 
    browser->setProperty("webapp", m_arguments->webapp());
110
110
 
111
111
    // Set the desired pixel ratio (not needed once we use Qt's way of calculating
112
112
    // the proper pixel ratio by device/screen)
113
113
    float webkitDpr = getQtWebkitDpr();
114
114
    browser->setProperty("qtwebkitdpr", webkitDpr);
115
115
 
116
 
    // When a webapp is being launched (by name), the url
117
 
    //  is pulled from the webapp 'homepage'.
118
 
    QUrl url = m_arguments->url();
119
 
    if ( ! m_arguments->webappName().isEmpty())
120
 
        url = QUrl();
 
116
    // When a webapp is being launched (by name), the url is pulled from its 'homepage'.
 
117
    QUrl url;
 
118
    if (m_arguments->webappName().isEmpty()) {
 
119
        url = m_arguments->url();
 
120
    }
121
121
 
122
122
    QMetaObject::invokeMethod(browser, "newTab",
123
123
                              Q_ARG(QVariant, url),