Compare commits
1 Commits
master
...
test_own_l
Author | SHA1 | Date |
---|---|---|
Martchus | bbd0297cfb |
|
@ -9,5 +9,10 @@ find_package(Qt5Sensors)
|
||||||
find_package(Qt5Svg)
|
find_package(Qt5Svg)
|
||||||
find_package(Qt5Xml)
|
find_package(Qt5Xml)
|
||||||
|
|
||||||
|
find_package(c++utilities)
|
||||||
|
find_package(qtutilities)
|
||||||
|
find_package(passwordfile)
|
||||||
|
|
||||||
add_executable(accelbubble main.cpp accelbubble.qrc)
|
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
|
TARGET = accelbubble
|
||||||
QT += network quick sensors svg xml
|
QT += network quick sensors svg xml
|
||||||
SOURCES = main.cpp
|
SOURCES = main.cpp
|
||||||
|
CONFIG += c++14
|
||||||
|
|
||||||
|
LIBS += -lc++utilities -lqtutilities -lpasswordfile
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
accelbubble.qrc
|
accelbubble.qrc
|
||||||
|
|
|
@ -76,7 +76,7 @@ Kirigami.ApplicationWindow {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Label {
|
Label {
|
||||||
text: "Using QQC2 and Kirigami"
|
text: "Using QQC2, Kirigami and own libs"
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
text: "IP-Address: " + ipAddr
|
text: "IP-Address: " + ipAddr
|
||||||
|
|
17
main.cpp
17
main.cpp
|
@ -55,6 +55,12 @@
|
||||||
#include <QtNetwork/QNetworkAccessManager>
|
#include <QtNetwork/QNetworkAccessManager>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#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)
|
void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
{
|
{
|
||||||
reply->ignoreSslErrors(errors);
|
reply->ignoreSslErrors(errors);
|
||||||
|
@ -62,6 +68,15 @@ void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
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);
|
QGuiApplication app(argc,argv);
|
||||||
|
|
||||||
QNetworkAccessManager networkAccessManager;
|
QNetworkAccessManager networkAccessManager;
|
||||||
|
@ -77,5 +92,7 @@ int main(int argc, char *argv[])
|
||||||
engine.load(QUrl("qrc:///accelbubble.qml"));
|
engine.load(QUrl("qrc:///accelbubble.qml"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Util::OpenSsl::clean();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue