aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
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);