mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 16:59:21 +00:00
show real error message on login if exists
fix windows packaging icon button
This commit is contained in:
parent
344b6600c1
commit
b4b573a027
6 changed files with 53 additions and 9 deletions
|
|
@ -70,12 +70,15 @@ void LoginPage::login(const QString &username,
|
|||
// Create on Model thread.
|
||||
AccountManager *accountManager = new AccountManager();
|
||||
connect(accountManager, &AccountManager::registrationStateChanged, this,
|
||||
[accountManager, this](linphone::RegistrationState state) mutable {
|
||||
[accountManager, this](linphone::RegistrationState state, QString message) mutable {
|
||||
// View thread
|
||||
setRegistrationState(state);
|
||||
switch (state) {
|
||||
case linphone::RegistrationState::Failed: {
|
||||
setErrorMessage(QString(tr("Le couple identifiant mot de passe ne correspond pas")));
|
||||
if (message.isEmpty())
|
||||
setErrorMessage(QString(tr("Le couple identifiant mot de passe ne correspond pas")));
|
||||
else
|
||||
setErrorMessage(message);
|
||||
if (accountManager) {
|
||||
accountManager->deleteLater();
|
||||
accountManager = nullptr;
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@ bool AccountManager::login(QString username,
|
|||
emit mAccountModel->removeListener();
|
||||
mAccountModel = nullptr;
|
||||
}
|
||||
}
|
||||
emit registrationStateChanged(state);
|
||||
}
|
||||
emit registrationStateChanged(state, QString::fromStdString(message));
|
||||
});
|
||||
auto status = core->addAccount(account);
|
||||
if (status == -1) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
void linkNewAccountUsingCode(const QString &code, RegisterType registerType, const QString &sipAddress);
|
||||
|
||||
signals:
|
||||
void registrationStateChanged(linphone::RegistrationState state);
|
||||
void registrationStateChanged(linphone::RegistrationState state, QString message = QString());
|
||||
void newAccountCreationSucceed(QString sipAddress, RegisterType registerType, const QString ®isterAddress);
|
||||
void registerNewAccountFailed(const QString &error);
|
||||
void tokenConversionSucceed(QString convertedToken);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
|||
view/Control/Button/CheckBox.qml
|
||||
view/Control/Button/ComboBox.qml
|
||||
view/Control/Button/HelpIconLabelButton.qml
|
||||
view/Control/Button/IconLabelButton.qml
|
||||
view/Control/Button/BigButton.qml
|
||||
view/Control/Button/IconButton.qml
|
||||
view/Control/Button/IconLabelButton.qml
|
||||
view/Control/Button/BigButton.qml
|
||||
view/Control/Button/RoundButton.qml
|
||||
view/Control/Button/MediumButton.qml
|
||||
view/Control/Button/SmallButton.qml
|
||||
|
|
|
|||
40
Linphone/view/Control/Button/IconButton.qml
Normal file
40
Linphone/view/Control/Button/IconButton.qml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Linphone
|
||||
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
||||
|
||||
Button {
|
||||
id: mainItem
|
||||
icon.width: 24 * DefaultStyle.dp
|
||||
icon.height: 24 * DefaultStyle.dp
|
||||
textSize: 14 * DefaultStyle.dp
|
||||
textWeight: 400 * DefaultStyle.dp
|
||||
radius: 5 * DefaultStyle.dp
|
||||
shadowEnabled: mainItem.activeFocus || hovered
|
||||
style: ButtonStyle.hoveredBackground
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: mainItem.radius
|
||||
color: mainItem.pressed
|
||||
? mainItem.pressedColor
|
||||
: mainItem.hovered || mainItem.hasNavigationFocus
|
||||
? mainItem.hoveredColor
|
||||
: mainItem.color
|
||||
border.color: mainItem.borderColor
|
||||
}
|
||||
|
||||
contentItem: EffectImage {
|
||||
imageSource: mainItem.icon.source
|
||||
imageWidth: mainItem.icon.width
|
||||
imageHeight: mainItem.icon.height
|
||||
colorizationColor: mainItem.pressed
|
||||
? mainItem.pressedImageColor
|
||||
: mainItem.hovered
|
||||
? mainItem.hoveredImageColor
|
||||
: mainItem.contentImageColor
|
||||
Layout.preferredWidth: mainItem.icon.width
|
||||
Layout.preferredHeight: mainItem.icon.height
|
||||
}
|
||||
}
|
||||
|
|
@ -120,12 +120,12 @@ elseif(WIN32)
|
|||
NAMES msys2_shell.cmd
|
||||
HINTS "C:/msys64/"
|
||||
)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
set(MSVC_VERSION ${MSVC_TOOLSET_VERSION})
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
|
||||
endif()
|
||||
endif()
|
||||
include(InstallRequiredSystemLibraries)
|
||||
find_file(UCRTBASE_LIB "ucrtbase.dll" PATHS "C:/Windows/System32")
|
||||
install(FILES ${UCRTBASE_LIB} DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue