Skip to content
  • 0 Votes
    5 Posts
    1k Views
    CybeXC
    @VRonin Quite right - infact 101% correct. However, and you can correct me if I am wrong, but these mapped functions can be used for more than just transforming the datatype into another datatype. It does not always need to be 'instance based'. Let me explain what I mean (and what my thought process is) In Java (lang level 8), there is the introduction of the Stream API with a bunch of additional features such as lambdas, etc. One particularly useful example is something like List<SomeClass> list = ... list.stream().map(o -> o.someMember).filter(o -> o.value < 2).collect(Collectors.asList()); Now this simply takes an object (of type List), and runs a mapping functions (returning a stream object) and running a filter function on it (returning another stream object) followed by collecting all objects into a list. Now, my intention, specifically in this case is to utilize the filter & map functions similarly, but due to its design (QtConcurrent functions), I am breaking these functions up with signals (and slots) everywhere. This isn't part of the question, but for my own curiosity, if one had to mimik functions like this above, is there a...shorter way of doing the same thing rather than QFuture<SomeStruct> future = ... QFutureWatcher<SomeStruct> ... connect( //futurewatcher signal started with whatever) connect( //futurewatcher signal finished with whatever) QFutureWatcher::setFuture(future) ... just for one part of the function (i.e. mapping or filter)
  • 0 Votes
    3 Posts
    5k Views
    xenovasX
    @sergitab94 Sorry for this reply I know this is an old post, but I followed your steps one by one but still my build fails. Anyway opennssl static build with Qt really frustrated me... C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install qinstall C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\mkspecs\winrt-x86-msvc2015 C:\Qt\Static5113OpenSSL\StaticOpenSSL64\mkspecs\winrt-x86-msvc2015 C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install qinstall C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\mkspecs\winrt-x86-msvc2017 C:\Qt\Static5113OpenSSL\StaticOpenSSL64\mkspecs\winrt-x86-msvc2017 mingw32-make[1]: Target 'install' not remade because of errors. mingw32-make[1]: Leaving directory 'C:/Qt/Static5113OpenSSL/src/qt-everywhere-src-5.11.3/qtbase' mingw32-make: *** [Makefile:92: module-qtbase-install_subtargets] Error 2 mingw32-make: Target 'install' not remade because of errors.
  • 0 Votes
    5 Posts
    2k Views
    K
    @mrjj Thank you for your tip. Its great help for a QT and C++ beginner. I'll try to implement the logic you mentioned.