Return a Promise when no callback is provided for a function call


This returns a Promise if Promise is supported and no callback
is provided.  The Promise resolves when the function call succeeds,
or rejects when it fails.

Change-Id: I529f5c2c0ff8997820f3d1b4d4b364cd8521e9b5
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
commitb4342f3567ec08a959f132bc1ef0c4f8eb89bcf8
parentd7ece941aebdac1be820fdfe74c273fb963dfcad
authorAndrew Webster <awebster@arcx.com>
committerMilian Wolff <milian.wolff@kdab.com>
commit timeWed, 10 Apr 2019 08:54:00 +0000