print connection types

This commit is contained in:
Richard Ramos 2020-07-14 21:00:50 -04:00 committed by Michał
parent 2d556fbc42
commit 1d009fa376
2 changed files with 12 additions and 4 deletions

View File

@ -4,7 +4,7 @@ include(GNUInstallDirs)
# Macro for merging common code between static and shared # Macro for merging common code between static and shared
macro(add_target name type) macro(add_target name type)
find_package(Qt5 COMPONENTS Core Qml Gui Quick QuickControls2 Widgets Network) find_package(Qt5 COMPONENTS Core Qml Gui Quick QuickControls2 Widgets Network REQUIRED)
add_library(${name} ${type} add_library(${name} ${type}
include/DOtherSide/DOtherSideTypes.h include/DOtherSide/DOtherSideTypes.h
@ -38,10 +38,10 @@ macro(add_target name type)
target_include_directories(${name} PUBLIC include include/Qt) target_include_directories(${name} PUBLIC include include/Qt)
target_link_libraries(${name} PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Qml Qt5::Quick) target_link_libraries(${name} PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Qml Qt5::Quick Qt5::Network)
# for DOtherSide.pc # for DOtherSide.pc
set(PC_REQUIRES "Qt5Core, Qt5Gui, Qt5Widgets, Qt5Qml, Qt5Quick") set(PC_REQUIRES "Qt5Core, Qt5Gui, Qt5Widgets, Qt5Qml, Qt5Quick, Qt5Network, Qt5DBus")
if (${Qt5QuickControls2_FOUND}) if (${Qt5QuickControls2_FOUND})
target_link_libraries(${name} PRIVATE Qt5::QuickControls2) target_link_libraries(${name} PRIVATE Qt5::QuickControls2)
set(PC_REQUIRES "${PC_REQUIRES}, Qt5QuickControls2") set(PC_REQUIRES "${PC_REQUIRES}, Qt5QuickControls2")

View File

@ -1072,7 +1072,15 @@ void dos_qcoreapplication_process_events_timed(DosQEventLoopProcessEventFlag fla
::DosQNetworkConfigurationManager *dos_qncm_create() ::DosQNetworkConfigurationManager *dos_qncm_create()
{ {
return new QNetworkConfigurationManager(); auto *ncm = new QNetworkConfigurationManager();
auto netcfgList = ncm->allConfigurations(QNetworkConfiguration::Active);
for (auto& x : netcfgList) {
qDebug() << "Connection type: " << x.bearerType() << " - name: " << x.name() << " -purpose: " << x.purpose();
}
return ncm;
} }
void dos_qncm_delete(::DosQNetworkConfigurationManager *vptr) void dos_qncm_delete(::DosQNetworkConfigurationManager *vptr)