ubuntu: port to oxide
This commit is contained in:
parent
a40a10f1ea
commit
88b71b3a57
@ -21,9 +21,9 @@
|
||||
*
|
||||
*/
|
||||
import QtQuick 2.0
|
||||
import QtWebKit 3.0
|
||||
import Ubuntu.Components.Popups 0.1
|
||||
import Ubuntu.Components 0.1
|
||||
import com.canonical.Oxide 1.0
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -60,10 +60,9 @@ Rectangle {
|
||||
y: urlEntry.height
|
||||
height: parent.height - y
|
||||
url: url1
|
||||
onLoadingChanged: {
|
||||
if (loadRequest.status) {
|
||||
root.exec("InAppBrowser", "loadFinished", [loadRequest.status])
|
||||
}
|
||||
id: _view
|
||||
onLoadingStateChanged: {
|
||||
root.exec("InAppBrowser", "loadFinished", [_view.loading])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,14 +91,10 @@ void Inappbrowser::injectScriptCode(int, int, const QString&, bool) {
|
||||
qCritical() << "unimplemented " << __PRETTY_FUNCTION__;
|
||||
}
|
||||
|
||||
void Inappbrowser::loadFinished(int status) {
|
||||
if (status == 2) {
|
||||
this->callbackWithoutRemove(_eventCb, LOADERROR_EVENT);
|
||||
}
|
||||
if (status == 0) {
|
||||
void Inappbrowser::loadFinished(bool status) {
|
||||
if (status) {
|
||||
this->callbackWithoutRemove(_eventCb, LOADSTOP_EVENT);
|
||||
} else {
|
||||
this->callbackWithoutRemove(_eventCb, LOADSTART_EVENT);
|
||||
}
|
||||
if (status == 3) {
|
||||
this->callbackWithoutRemove(_eventCb, LOADSTOP_EVENT);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public slots:
|
||||
void injectScriptFile(int cb, int, const QString&, bool);
|
||||
void injectScriptCode(int cb, int, const QString&, bool);
|
||||
|
||||
void loadFinished(int status);
|
||||
void loadFinished(bool status);
|
||||
|
||||
private:
|
||||
int _eventCb;
|
||||
|
Loading…
Reference in New Issue
Block a user