~oxide-developers/oxide/oxide.trunk

« back to all changes in this revision

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

  • Committer: Chris Coulson
  • Date: 2015-02-11 13:56:28 UTC
  • mfrom: (947.1.1 oxide)
  • Revision ID: chris.coulson@canonical.com-20150211135628-1pp0vq6dxek16qze
Adapt to behaviour change in handling of QVariants from QML to C++ in Qt 5.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
  OxideQQuickScriptMessageRequest* request =
194
194
      new OxideQQuickScriptMessageRequest();
195
195
 
196
 
  if (!d->sendMessage(context, msg_id, args,
 
196
  QVariant aux = args;
 
197
  if (aux.userType() == qMetaTypeId<QJSValue>()) {
 
198
    aux = aux.value<QJSValue>().toVariant();
 
199
  }
 
200
 
 
201
  if (!d->sendMessage(context, msg_id, aux,
197
202
                      OxideQQuickScriptMessageRequestPrivate::get(request))) {
198
203
    delete request;
199
204
    return nullptr;
207
212
                                             const QVariant& args) {
208
213
  Q_D(OxideQQuickWebFrame);
209
214
 
210
 
  d->sendMessageNoReply(context, msg_id, args);
 
215
  QVariant aux = args;
 
216
  if (aux.userType() == qMetaTypeId<QJSValue>()) {
 
217
    aux = aux.value<QJSValue>().toVariant();
 
218
  }
 
219
 
 
220
  d->sendMessageNoReply(context, msg_id, aux);
211
221
}