mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 15:18:26 -05:00
Autogen: Don't use cmMakefile::GetQtUiFilesWithOptions
The purpose of this patch is to allow later removal of AUTOGEN specific variables in cmMakefile and cmSourceFile.
This commit is contained in:
@@ -531,25 +531,25 @@ static void SetupAutoTargetUic(cmGeneratorTarget const* target,
|
|||||||
std::vector<std::string> uiFileFiles;
|
std::vector<std::string> uiFileFiles;
|
||||||
std::vector<std::string> uiFileOptions;
|
std::vector<std::string> uiFileOptions;
|
||||||
{
|
{
|
||||||
const std::set<std::string> skipped(setup.uicSkip.begin(),
|
const std::string uiExt = "ui";
|
||||||
setup.uicSkip.end());
|
const std::vector<cmSourceFile*>& srcFiles = makefile->GetSourceFiles();
|
||||||
|
for (std::vector<cmSourceFile*>::const_iterator fit = srcFiles.begin();
|
||||||
const std::vector<cmSourceFile*> uiFilesWithOptions =
|
fit != srcFiles.end(); ++fit) {
|
||||||
makefile->GetQtUiFilesWithOptions();
|
cmSourceFile* sf = *fit;
|
||||||
for (std::vector<cmSourceFile*>::const_iterator fileIt =
|
// sf->GetExtension() is only valid after sf->GetFullPath() ...
|
||||||
uiFilesWithOptions.begin();
|
const std::string& fPath = sf->GetFullPath();
|
||||||
fileIt != uiFilesWithOptions.end(); ++fileIt) {
|
if (sf->GetExtension() == uiExt) {
|
||||||
cmSourceFile* sf = *fileIt;
|
// Check if the files has uic options
|
||||||
const std::string absFile =
|
std::string uicOpts = sf->GetProperty("AUTOUIC_OPTIONS");
|
||||||
cmsys::SystemTools::GetRealPath(sf->GetFullPath());
|
if (!uicOpts.empty()) {
|
||||||
if (skipped.find(absFile) == skipped.end()) {
|
const std::string absFile = cmsys::SystemTools::GetRealPath(fPath);
|
||||||
// The file wasn't skipped
|
// Check if file isn't skipped
|
||||||
uiFileFiles.push_back(absFile);
|
if (setup.uicSkip.count(absFile) == 0) {
|
||||||
{
|
uiFileFiles.push_back(absFile);
|
||||||
std::string opts = sf->GetProperty("AUTOUIC_OPTIONS");
|
cmSystemTools::ReplaceString(uicOpts, ";",
|
||||||
cmSystemTools::ReplaceString(opts, ";",
|
cmQtAutoGeneratorCommon::listSep);
|
||||||
cmQtAutoGeneratorCommon::listSep);
|
uiFileOptions.push_back(uicOpts);
|
||||||
uiFileOptions.push_back(opts);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user