Skip to content

Commit 893a041

Browse files
add-uosdeepin-bot[bot]
authored andcommitted
fix: modify the 'Text to Speech' reading text
modify the 'Text to Speech' reading text Log: modify the 'Text to Speech' reading text Task: https://pms.uniontech.com/task-view-378245.html
1 parent c70cd69 commit 893a041

3 files changed

Lines changed: 0 additions & 22 deletions

File tree

src/editor/dtextedit.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ void TextEdit::initRightClickedMenu()
332332
m_openInFileManagerAction = new QAction(tr("Display in file manager"), this);
333333
m_toggleCommentAction = new QAction(tr("Add Comment"), this);
334334
m_voiceReadingAction = new QAction(tr("Text to Speech"), this);
335-
m_stopReadingAction = new QAction(tr("Stop reading"), this);
336335
m_dictationAction = new QAction(tr("Speech to Text"), this);
337336
m_translateAction = new QAction(tr("Translate"), this);
338337
m_columnEditAction = new QAction(tr("Column Mode"), this);
@@ -410,7 +409,6 @@ void TextEdit::initRightClickedMenu()
410409
connect(m_addComment, &QAction::triggered, this, &TextEdit::slotAddComment);
411410
connect(m_cancelComment, &QAction::triggered, this, &TextEdit::slotCancelComment);
412411
connect(m_voiceReadingAction, &QAction::triggered, this, &TextEdit::slotVoiceReadingAction);
413-
connect(m_stopReadingAction, &QAction::triggered, this, &TextEdit::slotStopReadingAction);
414412
connect(m_dictationAction, &QAction::triggered, this, &TextEdit::slotdictationAction);
415413
connect(m_translateAction, &QAction::triggered, this, &TextEdit::slot_translate);
416414
connect(m_columnEditAction, &QAction::triggered, this, &TextEdit::slotColumnEditAction);
@@ -9306,7 +9304,6 @@ void TextEdit::onAudioPortEnabledChanged(quint32 cardId, const QString &portName
93069304

93079305
// 如果所有输出设备都被禁用,显示输出设备提示
93089306
if (!hasOutputDevice) {
9309-
slotStopReadingAction();
93109307
#ifdef DTKWIDGET_CLASS_DSizeMode
93119308
Utils::sendFloatMessageFixedFont(this, QIcon(":/images/warning.svg"), tr("No audio output device was detected. Please ensure your speakers or headphones are properly connected and try again."));
93129309
#else

src/editor/dtextedit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ public slots:
530530
void slotAddComment(bool checked = false);
531531
void slotCancelComment(bool checked = false);
532532
void slotVoiceReadingAction(bool checked = false);
533-
bool slotStopReadingAction(bool checked = false);
534533
void slotdictationAction(bool checked = false);
535534

536535
// 音频设备检测方法
@@ -682,7 +681,6 @@ private slots:
682681
QAction *m_openInFileManagerAction;
683682
QAction *m_toggleCommentAction;
684683
QAction *m_voiceReadingAction;
685-
QAction *m_stopReadingAction;
686684
QAction *m_dictationAction;
687685
QAction *m_translateAction;
688686
QAction *m_columnEditAction;

tests/src/editor/ut_textedit.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5707,23 +5707,6 @@ TEST_F(test_textedit, slotVoiceReadingAction)
57075707
pWindow->deleteLater();
57085708
}
57095709

5710-
//slotStopReadingAction
5711-
TEST_F(test_textedit, slotStopReadingAction)
5712-
{
5713-
Window *pWindow = new Window();
5714-
pWindow->addBlankTab(QString());
5715-
pWindow->currentWrapper()->textEditor()->insertTextEx(pWindow->currentWrapper()->textEditor()->textCursor(),
5716-
QString("Holle world.\nHolle world."));
5717-
QTextCursor textCursor = pWindow->currentWrapper()->textEditor()->textCursor();
5718-
textCursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
5719-
pWindow->currentWrapper()->textEditor()->setTextCursor(textCursor);
5720-
pWindow->currentWrapper()->textEditor()->slotStopReadingAction(true);
5721-
bool bRet = pWindow->currentWrapper()->textEditor()->textCursor().hasSelection();
5722-
ASSERT_TRUE(bRet == true);
5723-
5724-
pWindow->deleteLater();
5725-
}
5726-
57275710
//slotdictationAction
57285711
TEST_F(test_textedit, slotdictationAction)
57295712
{

0 commit comments

Comments
 (0)