QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible.

This commit is contained in:
Stephen Kelly 2014-11-14 00:04:57 +01:00
parent bf00f5287b
commit 3bd59b6014
1 changed files with 3 additions and 3 deletions

View File

@ -1479,7 +1479,7 @@ void cmQtAutoGenerators::Init()
{
const std::string &path = *it;
this->MocIncludes.push_back("-I" + path);
if (this->EndsWith(path, ".framework/Headers"))
if (cmHasLiteralSuffix(path, ".framework/Headers"))
{
// Go up twice to get to the framework root
std::vector<std::string> pathComponents;
@ -1771,7 +1771,7 @@ void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename,
std::string basename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(currentMoc);
const bool moc_style = this->StartsWith(basename, "moc_");
const bool moc_style = cmHasLiteralPrefix(basename, "moc_");
// If the moc include is of the moc_foo.cpp style we expect
// the Q_OBJECT class declaration in a header file.
@ -1953,7 +1953,7 @@ void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename,
std::string basename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(currentMoc);
const bool mocUnderscoreStyle = this->StartsWith(basename, "moc_");
const bool mocUnderscoreStyle = cmHasLiteralPrefix(basename, "moc_");
// If the moc include is of the moc_foo.cpp style we expect
// the Q_OBJECT class declaration in a header file.