Skip to content

Commit

Permalink
Merge branch 'release/v0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseGuoX committed May 23, 2023
2 parents c0303a2 + 72aed7c commit a45a8d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ void Controller::sendMessage(QString str, int mode)
// qDebug() << _transToLang;
QString systemcmd;
if(mode == 0){
systemcmd = QString::fromStdString("Translate anything that I say to %1. Only return the translate result, don’t interpret it.").arg(_transToLang);
systemcmd = QString::fromStdString("Translate the text to %1, which is delimited with triple backticks. Only return the translate result, don’t interpret it, don't return the delimited character.").arg(_transToLang);
messages.append(createMessage("system",systemcmd));
messages.append(createMessage("user", str ));
messages.append(createMessage("user", "translate text:'''" + str + "'''" ));
}else if(mode == 1){
systemcmd = QString::fromStdString("Translate anything that I say to %1. When the text contains only one single word, please provide the original form (if applicable), \
the language of the word, the corresponding phonetic transcription (if applicable), \
Expand Down
4 changes: 2 additions & 2 deletions src/hotkey.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Date: 2023-05-02 23:52:58
* @LastEditors: JessGuo
* @LastEditTime: 2023-05-05 22:34:50
* @LastEditTime: 2023-05-23 23:25:44
* @FilePath: /GPT_Translator/src/hotkey.cpp
*/
#include "hotkey.h"
Expand Down Expand Up @@ -114,7 +114,7 @@ void Hotkey::binding(QObject *obj)
XCloseDisplay(display);
#endif
// Use a timer to wait for the copy operation to complete
QTimer::singleShot(200, [this] {
QTimer::singleShot(300, [this] {
QClipboard *clipboard = QGuiApplication::clipboard();
QString copiedText = clipboard->text();
qDebug() << "Copied text:" << copiedText;
Expand Down

0 comments on commit a45a8d8

Please sign in to comment.