Mercurial > hg > forks > UniversalIndentGUI
comparison src/SettingsPaths.cpp @ 716:b9123ff53106
Run cppcheck over the code and removed some possible problems.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@987 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Fri, 21 Aug 2009 09:38:00 +0000 |
parents | 3363b7bb0d41 |
children | aae5a8d04f70 |
comparison
equal
deleted
inserted
replaced
715:dad460d044d9 | 716:b9123ff53106 |
---|---|
141 // reasons. Otherwise an evil human being could create a symbolic link | 141 // reasons. Otherwise an evil human being could create a symbolic link |
142 // to an important existing file which gets overwritten when UiGUI writes | 142 // to an important existing file which gets overwritten when UiGUI writes |
143 // into this normally temporary but linked file. | 143 // into this normally temporary but linked file. |
144 char *pathTemplate = new char[tempPath.length()+8]; | 144 char *pathTemplate = new char[tempPath.length()+8]; |
145 QByteArray pathTemplateQBA = QString(tempPath + "-XXXXXX").toAscii(); | 145 QByteArray pathTemplateQBA = QString(tempPath + "-XXXXXX").toAscii(); |
146 delete pathTemplate; | 146 delete [] pathTemplate; |
147 pathTemplate = pathTemplateQBA.data(); | 147 pathTemplate = pathTemplateQBA.data(); |
148 pathTemplate = mkdtemp( pathTemplate ); | 148 pathTemplate = mkdtemp( pathTemplate ); |
149 tempPath = pathTemplate; | 149 tempPath = pathTemplate; |
150 #endif | 150 #endif |
151 } | 151 } |