!13 bug#I6Z7N bug#I73JHD
Merge pull request !13 from liudunfa/openkylin/yangtze
This commit is contained in:
commit
0913fc57c2
|
@ -262,7 +262,7 @@ QString BiometricsWidget::_accountTypeIntToString(int type){
|
|||
|
||||
void BiometricsWidget::showChangePwdDialog()
|
||||
{
|
||||
ChangeUserPwd dialog(m_user.username);
|
||||
ChangeUserPwd dialog(m_user.username,this);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
|
@ -644,7 +644,7 @@ void BiometricsWidget::showEnrollDialog()
|
|||
}
|
||||
}
|
||||
isShowEnrollDialog = true;
|
||||
BiometricEnrollDialog * dialog = new BiometricEnrollDialog(serviceInterface,deviceInfo->deviceType,deviceInfo->id,getuid());
|
||||
BiometricEnrollDialog * dialog = new BiometricEnrollDialog(serviceInterface,deviceInfo->deviceType,deviceInfo->id,getuid(),this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
//gdxfp显示指纹图片
|
||||
if(deviceInfo->shortName == "gdxfp")
|
||||
|
@ -783,7 +783,7 @@ void BiometricsWidget::addFeature(FeatureInfoPtr &featureinfo)
|
|||
return ;
|
||||
QStringList names = m_biometricProxy->getAllFeaturelist(getuid());
|
||||
//QStringList names = m_biometricProxy->getFeaturelist(deviceInfoPtr->id,getuid());
|
||||
ChangeFeatureName * dialog = new ChangeFeatureName(names);
|
||||
ChangeFeatureName * dialog = new ChangeFeatureName(names,this);
|
||||
|
||||
dialog->setTitle(ui->biometrictypeBox->currentText());
|
||||
connect(dialog, &ChangeFeatureName::sendNewName, [&,this,featureinfo](QString rename){
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <QSettings>
|
||||
#include <kysdk/kysdk-system/libkysysinfo.h>
|
||||
|
||||
#define PAM_CONF_FILE "/etc/pam.d/common-password"
|
||||
|
||||
|
@ -36,7 +37,7 @@ PasswdCheckUtil::PasswdCheckUtil(QObject *parent) : QObject(parent)
|
|||
|
||||
bool PasswdCheckUtil::getCurrentPamState(){
|
||||
// pam_pwquality.so为安全中心密码强度是否开启判断,社区版不做判断
|
||||
if (isCommunity() || isWayland()) {
|
||||
if (isCommunity() || isWayland() || isOpenkylin()) {
|
||||
return true;
|
||||
}
|
||||
QFile * readFile = new QFile(PAM_CONF_FILE);
|
||||
|
@ -79,6 +80,15 @@ bool PasswdCheckUtil::isWayland() {
|
|||
}
|
||||
}
|
||||
|
||||
bool PasswdCheckUtil::isOpenkylin()
|
||||
{
|
||||
QString systemName = QString(QLatin1String(kdk_system_get_systemName()));
|
||||
if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int palindrome(const char *newPw)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
private:
|
||||
static bool isWayland();
|
||||
static bool isCommunity();
|
||||
static bool isOpenkylin();
|
||||
};
|
||||
|
||||
#endif // PASSWDCHECKUTIL_H
|
||||
|
|
Loading…
Reference in New Issue