Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70984

wasm: look into binding QString to javascript

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P4: Low
    • 5.15
    • None
    • QPA
    • None
    • WebAssembly
    • 0a4c5b5119ccefc355fe737f03ec330e70c33ec9

    Description

      It might be nice to be able to do something like:

      QString string =xhr["responseText"].as<QString>();

       

      instead of

      QString string = QString::fromStdWString(xhr["responseText"].as<std::wstring>());

      or from std::string and skip the conversion.

      https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html#advanced-class-concepts

       

      Things to consider:

      •  memory use
      • performance
      • do we really need to expose a whole class like QString?
      • ?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            lpotter Lorn Potter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes