MCPcopy Create free account
hub / github.com/188080501/JQTools / getTemplateData

Method getTemplateData

components/QtGroup/CppFileMaker/cpp/cppfilemaker.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68QString Manage::getTemplateData(
69 const QString &templateFilePath,
70 const QString &macroProtectsPrefix,
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}

Callers 1

makeMethod · 0.95

Calls 1

QFileInfoClass · 0.85

Tested by

no test coverage detected