diff --git a/CMakeLists.txt b/CMakeLists.txt index 614f00e..9bd1601 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,5 +9,10 @@ find_package(Qt5Sensors) find_package(Qt5Svg) find_package(Qt5Xml) +find_package(c++utilities) +find_package(qtutilities) +find_package(passwordfile) + add_executable(accelbubble main.cpp accelbubble.qrc) -target_link_libraries(accelbubble Qt5::Network Qt5::Quick Qt5::Sensors Qt5::Svg Qt5::Xml) +target_link_libraries(accelbubble c++utilities qtutilities passwordfile Qt5::Network Qt5::Quick Qt5::Sensors Qt5::Svg Qt5::Xml) +set_target_properties(accelbubble PROPERTIES CXX_STANDARD 14) diff --git a/accelbubble.pro b/accelbubble.pro index 39941b0..0dba7cf 100644 --- a/accelbubble.pro +++ b/accelbubble.pro @@ -2,6 +2,9 @@ TEMPLATE = app TARGET = accelbubble QT += network quick sensors svg xml SOURCES = main.cpp +CONFIG += c++14 + +LIBS += -lc++utilities -lqtutilities -lpasswordfile RESOURCES += \ accelbubble.qrc diff --git a/accelbubble.qml b/accelbubble.qml index 511edac..1006595 100644 --- a/accelbubble.qml +++ b/accelbubble.qml @@ -76,7 +76,7 @@ Kirigami.ApplicationWindow { ColumnLayout { Label { - text: "Using QQC2 and Kirigami" + text: "Using QQC2, Kirigami and own libs" } Label { text: "IP-Address: " + ipAddr diff --git a/main.cpp b/main.cpp index a5e61cc..e380eb3 100644 --- a/main.cpp +++ b/main.cpp @@ -55,6 +55,12 @@ #include #include +#include +#include +#include + +using namespace ApplicationUtilities; + void ignoreSslErrors(QNetworkReply *reply, const QList &errors) { reply->ignoreSslErrors(errors); @@ -62,6 +68,15 @@ void ignoreSslErrors(QNetworkReply *reply, const QList &errors) int main(int argc, char *argv[]) { + Util::OpenSsl::init(); + + QtConfigArguments qtConfigArgs; + qtConfigArgs.qtQuickGuiArg().setImplicit(true); + ArgumentParser parser; + parser.setDefaultArgument(&qtConfigArgs.qtQuickGuiArg()); + parser.setMainArguments({&qtConfigArgs.qtQuickGuiArg()}); + //parser.parseArgsOrExit(argc, argv); + QGuiApplication app(argc,argv); QNetworkAccessManager networkAccessManager; @@ -77,5 +92,7 @@ int main(int argc, char *argv[]) engine.load(QUrl("qrc:///accelbubble.qml")); }); + Util::OpenSsl::clean(); + return app.exec(); }