Sunday, 2020-01-19

*** zbenjamin_ is now known as zbenjamin02:30
*** frinring_ is now known as frinring06:27
attahDear Qt wizards... let's say i have an QProcess, and by virtue of being a QIODevice i want to pass it to QNetworkAccessManager::post(), but i need to prepend some data... is there some good way to do that?11:14
attahI could probably do it in the program running in the QProcess, but that feels unnecessarily fragile11:15
Nico[m]Maybe you could add a proxy IODevice, that first returns the prepended data and then reads from the other IODevice?11:18
attahYeah, that's what i was looking for... but that would involve writing a read loop that is forwarding the data?11:19
attahThat sounds inefficient with the volumes i want to process11:20
attahOr wait... maybe i don't have to11:20
attahi guess just calling the second stream's read function would do11:21
Nico[m]Couldn't you just create one IODevice per process? Or do you want to prepend the output from the same process multiple times?11:22
attahNot sure i understand... i have one QByteArray, and will add a QProcess, the output data of which i want to append to the array, and pass to a http request as one contiguous piece of data11:23
attahthey can both be treated as single use if that helps11:24
Nico[m]Then just implement your own IODevice, that on read first reads from the Array and when that is empty, reads from the process11:25
Nico[m]I don't think you need a loop there11:25
attahhopefully not, i'll try11:25
attahjust realized, i can test without the process, and just a file... should have the same effect and less other issues11:26
*** JohanSmits[m] is now known as johansmitsnl11:37
attahIt's official, c++ and me don't mix... I can't instantiate the subclass because certain functions are protected, and i can't forward them to the other IODevice, because they are protected12:45
Nico[m]The constructor is protected?13:22
attahNico[m]: Sorry, went out for a bit... no, i don't think so, but other functions that i need to implement, are still not public on the other derived classes14:47
Nico[m]Hm, which functions? If they are not public on the other derived classes, are you sure you need to implement them?14:49
attahreadData for example14:50
attahwell, if they are are virtual in my derived class, i cannot make an instance14:50
attahpure virtual14:50
Nico[m]Couldn't you inplement readData in terms of read from Process and Array?14:52
attahyes, i too just realized read is very similar... let's see if it flies14:52
attahin other news... when i was out i printed a pre-encoded file to a AirPrint-only printer14:55
attahnot even Android do that afaik14:56
Nico[m]Woah, nice!14:56
attahYeah... i have to give up for the time being, it just hangs when i pass it my class, as if it is waiting for something17:45
*** flipper-maniac_ is now known as flipper-maniac20:08

Generated by 2.17.1 by Marius Gedminas - find it at!