Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Add bindings for QML#11

Closed
rschroll wants to merge 4 commits into
nikhilm:masterfrom
rschroll:master
Closed

Add bindings for QML#11
rschroll wants to merge 4 commits into
nikhilm:masterfrom
rschroll:master

Conversation

@rschroll

Copy link
Copy Markdown

These commits add support for using QHttpServer from QML, which is either awesome or insane. I'm undecided as to which, but if you think it's the former, here's a pull request.

The first two commits are necessary to get everything working with Qt5. If you'd prefer, I could split them out into a separate pull request.

There probably needs to be something done to get the QML bindings to install. I'm new to Qt, so I don't know what that is. Right now, it will run from the build directory just fine.

Based on a patch by Sebastian Wallat:
swallat@196bcf1
In addition to adding the necessary boilerplate, we also add a new
version of QHttpServer::listen(), in which the address can be given as a
string.  This can be used from QML, which doesn't have any equivalent
for QHostAddress.
@nikhilm

nikhilm commented Aug 16, 2013

Copy link
Copy Markdown
Owner

This is great work! Would it be possible to split the qt5 changes into a separate branch?

What I'd like to do is merge the Qt5 changes into a qt5 branch, so that master isn't changed while Qt5 is pretty new.

As for the QML changes, is it possible to keep that separate from qhttpserver, that is, a separate project, which can be linked with qhttpserver at build time?

@rschroll

Copy link
Copy Markdown
Author

On Fri, Aug 16, 2013 at 1:38 AM, Nikhil Marathe
[email protected] wrote:

This is great work! Would it be possible to split the qt5 changes
into a separate branch?

What I'd like to do is merge the Qt5 changes into a qt5 branch, so
that master isn't changed while Qt5 is pretty new.

It's certainly possible to split them into another branch. But two
things to note before we do that:

  • I don't know if the QML bindings will work with Qt4. From what I
    gather, there were some big changes in how QML works between 4 and 5.
    It may be that there's no point in having the QML stuff available for
    Qt4. (But then again, it might work.)
  • These changes should be back-compatible with Qt4. The to/fromLatin1
    methods exist in Qt4, as does QTcpSocket.disconnectFromHost(). If they
    do indeed work with Qt4, I don't see the point of maintaining two
    branches.

As for the QML changes, is it possible to keep that separate from
qhttpserver, that is, a separate project, which can be linked with
qhttpserver at build time?

Probably, but I'm new to Qt and don't know how offhand. The existing
classes need some minor changes (mainly marking methods with
Q_INVOKABLE). If those are kept, the plugin class could go into its
own project. But I'm not sure I see the point of doing things this way.

@nikhilm nikhilm closed this Jan 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants