Diffstat (limited to 'noncore/unsupported/mail2/libmail/configfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/libmail/configfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/libmail/configfile.cpp b/noncore/unsupported/mail2/libmail/configfile.cpp index a5c2b49..082b330 100644 --- a/noncore/unsupported/mail2/libmail/configfile.cpp +++ b/noncore/unsupported/mail2/libmail/configfile.cpp | |||
@@ -81,32 +81,32 @@ void ConfigFile::updateAccount(Account account) | |||
81 | config->write(); | 81 | config->write(); |
82 | } | 82 | } |
83 | 83 | ||
84 | void ConfigFile::deleteAccount(Account account) | 84 | void ConfigFile::deleteAccount(Account account) |
85 | { | 85 | { |
86 | QFile f((QString) getenv("HOME") + "/Applications/mail/accounts/account-" + account.accountName()); | 86 | QFile f((QString) getenv("HOME") + "/Applications/mail/accounts/account-" + account.accountName()); |
87 | f.remove(); | 87 | f.remove(); |
88 | } | 88 | } |
89 | 89 | ||
90 | void ConfigFile::checkDirectory() | 90 | void ConfigFile::checkDirectory() |
91 | { | 91 | { |
92 | if (!QDir((QString) getenv("HOME") + "/Applications/mail/accounts").exists()) { | 92 | if (!QDir((QString) getenv("HOME") + "/Applications/mail/accounts").exists()) { |
93 | system("mkdir -p $HOME/Applications/mail/accounts"); | 93 | system("mkdir -p $HOME/Applications/mail/accounts"); |
94 | qWarning("mail: $HOME/Applications/mail/accounts created"); | 94 | qWarning("mail: $HOME/Applications/mail/accounts created"); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | QString ConfigFile::rot13(const QString &input) | 98 | QString ConfigFile::rot13(const QString &input) |
99 | { | 99 | { |
100 | QString i = input; | 100 | QString i = input; |
101 | int l = i.length(); | 101 | int l = i.length(); |
102 | while(l--) { | 102 | while(l--) { |
103 | if (i[l] >= QChar('A') && i[l] <= QChar('M') || | 103 | if (i[l] >= QChar('A') && i[l] <= QChar('M') || |
104 | i[l] >= QChar('a') && i[l] <= QChar('m')) | 104 | i[l] >= QChar('a') && i[l] <= QChar('m')) |
105 | i[l] = (char)((int)QChar(l[i])+13); | 105 | i[l] = QChar(i[l].unicode()+13); |
106 | else if (i[l] >= QChar('N') && i[l] <= QChar('Z') || | 106 | else if (i[l] >= QChar('N') && i[l] <= QChar('Z') || |
107 | i[l] >= QChar('n') && i[l] <= QChar('z')) | 107 | i[l] >= QChar('n') && i[l] <= QChar('z')) |
108 | i[l] = (char)((int)QChar(l[i])-13); | 108 | i[l] = QChar(i[l].unicode()-13); |
109 | } | 109 | } |
110 | return i; | 110 | return i; |
111 | } | 111 | } |
112 | 112 | ||