aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-07 21:48:40 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-07 21:48:40 +0530
commitb2bfcedca995d130ba670f20e8a2cb88e96ce750 (patch)
treec5e907e4c4ac9cf0c4079e1665925cae6570ef4b /src/utils.h
parent975ab60d42d135337d5fee230a38965adbd6b234 (diff)
downloadwhatsie-b2bfcedca995d130ba670f20e8a2cb88e96ce750.tar.gz
whatsie-b2bfcedca995d130ba670f20e8a2cb88e96ce750.zip
utils class update
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h55
1 files changed, 6 insertions, 49 deletions
diff --git a/src/utils.h b/src/utils.h
index 9d2520f..fecaab7 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -24,56 +24,13 @@ public slots:
static QString genRand(int length);
static QString convertSectoDay(qint64 secs);
static QString returnPath(QString pathname);
-
- static QString EncodeXML ( const QString& encodeMe ){
-
- QString temp;
- int length = encodeMe.size();
- for (int index = 0; index < length; index++)
- {
- QChar character(encodeMe.at(index));
-
- switch (character.unicode())
- {
- case '&':
- temp += "&amp;"; break;
-
- case '\'':
- temp += "&apos;"; break;
-
- case '"':
- temp += "&quot;"; break;
-
- case '<':
- temp += "&lt;"; break;
-
- case '>':
- temp += "&gt;"; break;
-
- default:
- temp += character;
- break;
- }
- }
-
- return temp;
- }
-
- static QString DecodeXML ( const QString& decodeMe ) {
-
- QString temp(decodeMe);
-
- temp.replace("&amp;", "&");
- temp.replace("&apos;", "'");
- temp.replace("&quot;", "\"");
- temp.replace("&lt;", "<");
- temp.replace("&gt;", ">");
-
- return temp;
- }
-
+ static QString EncodeXML ( const QString& encodeMe );
+ static QString DecodeXML ( const QString& decodeMe );
static QString htmlToPlainText(QString str);
-
+ static QString GetEnvironmentVar(const QString &variable_name);
+ static float RoundToOneDecimal(float number);
+ void DisplayExceptionErrorDialog(const QString &error_info);
+ static QString appDebugInfo();
private slots:
//use refreshCacheSize
static quint64 dir_size(const QString &directory);