| 10 |
|
QCommandLineParser parser; |
| 11 |
|
parser.setApplicationDescription("Additional documentation can be found at: http://wiki.oni2.net/XmlTools"); |
| 12 |
|
|
| 13 |
< |
XmlTools *myXmlTools; |
| 13 |
> |
std::unique_ptr<XmlTools> myXmlTools; |
| 14 |
|
QString filesWildCard, patchFilesWildCard, forceTargetFilesWildcard; |
| 15 |
|
QString currentVal, newVal, diffOldNewVal, positions; |
| 16 |
|
QString xPathExpression; |
| 218 |
|
} |
| 219 |
|
|
| 220 |
|
if(parser.isSet(elementNameOption)){ |
| 221 |
< |
myXmlTools=new XmlTools(filesWildCard,filters,noBackups,noVerbose); |
| 221 |
> |
myXmlTools = std::make_unique<XmlTools>(filesWildCard,filters,noBackups,noVerbose); |
| 222 |
|
} |
| 223 |
|
else{ |
| 224 |
< |
myXmlTools=new XmlTools(filesWildCard,xPathExpression,noBackups,noVerbose); |
| 224 |
> |
myXmlTools = std::make_unique<XmlTools>(filesWildCard,xPathExpression,noBackups,noVerbose); |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
|
| 275 |
|
UtilXmlTools::displayErrorMessage("Parameter Parsing","XmlTools needs an operation to perform. Possible operations are:\n"+ |
| 276 |
|
Util::toQString("--patch-files\n--add-values\n--remove-values\n--replace-value\n--replace-all-values\n--update-elements\n--invert-elements")); |
| 277 |
|
} |
| 278 |
– |
|
| 279 |
– |
delete myXmlTools; |
| 278 |
|
} |