Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit cafb1971 authored by Laurent Montel's avatar Laurent Montel 😁

Use KDEFrameworkCompilerSettings

parent a073b8c7
......@@ -16,17 +16,13 @@ find_package(PWQuality REQUIRED)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(KDEFrameworkCompilerSettings)
include_directories(${PWQUALITY_INCLUDE_DIR})
# Set KI18n translation domain
add_definitions(-DTRANSLATION_DOMAIN=\"user_manager\")
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_subdirectory(src)
......
......@@ -295,8 +295,8 @@ bool AccountInfo::validateUsername(QString username) const
return false;
}
QByteArray userchar = username.toUtf8();
if (getpwnam(userchar) != nullptr) {
const QByteArray userchar = username.toUtf8();
if (getpwnam(userchar.constData()) != nullptr) {
m_info->usernameValidation->setPixmap(m_negative);
m_info->usernameValidation->setToolTip(i18n("This username is already used"));
return false;
......
......@@ -113,7 +113,7 @@ void PasswordDialog::checkPassword()
}
}
int quality = pwquality_check (m_pwSettings, password.toUtf8(), nullptr, m_username, nullptr);
int quality = pwquality_check (m_pwSettings, password.toUtf8().constData(), nullptr, m_username.constData(), nullptr);
qCDebug(USER_MANAGER_LOG) << "Quality: " << quality;
......
......@@ -26,7 +26,7 @@
namespace Ui
{
class KCMUserManager;
};
}
class QModelIndex;
class AccountInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment