aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/BaseAPI.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-12-01 17:25:46 +0000
committerSaturneric <[email protected]>2021-12-01 17:53:09 +0000
commit1ae8663decb3163b92d32b80cefb46eb678a5af6 (patch)
tree8e8cb58cacfe12827438b0524917cb0926f926cb /src/server/BaseAPI.h
parentAdd & Modified (diff)
downloadGpgFrontend-1ae8663decb3163b92d32b80cefb46eb678a5af6.tar.gz
GpgFrontend-1ae8663decb3163b92d32b80cefb46eb678a5af6.zip
Add i18n Support
1. Remove Qt Linguist. 2. Add GNU gettext libraries. 3. Modified source codes to meet with i18n support.
Diffstat (limited to '')
-rw-r--r--src/server/BaseAPI.h51
1 files changed, 22 insertions, 29 deletions
diff --git a/src/server/BaseAPI.h b/src/server/BaseAPI.h
index 0b724bbc..46766fed 100644
--- a/src/server/BaseAPI.h
+++ b/src/server/BaseAPI.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -25,49 +25,42 @@
#ifndef GPGFRONTEND_ZH_CN_TS_BASEAPI_H
#define GPGFRONTEND_ZH_CN_TS_BASEAPI_H
-#include "GpgFrontend.h"
#include "ComUtils.h"
-
+#include "GpgFrontend.h"
#include "rapidjson/document.h"
class BaseAPI : public QObject {
-Q_OBJECT
-public:
-
- explicit BaseAPI(ComUtils::ServiceType serviceType);
-
- ~BaseAPI() override;
+ Q_OBJECT
+ public:
+ explicit BaseAPI(ComUtils::ServiceType serviceType);
- void start();
+ ~BaseAPI() override;
- void refresh();
+ void start();
- [[nodiscard]] bool result() const;
+ void refresh();
-private:
+ [[nodiscard]] bool result() const;
- ComUtils *utils;
+ private:
+ ComUtils *utils;
- QUrl reqUrl;
+ QUrl reqUrl;
- QNetworkRequest request;
+ QNetworkRequest request;
- QNetworkReply *send_json_data();
+ QNetworkReply *send_json_data();
-protected:
+ protected:
+ bool good = false;
- bool good = false;
+ rapidjson::Document document;
- rapidjson::Document document;
-
- const ComUtils &getUtils() { return *utils; };
-
- virtual void construct_json() = 0;
-
- virtual void deal_reply() = 0;
+ const ComUtils &getUtils() { return *utils; };
+ virtual void construct_json() = 0;
+ virtual void deal_reply() = 0;
};
-
-#endif //GPGFRONTEND_ZH_CN_TS_BASEAPI_H
+#endif // GPGFRONTEND_ZH_CN_TS_BASEAPI_H