trebleshot / desktop

An Open-Source file sharing software for Linux, macOS and Windows allowing you to send and receive files over available connections, and pause and resume transfer process even when an error is given
GNU General Public License v2.0
33 stars 6 forks source link

Set up project in Qt Creator Community #17

Closed EmmanuelMess closed 5 years ago

EmmanuelMess commented 5 years ago

Are there any instructions to set up project in Qt Creator Commutiny?

velitasali commented 5 years ago

It uses CMake, so it is platform-independent. I am using CLion, but it should also work on Visual Studio and Qt Creator. Are you having an issue?

velitasali commented 5 years ago

BTW JetBrains offers a 1-year free subscription for college students that you can use for any license requiring IDE that they are offering. I am telling this because if you are familiar with Android Studio and similar, CLion is easy to get used to.

EmmanuelMess commented 5 years ago

Loaded it in CLion (I had it but though you had used CodeBlocks because of the "build_trebleshot.sh" file).

Thanks!

EmmanuelMess commented 5 years ago

Hey, sorry to bother you again, but I am having trouble installing the dependencies:

TrebleShot-Desktop/src/ui/FileAdditionProgressDialog.cpp:23:10: fatal error: QtCore/QRandomGenerator: No existe el archivo o el directorio

include <QtCore/QRandomGenerator>

^~~~~~~~~

"No existe el archivo o el directorio" tanslates to "The file or directory doesn't exist".

I can't seem to find a solution on the internet.

===================[ Build | trebleshot | Debug ]============================== /CLion/ch-0/191.7479.33/bin/cmake/linux/bin/cmake --build /TrebleShot-Desktop/cmake-build-debug --target trebleshot -- -j 2 [ 1%] Automatic MOC and UIC for target trebleshot [ 1%] Built target trebleshot_autogen [ 3%] Building CXX object CMakeFiles/trebleshot.dir/src/ui/FileAdditionProgressDialog.cpp.o [ 5%] Building CXX object CMakeFiles/trebleshot.dir/src/ui/MainWindow.cpp.o /TrebleShot-Desktop/src/ui/FileAdditionProgressDialog.cpp:23:10: fatal error: QtCore/QRandomGenerator: No existe el archivo o el directorio

include <QtCore/QRandomGenerator>

      ^~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. CMakeFiles/trebleshot.dir/build.make:433: recipe for target 'CMakeFiles/trebleshot.dir/src/ui/FileAdditionProgressDialog.cpp.o' failed make[3]: [CMakeFiles/trebleshot.dir/src/ui/FileAdditionProgressDialog.cpp.o] Error 1 make[3]: Se espera a que terminen otras tareas.... /TrebleShot-Desktop/src/ui/MainWindow.cpp:5:10: fatal error: QtCore/QRandomGenerator: No existe el archivo o el directorio

include <QtCore/QRandomGenerator>

      ^~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. CMakeFiles/trebleshot.dir/build.make:446: recipe for target 'CMakeFiles/trebleshot.dir/src/ui/MainWindow.cpp.o' failed make[3]: [CMakeFiles/trebleshot.dir/src/ui/MainWindow.cpp.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/trebleshot.dir/all' failed make[2]: [CMakeFiles/trebleshot.dir/all] Error 2 CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/trebleshot.dir/rule' failed make[1]: [CMakeFiles/trebleshot.dir/rule] Error 2 Makefile:164: recipe for target 'trebleshot' failed make: [trebleshot] Error 2

velitasali commented 5 years ago

Which Qt version are you using? It shouldn't be smaller than 5.10 because it is the version QtRandomGenerator was introduced.

EmmanuelMess commented 5 years ago

sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-bionic -y sudo apt-get -y install libkf5dnssd-dev qt511base cmake

Shows that qt511base is up to date.

Also:

cd /opt/qt/include/QtCore %pwd /opt/qt511/include/QtCore %find QRandom QRandomGenerator QRandomGenerator64

Shows that QRandomGenerator exists.

sudo add-apt-repository ppa:beineri/opt-qt-5.12.3-bionic -y sudo apt-get -y install libkf5dnssd-dev qt512base cmake

Has the same problem.

velitasali commented 5 years ago

Hm, could it be somehow targeting the Qt version that lives in the 16.04's universe, which, I am guessing, is 5.5.

Can you try running this command sudo apt autoremove qtbase5-dev ?

(mistakenly closed the issue, sorry about that :) )

EmmanuelMess commented 5 years ago

Fixed! Thanks!