Use own libs
This commit is contained in:
parent
76f6a3fdda
commit
bbd0297cfb
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
17
main.cpp
17
main.cpp
|
@ -55,6 +55,12 @@
|
|||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
||||
#include <c++utilities/application/argumentparser.h>
|
||||
#include <qtutilities/resources/qtconfigarguments.h>
|
||||
#include <passwordfile/util/openssl.h>
|
||||
|
||||
using namespace ApplicationUtilities;
|
||||
|
||||
void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||
{
|
||||
reply->ignoreSslErrors(errors);
|
||||
|
@ -62,6 +68,15 @@ void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue