Fixed bug with incomplete QBuffer opening procedure

When trying to run sample code on Qt 5.3 got a bunch of errors:

    QBuffer::open: Buffer access not specified
    QIODevice::write: device not open
    QIODevice::seek: The device is not open
    QBuffer::open: Buffer access not specified

Figured out why this happens and fixed this with simply specifying QJson to open QBuffer as a text.

And yeah, added some files and directories appearing during the sample compilation to gitignore.