| 66 | } |
| 67 | |
| 68 | QString Manage::getTemplateData( |
| 69 | const QString &templateFilePath, |
| 70 | const QString ¯oProtectsPrefix, |
| 71 | const QString &className |
| 72 | ) |
| 73 | { |
| 74 | auto readFileReply = AbstractTool::readFile( QFileInfo( templateFilePath ) ); |
| 75 | if ( !readFileReply.first ) { return { }; } |
| 76 | |
| 77 | readFileReply.second = readFileReply.second.replace( "%classname%", className.toUtf8().toLower() ); |
| 78 | readFileReply.second = readFileReply.second.replace( "%ClassName%", className.toUtf8() ); |
| 79 | readFileReply.second = readFileReply.second.replace( "%CLASSNAME%", className.toUtf8().toUpper() ); |
| 80 | readFileReply.second = readFileReply.second.replace( "%MACROPROTECTSPREFIX%", macroProtectsPrefix.toUtf8().toUpper() ); |
| 81 | |
| 82 | return readFileReply.second; |
| 83 | } |