| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JS file lives in the src/webchannel directory, and there
is a QMake magic in place to copy it to the build directory. But
this mechanism fails when the example is run from the Qt binary
pkg, which does not include the sources. The JS file must be copied
to the build directory either manually or programmatically to run
the example.
Change-Id: Ib56d9348a8bf1a599e2db5235e0545cd7a8f3bb1
Task-number: QTBUG-46541
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The baseUrl that is used to connect to a WebSocket server is derived
from the query parameters set to the URL. These parameters are ignored
by the QDesktopServices::openUrl implementations specific to Windows
and OS X. Ubuntu uses the default implementation that retains
the query parameters. This means the browser instance will fail to open
the local file URL on Ubuntu because it includes the query parameters,
so query parameters should never be set.
Moreover, the example creates a QWebSocketServer instance, which is
available at ws://localhost:12345, so the it is safe to hardcode the
address in the JavaScript. The cleaner approach would be to use a
URLHandler as described in
http://doc.qt.io/qt-5/qdesktopservices.html#url-handlers, but that
complicates the example.
Change-Id: I5b5df2b7b816ce0bbfb16a85c036ed379616f04a
Task-number: QTBUG-46541
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
To fix issues related to example documentation and to follow Qt
convention, do the following changes:
- Rename examples/qwebchannel to examples/webchannel
- Move example-specific documentation to correct location(s)
- Include generic 'Running the Example' instructions
- Add the module name to example title, fix links
This ensures that example docs are built and the example manifest
file generated correctly.
Change-Id: I284e0b13db95a6738d72258735018b59156cc7da
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|