mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
-Fix ICE/STUN connexion and saving state
-Remove error on warning for building SDK -Add missing files in Qt ressources
This commit is contained in:
parent
8327878c70
commit
fd2b1d22d3
5 changed files with 54 additions and 50 deletions
|
|
@ -109,6 +109,7 @@ if (NOT WIN32)
|
|||
-Wall \
|
||||
-Wcast-align \
|
||||
-Wconversion \
|
||||
-Wno-error=conversion \
|
||||
-Werror=return-type \
|
||||
-Wextra \
|
||||
-Wfloat-equal \
|
||||
|
|
@ -117,14 +118,16 @@ if (NOT WIN32)
|
|||
-Woverloaded-virtual \
|
||||
-Wpointer-arith \
|
||||
-Wsign-conversion \
|
||||
-Wno-error=sign-conversion \
|
||||
-Wuninitialized \
|
||||
-Wunused \
|
||||
-Wno-error=float-equal \
|
||||
")
|
||||
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wlogical-op")
|
||||
endif ()
|
||||
if (SUGGEST_OVERRIDE)
|
||||
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wsuggest-override -Werror=suggest-override")
|
||||
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wsuggest-override")
|
||||
endif ()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wno-switch")
|
||||
|
|
@ -403,15 +406,6 @@ else()
|
|||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/views")
|
||||
|
||||
|
||||
set(QML_IMPORT_PATH ${_QML_IMPORT_PATHS} CACHE STRING "Path used to locate CMake modules by Qt Creator" FORCE)
|
||||
|
||||
|
||||
set(_QML_IMPORT_PATHS "")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/modules")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/dev-modules")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/scripts")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/views")
|
||||
|
||||
set(QML_IMPORT_PATH ${_QML_IMPORT_PATHS} CACHE STRING "Path used to locate CMake modules by Qt Creator" FORCE)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -36,17 +36,17 @@ mkdir -p build-desktop
|
|||
#Opus crash on Linux. The version for 4.3 is old. We have to use a switch in configuration to select the newest version for desktop.
|
||||
#SDK building
|
||||
cd build-desktop
|
||||
cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=YES -DENABLE_GPL_THIRD_PARTIES=YES -DENABLE_NON_FREE_CODECS=YES -DENABLE_AMRNB=YES -DENABLE_AMRWB=YES -DENABLE_G729=YES -DENABLE_GSM=YES -DENABLE_ILBC=YES -DENABLE_ISAC=YES -DENABLE_SILK=YES -DENABLE_SPEEX=YES -DENABLE_H263=YES -DENABLE_H263P=YES -DENABLE_MPEG4=YES -DENABLE_OPENH264=YES -DENABLE_FFMPEG=YES -DENABLE_VIDEO=YES -DENABLE_GL=YES -DENABLE_OPUS=NO
|
||||
#cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
#cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=YES -DENABLE_GPL_THIRD_PARTIES=YES -DENABLE_NON_FREE_CODECS=YES -DENABLE_AMRNB=YES -DENABLE_AMRWB=YES -DENABLE_G729=YES -DENABLE_GSM=YES -DENABLE_ILBC=YES -DENABLE_ISAC=YES -DENABLE_SILK=YES -DENABLE_SPEEX=YES -DENABLE_H263=YES -DENABLE_H263P=YES -DENABLE_MPEG4=YES -DENABLE_OPENH264=YES -DENABLE_FFMPEG=YES -DENABLE_VIDEO=YES -DENABLE_GL=YES -DENABLE_OPUS=NO
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_WSI_WAYLAND_SUPPORT=OFF
|
||||
cmake --build . --target all --config RelWithDebInfo --parallel 10
|
||||
|
||||
#MiniZip Building
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_WSI_WAYLAND_SUPPORT=OFF
|
||||
cmake --build . --target minizip --config RelWithDebInfo --parallel 10
|
||||
cmake --build . --target install
|
||||
|
||||
#Desktop Building
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_WSI_WAYLAND_SUPPORT=OFF
|
||||
cmake --build . --target all --config RelWithDebInfo --parallel 10
|
||||
cmake --build . --target install
|
||||
|
||||
|
|
|
|||
|
|
@ -478,5 +478,7 @@
|
|||
<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
|
||||
<file>assets/images/linphone_logo.svg</file>
|
||||
<file>ui/views/App/Main/MainWindowTopMenuBar.qml</file>
|
||||
<file>ui/dev-modules/Colors/Colors.qml</file>
|
||||
<file>ui/dev-modules/Units/Units.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
|||
|
|
@ -52,54 +52,54 @@ namespace linphone {
|
|||
}
|
||||
|
||||
class Colors : public QObject {
|
||||
Q_OBJECT;
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QStringList colorNames READ getColorNames CONSTANT);
|
||||
Q_PROPERTY(QStringList colorNames READ getColorNames CONSTANT)
|
||||
|
||||
ADD_COLOR(a, "transparent");
|
||||
ADD_COLOR(a, "transparent")
|
||||
|
||||
// Primary color for hovered items.
|
||||
ADD_COLOR(b, "#D64D00");
|
||||
ADD_COLOR(b, "#D64D00")
|
||||
|
||||
ADD_COLOR(c, "#CBCBCB");
|
||||
ADD_COLOR(d, "#5A585B");
|
||||
ADD_COLOR(e, "#F3F3F3");
|
||||
ADD_COLOR(f, "#E8E8E8");
|
||||
ADD_COLOR(g, "#6B7A86");
|
||||
ADD_COLOR(h, "#687680");
|
||||
ADD_COLOR(c, "#CBCBCB")
|
||||
ADD_COLOR(d, "#5A585B")
|
||||
ADD_COLOR(e, "#F3F3F3")
|
||||
ADD_COLOR(f, "#E8E8E8")
|
||||
ADD_COLOR(g, "#6B7A86")
|
||||
ADD_COLOR(h, "#687680")
|
||||
|
||||
// Primary color.
|
||||
ADD_COLOR(i, "#FE5E00");
|
||||
ADD_COLOR(i, "#FE5E00")
|
||||
|
||||
ADD_COLOR(j, "#4B5964");
|
||||
ADD_COLOR(j, "#4B5964")
|
||||
|
||||
// Popups, home, call, assistant and settings background.
|
||||
ADD_COLOR(k, "#FFFFFF");
|
||||
ADD_COLOR(k, "#FFFFFF")
|
||||
|
||||
ADD_COLOR(l, "#000000");
|
||||
ADD_COLOR(l, "#000000")
|
||||
|
||||
// Primary color for clicked items.
|
||||
ADD_COLOR(m, "#FF8600");
|
||||
ADD_COLOR(m, "#FF8600")
|
||||
|
||||
ADD_COLOR(n, "#A1A1A1");
|
||||
ADD_COLOR(o, "#D0D8DE");
|
||||
ADD_COLOR(n, "#A1A1A1")
|
||||
ADD_COLOR(o, "#D0D8DE")
|
||||
|
||||
// Progress bar.
|
||||
ADD_COLOR(p, "#17A81A");
|
||||
ADD_COLOR(p, "#17A81A")
|
||||
|
||||
// Fields, backgrounds and text color on some items.
|
||||
ADD_COLOR(q, "#FFFFFF");
|
||||
ADD_COLOR(q, "#FFFFFF")
|
||||
|
||||
// Field error.
|
||||
ADD_COLOR(error, "#FF0000");
|
||||
ADD_COLOR(error, "#FF0000")
|
||||
|
||||
ADD_COLOR_WITH_ALPHA(g, 10);
|
||||
ADD_COLOR_WITH_ALPHA(g, 20);
|
||||
ADD_COLOR_WITH_ALPHA(g, 90);
|
||||
ADD_COLOR_WITH_ALPHA(i, 30);
|
||||
ADD_COLOR_WITH_ALPHA(l, 50);
|
||||
ADD_COLOR_WITH_ALPHA(l, 80);
|
||||
ADD_COLOR_WITH_ALPHA(q, 50);
|
||||
ADD_COLOR_WITH_ALPHA(g, 10)
|
||||
ADD_COLOR_WITH_ALPHA(g, 20)
|
||||
ADD_COLOR_WITH_ALPHA(g, 90)
|
||||
ADD_COLOR_WITH_ALPHA(i, 30)
|
||||
ADD_COLOR_WITH_ALPHA(l, 50)
|
||||
ADD_COLOR_WITH_ALPHA(l, 80)
|
||||
ADD_COLOR_WITH_ALPHA(q, 50)
|
||||
|
||||
public:
|
||||
Colors (QObject *parent = Q_NULLPTR);
|
||||
|
|
|
|||
|
|
@ -135,16 +135,20 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
|
|||
map["registrationState"] = mapLinphoneRegistrationStateToUi(proxyConfig->getState());
|
||||
|
||||
shared_ptr<linphone::NatPolicy> natPolicy = proxyConfig->getNatPolicy();
|
||||
if (!natPolicy)
|
||||
natPolicy = proxyConfig->getCore()->createNatPolicy();
|
||||
bool createdNat = !natPolicy;
|
||||
if (createdNat)
|
||||
natPolicy = proxyConfig->getCore()->createNatPolicy();
|
||||
map["iceEnabled"] = natPolicy->iceEnabled();
|
||||
map["turnEnabled"] = natPolicy->turnEnabled();
|
||||
|
||||
const string &turnUser(natPolicy->getStunServerUsername());
|
||||
const string &stunServer(natPolicy->getStunServer());
|
||||
|
||||
map["turnUser"] = Utils::coreStringToAppString(turnUser);
|
||||
map["stunServer"] = Utils::coreStringToAppString(stunServer);
|
||||
map["turnUser"] = QString::fromStdString(turnUser);
|
||||
map["stunServer"] = QString::fromStdString(stunServer);
|
||||
|
||||
if (createdNat)
|
||||
proxyConfig->setNatPolicy(natPolicy);
|
||||
|
||||
shared_ptr<const linphone::AuthInfo> authInfo = CoreManager::getInstance()->getCore()->findAuthInfo(
|
||||
"", turnUser, stunServer
|
||||
|
|
@ -237,25 +241,29 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
|
|||
);
|
||||
|
||||
shared_ptr<linphone::NatPolicy> natPolicy = proxyConfig->getNatPolicy();
|
||||
if (!natPolicy)
|
||||
bool createdNat = !natPolicy;
|
||||
if (createdNat)
|
||||
natPolicy = proxyConfig->getCore()->createNatPolicy();
|
||||
natPolicy->enableIce(data["iceEnabled"].toBool());
|
||||
natPolicy->enableStun(data["iceEnabled"].toBool());
|
||||
|
||||
const string turnUser(Utils::appStringToCoreString(data["turnUser"].toString()));
|
||||
const string stunServer(Utils::appStringToCoreString(data["stunServer"].toString()));
|
||||
const string turnUser(data["turnUser"].toString().toStdString());
|
||||
const string stunServer(data["stunServer"].toString().toStdString());
|
||||
|
||||
natPolicy->enableTurn(data["turnEnabled"].toBool());
|
||||
natPolicy->setStunServerUsername(turnUser);
|
||||
natPolicy->setStunServer(stunServer);
|
||||
|
||||
if( createdNat)
|
||||
proxyConfig->setNatPolicy(natPolicy);
|
||||
|
||||
shared_ptr<linphone::Core> core(proxyConfig->getCore());
|
||||
shared_ptr<const linphone::AuthInfo> authInfo(core->findAuthInfo("", turnUser, stunServer));
|
||||
if (authInfo) {
|
||||
shared_ptr<linphone::AuthInfo> clonedAuthInfo(authInfo->clone());
|
||||
clonedAuthInfo->setUserid(turnUser);
|
||||
clonedAuthInfo->setUsername(turnUser);
|
||||
clonedAuthInfo->setPassword(Utils::appStringToCoreString(data["turnPassword"].toString()));
|
||||
clonedAuthInfo->setPassword(data["turnPassword"].toString().toStdString());
|
||||
|
||||
core->addAuthInfo(clonedAuthInfo);
|
||||
core->removeAuthInfo(authInfo);
|
||||
|
|
@ -263,7 +271,7 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
|
|||
core->addAuthInfo(linphone::Factory::get()->createAuthInfo(
|
||||
turnUser,
|
||||
turnUser,
|
||||
Utils::appStringToCoreString(data["turnPassword"].toString()),
|
||||
data["turnPassword"].toString().toStdString(),
|
||||
"",
|
||||
"",
|
||||
""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue