Some bug fixes and enhancements
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QJsonObject>
|
||||
#include <memory>
|
||||
#include <QNetworkReply>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
@@ -11,6 +13,7 @@ QT_END_NAMESPACE
|
||||
class QTreeWidgetItem;
|
||||
class QFile;
|
||||
class QNetworkReply;
|
||||
class QAuthenticator;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
@@ -40,8 +43,8 @@ private slots:
|
||||
void on_autoTranslateButton_clicked();
|
||||
void on_searchButton_clicked();
|
||||
void on_searchNextButton_clicked();
|
||||
|
||||
void on_deeplApiKey_editingFinished();
|
||||
void on_copyButton_clicked();
|
||||
|
||||
private:
|
||||
struct TranslationItem {
|
||||
@@ -55,6 +58,7 @@ private:
|
||||
QString oldText;
|
||||
QString newText;
|
||||
};
|
||||
std::unique_ptr<QNetworkAccessManager> networkManager;
|
||||
Ui::MainWindow *ui;
|
||||
QJsonObject configuration;
|
||||
bool noConfigChange{false};
|
||||
@@ -72,6 +76,7 @@ private:
|
||||
void loadDeeplTranslationPossibilities();
|
||||
void renderDeeplSources();
|
||||
void translationRequestFinished(QNetworkReply *reply);
|
||||
void onDeeplTranslationAuthenticationError(QNetworkReply *reply, QAuthenticator *authenticator);
|
||||
void countAndShowUntranslated();
|
||||
void searchNext();
|
||||
QVector<TranslationItem> parseTextBlock(const QString &block);
|
||||
|
||||
Reference in New Issue
Block a user