修复部分自测bug
This commit is contained in:
parent
10760e68e4
commit
31d4b8751a
|
@ -158,12 +158,12 @@
|
|||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1988"/>
|
||||
<source>Face</source>
|
||||
<translation type="unfinished">མིའི་གདོང་།</translation>
|
||||
<translation>མིའི་གདོང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1990"/>
|
||||
<source>VoicePrint</source>
|
||||
<translation type="unfinished">སྒྲ་རིས།</translation>
|
||||
<translation>སྒྲ་རིས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1992"/>
|
||||
|
|
|
@ -101,17 +101,17 @@
|
|||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="865"/>
|
||||
<source>Username</source>
|
||||
<translation type="unfinished">用户名:</translation>
|
||||
<translation>用户名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="928"/>
|
||||
<source>User name input error!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>用户名输入错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1005"/>
|
||||
<source>login</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>登录</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1382"/>
|
||||
|
@ -143,37 +143,37 @@
|
|||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1982"/>
|
||||
<source>FingerPrint</source>
|
||||
<translation type="unfinished">指纹</translation>
|
||||
<translation>指纹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1984"/>
|
||||
<source>FingerVein</source>
|
||||
<translation type="unfinished">指静脉</translation>
|
||||
<translation>指静脉</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1986"/>
|
||||
<source>Iris</source>
|
||||
<translation type="unfinished">虹膜</translation>
|
||||
<translation>虹膜</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1988"/>
|
||||
<source>Face</source>
|
||||
<translation type="unfinished">人脸</translation>
|
||||
<translation>人脸识别</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1990"/>
|
||||
<source>VoicePrint</source>
|
||||
<translation type="unfinished">声纹</translation>
|
||||
<translation>声纹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1992"/>
|
||||
<source>Ukey</source>
|
||||
<translation type="unfinished">安全密钥</translation>
|
||||
<translation>安全密钥</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/authdialog.cpp" line="1994"/>
|
||||
<source>QRCode</source>
|
||||
<translation type="unfinished">二维码</translation>
|
||||
<translation>二维码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Use the bound wechat scanning code or enter the password to log in</source>
|
||||
|
@ -276,25 +276,25 @@
|
|||
<context>
|
||||
<name>BatteryWidget</name>
|
||||
<message>
|
||||
<location filename="../src/batterywidget.cpp" line="189"/>
|
||||
<source>BatteryMode</source>
|
||||
<translation>电池模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/batterywidget.cpp" line="186"/>
|
||||
<source>PowerMode</source>
|
||||
<translation>电源模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/batterywidget.cpp" line="180"/>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="113"/>
|
||||
<source>Charging...</source>
|
||||
<translation>正在充电...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/batterywidget.cpp" line="182"/>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="115"/>
|
||||
<source>fully charged</source>
|
||||
<translation>已充满电</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="119"/>
|
||||
<source>PowerMode</source>
|
||||
<translation>电源模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="122"/>
|
||||
<source>BatteryMode</source>
|
||||
<translation>电池模式</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BioDevices</name>
|
||||
|
@ -369,32 +369,32 @@
|
|||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="40"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="44"/>
|
||||
<source>Confrim</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="89"/>
|
||||
<source>The following program is running to prevent the system from reboot!</source>
|
||||
<translation type="unfinished">以下程序正在运行,阻止系统重启!</translation>
|
||||
<translation>以下程序正在运行,阻止系统重启!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="92"/>
|
||||
<source>The following program is running to prevent the system from shutting down!</source>
|
||||
<translation type="unfinished">以下程序正在运行,阻止系统关机!</translation>
|
||||
<translation>以下程序正在运行,阻止系统关机!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="95"/>
|
||||
<source>The following program is running to prevent the system from suspend!</source>
|
||||
<translation type="unfinished">以下程序正在运行,阻止系统进入睡眠!</translation>
|
||||
<translation>以下程序正在运行,阻止系统进入睡眠!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/blockwidget.cpp" line="98"/>
|
||||
<source>The following program is running to prevent the system from hibernate!</source>
|
||||
<translation type="unfinished">以下程序正在运行,阻止系统进入休眠!</translation>
|
||||
<translation>以下程序正在运行,阻止系统进入休眠!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -1910,7 +1910,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Multiple users are logged in at the same time.Are you sure you want to reboot this system?</source>
|
||||
<translation type="vanished">同时有多个用户登录系统,您确定要退出系统吗?</translation>
|
||||
<translation>同时有多个用户登录系统,您确定要退出系统吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LAN</source>
|
||||
|
@ -1921,7 +1921,7 @@
|
|||
<translation type="vanished">无线局域网</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/lockwidget.cpp" line="923"/>
|
||||
<location filename="../src/widgets/lockwidget.cpp" line="931"/>
|
||||
<source>Multiple users are logged in at the same time.Are you sure you want to %1 this system?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -278,22 +278,22 @@
|
|||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="113"/>
|
||||
<source>Charging...</source>
|
||||
<translation type="unfinished">正在充電...</translation>
|
||||
<translation>正在充電...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="115"/>
|
||||
<source>fully charged</source>
|
||||
<translation type="unfinished">已充滿電</translation>
|
||||
<translation>已充滿電</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="119"/>
|
||||
<source>PowerMode</source>
|
||||
<translation type="unfinished">電源模式</translation>
|
||||
<translation>電源模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/batterywidget.cpp" line="122"/>
|
||||
<source>BatteryMode</source>
|
||||
<translation type="unfinished">電池模式</translation>
|
||||
<translation>電池模式</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
@ -47,7 +47,10 @@ void LockDialogPerformer::initConnections()
|
|||
connect(m_bdHelper, &BackendDbusHelper::currentUserChanged, m_modelLockDialog, &LockDialogModel::onCurUserChanged);
|
||||
connect(m_bdHelper, &BackendDbusHelper::currentSessionChanged, m_modelLockDialog, &LockDialogModel::onCurSessionChanged);
|
||||
|
||||
connect(m_bdHelper, &BackendDbusHelper::lidstateChanged, m_modelLockDialog, &LockDialogModel::onLidstateChanged);
|
||||
connect(m_bdHelper, &BackendDbusHelper::lidstateChanged, this, [=](const QString &lidStatus){
|
||||
m_modelLockDialog->updateSleepLockcheck(m_bdHelper->getSleepLockcheck());
|
||||
m_modelLockDialog->updateShutdownLockcheck(m_bdHelper->getShutdownLockcheck());
|
||||
});
|
||||
connect(m_bdHelper, &BackendDbusHelper::capslockConfChanged, m_modelLockDialog, &LockDialogModel::onCapslockStateChanged);
|
||||
|
||||
connect(m_bdHelper, &BackendDbusHelper::batteryStatusChanged, m_modelLockDialog, &LockDialogModel::onBatteryStatusChanged);
|
||||
|
|
|
@ -132,6 +132,12 @@ bool IconEdit::eventFilter(QObject *obj, QEvent *event)
|
|||
|
||||
}
|
||||
}
|
||||
if (obj == m_iconButton && event->type() == QEvent::KeyRelease) {
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
if (keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return) {
|
||||
clicked_cb();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,48 +232,45 @@ void LockWidget::keyReleaseEvent(QKeyEvent *e)
|
|||
onShowVirtualKeyboard();
|
||||
}
|
||||
|
||||
// 监听按键事件实现快捷键功能
|
||||
switch (e->key()) {
|
||||
case Qt::Key_VolumeMute:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(MIC_MUTE_KEY);
|
||||
break;
|
||||
case Qt::Key_VolumeDown:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(VOLUME_DOWN_KEY);
|
||||
break;
|
||||
case Qt::Key_VolumeUp:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(VOLUME_UP_KEY);
|
||||
break;
|
||||
case Qt::Key_MonBrightnessUp:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(BRIGHT_UP_KEY);
|
||||
break;
|
||||
case Qt::Key_MonBrightnessDown:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(BRIGHT_DOWN_KEY);
|
||||
break;
|
||||
case Qt::Key_TouchpadOn:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(TOUCHPAD_ON_KEY);
|
||||
break;
|
||||
case Qt::Key_TouchpadOff:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(TOUCHPAD_OFF_KEY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_modelLockDialog->isUseWayland()) {
|
||||
// 监听按键事件实现快捷键功能
|
||||
switch (e->key()) {
|
||||
case Qt::Key_VolumeMute:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(MIC_MUTE_KEY);
|
||||
break;
|
||||
case Qt::Key_VolumeDown:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(VOLUME_DOWN_KEY);
|
||||
break;
|
||||
case Qt::Key_VolumeUp:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(VOLUME_UP_KEY);
|
||||
break;
|
||||
case Qt::Key_MonBrightnessUp:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(BRIGHT_UP_KEY);
|
||||
break;
|
||||
case Qt::Key_MonBrightnessDown:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(BRIGHT_DOWN_KEY);
|
||||
break;
|
||||
case Qt::Key_TouchpadOn:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(TOUCHPAD_ON_KEY);
|
||||
break;
|
||||
case Qt::Key_TouchpadOff:
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(TOUCHPAD_OFF_KEY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// 实现锁屏截图功能
|
||||
QKeySequence keySequence = QKeySequence(e->modifiers() + e->key());
|
||||
if (keySequence == listFromString(m_areaScreenShot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(AREA_SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_areaScreenShot2)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(AREA_SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_screenShot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_screenShot2)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_windowScreenshot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(WINDOW_SCREENSHOT_KEY);
|
||||
}
|
||||
// 实现锁屏截图功能
|
||||
QKeySequence keySequence = QKeySequence(e->modifiers() + e->key());
|
||||
if (keySequence == listFromString(m_areaScreenShot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(AREA_SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_areaScreenShot2)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(AREA_SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_screenShot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_screenShot2)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(SCREENSHOT_KEY);
|
||||
} else if (keySequence == listFromString(m_windowScreenshot)) {
|
||||
Q_EMIT m_modelLockDialog->usdExternalDoAction(WINDOW_SCREENSHOT_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -852,16 +849,24 @@ void LockWidget::onShowVirtualKeyboard()
|
|||
|
||||
void LockWidget::onShowPowerListWidget()
|
||||
{
|
||||
|
||||
if (m_powerListWidget->isHidden()) {
|
||||
m_powerListWidget->show();
|
||||
authDialog->hide();
|
||||
m_powerListWidget->clearFocus();
|
||||
buttonListWidget->clearFocus();
|
||||
} else {
|
||||
m_powerListWidget->hide();
|
||||
authDialog->show();
|
||||
authDialog->setFocus();
|
||||
}
|
||||
|
||||
if (m_isInhibitStatus) {
|
||||
authDialog->hide();
|
||||
m_powerListWidget->hide();
|
||||
buttonListWidget->hide();
|
||||
m_timeWidget->hide();
|
||||
}
|
||||
|
||||
if (m_userListWidget && m_userListWidget->isVisible())
|
||||
m_userListWidget->hide();
|
||||
if (m_virtualKeyboardWidget && m_virtualKeyboardWidget->isVisible())
|
||||
|
@ -916,7 +921,7 @@ void LockWidget::onShowInhibitWarning(QStringList list, int type)
|
|||
m_blockWidget->setGeometry(this->geometry());
|
||||
m_blockWidget->setWarning(list, type);
|
||||
m_blockWidget->show();
|
||||
m_powerListWidget->hide();
|
||||
m_isInhibitStatus = true;
|
||||
}
|
||||
|
||||
void LockWidget::onMulUsersLogined(QString inhibitType)
|
||||
|
@ -925,7 +930,7 @@ void LockWidget::onMulUsersLogined(QString inhibitType)
|
|||
m_blockWidget->setGeometry(this->geometry());
|
||||
m_blockWidget->setTips(tr("Multiple users are logged in at the same time.Are you sure you want to %1 this system?").arg(inhibitType));
|
||||
m_blockWidget->show();
|
||||
m_powerListWidget->hide();
|
||||
m_isInhibitStatus = true;
|
||||
}
|
||||
|
||||
void LockWidget::onConfirmBtnClicked()
|
||||
|
@ -934,13 +939,17 @@ void LockWidget::onConfirmBtnClicked()
|
|||
m_powerListWidget->hide();
|
||||
authDialog->show();
|
||||
buttonListWidget->show();
|
||||
m_isInhibitStatus = false;
|
||||
Q_EMIT m_modelLockDialog->setPowerManager(m_inhibitType);
|
||||
}
|
||||
|
||||
void LockWidget::onCancelBtnClicked()
|
||||
{
|
||||
m_isInhibitStatus = false;
|
||||
m_blockWidget->hide();
|
||||
m_powerListWidget->show();
|
||||
buttonListWidget->show();
|
||||
m_timeWidget->show();
|
||||
}
|
||||
|
||||
void LockWidget::onCustomRequestAccount(QString account)
|
||||
|
|
|
@ -153,6 +153,9 @@ private:
|
|||
MyNetworkWidget *m_networkWidget = nullptr;
|
||||
BatteryWidget *batteryWidget = nullptr;
|
||||
VirtualKeyboardWidget *m_virtualKeyboardWidget = nullptr;
|
||||
|
||||
// 当前是否处于阻塞状态
|
||||
bool m_isInhibitStatus = false;
|
||||
BlockWidget *m_blockWidget = nullptr;
|
||||
QString m_inhibitType;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void PowerListWidget::onListItemClicked(QListWidgetItem *item)
|
|||
Q_EMIT showInhibitWarning(shutdownLockcheck, powerBtnList[i].m_inhibitType);
|
||||
break;
|
||||
} else if (m_modelLockDialog->getLoggedInUsersCount() > 1) {
|
||||
Q_EMIT mulUsersLogined(powerBtnList[i].m_strName);
|
||||
Q_EMIT mulUsersLogined(powerBtnList[i].setFuncName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue