~osomon/oxide/context-menu

« back to all changes in this revision

Viewing changes to qt/quick/api/oxideqquickscriptmessage.cc

  • Committer: Olivier Tilloy
  • Date: 2015-04-24 11:34:28 UTC
  • mfrom: (1031.1.24 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20150424113428-r221y8t5hv083t0n
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
OxideQQuickWebFrame* OxideQQuickScriptMessage::frame() const {
51
51
  Q_D(const OxideQQuickScriptMessage);
52
52
 
53
 
  return OxideQQuickWebFramePrivate::fromProxyHandle(d->proxy()->frame());
 
53
  oxide::qt::WebFrameProxyHandle* f = d->proxy()->frame();
 
54
  if (!f) {
 
55
    return nullptr;
 
56
  }
 
57
 
 
58
  return OxideQQuickWebFramePrivate::fromProxyHandle(f);
54
59
}
55
60
 
56
61
QUrl OxideQQuickScriptMessage::context() const {
74
79
void OxideQQuickScriptMessage::reply(const QVariant& args) {
75
80
  Q_D(OxideQQuickScriptMessage);
76
81
 
77
 
  d->proxy()->reply(args);
 
82
  QVariant aux = args;
 
83
  if (aux.userType() == qMetaTypeId<QJSValue>()) {
 
84
    aux = aux.value<QJSValue>().toVariant();
 
85
  }
 
86
 
 
87
  d->proxy()->reply(aux);
78
88
}
79
89
 
80
90
void OxideQQuickScriptMessage::error(const QString& msg) {