修改信号的名字

This commit is contained in:
liulinsong 2023-03-30 10:20:17 +08:00
parent 4e8c444b10
commit 9c7cd56101
4 changed files with 8 additions and 8 deletions

View File

@ -70,7 +70,7 @@ void VirtualKeyboardManager::UpdateCandidateArea(
} }
void VirtualKeyboardManager::NotifyIMActivated(const QString &uniqueName) { void VirtualKeyboardManager::NotifyIMActivated(const QString &uniqueName) {
emit changeIM(uniqueName); emit inputMethodNameArrived(uniqueName);
} }
void VirtualKeyboardManager::NotifyIMDeactivated( void VirtualKeyboardManager::NotifyIMDeactivated(
@ -87,8 +87,8 @@ void VirtualKeyboardManager::syncInputMethodName() {
[this](QDBusPendingCallWatcher *watcher) { [this](QDBusPendingCallWatcher *watcher) {
QDBusPendingReply<QString> reply = *watcher; QDBusPendingReply<QString> reply = *watcher;
if (!reply.isError()) { if (!reply.isError()) {
const QString &imName = reply.value(); const QString &inputMethodName = reply.value();
emit changeIM(imName); emit inputMethodNameArrived(inputMethodName);
} }
watcher->deleteLater(); watcher->deleteLater();
}); });
@ -234,8 +234,8 @@ void VirtualKeyboardManager::connectVirtualKeyboardManagerSignals() {
SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int)), SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int)),
view_.get(), view_.get(),
SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int))); SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int)));
connect(this, SIGNAL(changeIM(const QString &)), view_.get(), connect(this, SIGNAL(inputMethodNameArrived(const QString &)), view_.get(),
SIGNAL(changeIM(const QString &))); SIGNAL(inputMethodNameArrived(const QString &)));
connect(this, SIGNAL(reset()), view_.get(), SIGNAL(reset())); connect(this, SIGNAL(reset()), view_.get(), SIGNAL(reset()));
connect(this, SIGNAL(updateCurrentIMList(const QVariant &)), view_.get(), connect(this, SIGNAL(updateCurrentIMList(const QVariant &)), view_.get(),
SIGNAL(updateCurrentIMList(const QVariant &))); SIGNAL(updateCurrentIMList(const QVariant &)));

View File

@ -64,7 +64,7 @@ signals:
// TODO(linyuxuan): 使用更准确的类型替换QVariant // TODO(linyuxuan): 使用更准确的类型替换QVariant
void updateCandidateArea(const QVariant &candidateTextList, bool hasPrev, void updateCandidateArea(const QVariant &candidateTextList, bool hasPrev,
bool hasNext, int pageIndex); bool hasNext, int pageIndex);
void changeIM(const QString &uniqueName); void inputMethodNameArrived(const QString &uniqueName);
void reset(); void reset();
// TODO(linyuxuan): 使用更准确的类型替换QVariant // TODO(linyuxuan): 使用更准确的类型替换QVariant
void updateCurrentIMList(const QVariant &currentIMList); void updateCurrentIMList(const QVariant &currentIMList);

View File

@ -63,7 +63,7 @@ void VirtualKeyboardView::connectSignals() {
connect(this, connect(this,
SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int)), SIGNAL(updateCandidateArea(const QVariant &, bool, bool, int)),
rootObject(), SIGNAL(qmlUpdateCandidateList(QVariant))); rootObject(), SIGNAL(qmlUpdateCandidateList(QVariant)));
connect(this, SIGNAL(changeIM(const QString &)), rootObject(), connect(this, SIGNAL(inputMethodNameArrived(const QString &)), rootObject(),
SIGNAL(qmlChangeIM(QString))); SIGNAL(qmlChangeIM(QString)));
connect(this, SIGNAL(reset()), rootObject(), SIGNAL(qmlReset())); connect(this, SIGNAL(reset()), rootObject(), SIGNAL(qmlReset()));
connect(this, SIGNAL(updateCurrentIMList(const QVariant &)), rootObject(), connect(this, SIGNAL(updateCurrentIMList(const QVariant &)), rootObject(),

View File

@ -26,7 +26,7 @@ signals:
void updatePreeditArea(const QString &preeditText); void updatePreeditArea(const QString &preeditText);
void updateCandidateArea(const QVariant &candidateTextList, bool hasPrev, void updateCandidateArea(const QVariant &candidateTextList, bool hasPrev,
bool hasNext, int pageIndex); bool hasNext, int pageIndex);
void changeIM(const QString &uniqueName); void inputMethodNameArrived(const QString &uniqueName);
void reset(); void reset();
void updateCurrentIMList(const QVariant &currentIMList); void updateCurrentIMList(const QVariant &currentIMList);