syncqt: Add more information to verbose output
Makes it easier to troubleshoot issues. Pick-to: 6.5 Change-Id: If50fafde8748bb0fde58f54ed55fe1ddf9bcf088 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
55f89c76d9
commit
5e378e7374
@ -560,13 +560,26 @@ public:
|
|||||||
if (m_commandLineArgs->scanAllMode()) {
|
if (m_commandLineArgs->scanAllMode()) {
|
||||||
for (auto const &entry :
|
for (auto const &entry :
|
||||||
std::filesystem::recursive_directory_iterator(m_commandLineArgs->sourceDir())) {
|
std::filesystem::recursive_directory_iterator(m_commandLineArgs->sourceDir())) {
|
||||||
if (entry.is_regular_file() && isHeader(entry)
|
|
||||||
&& !isDocFileHeuristic(entry.path().generic_string())) {
|
const bool isRegularFile = entry.is_regular_file();
|
||||||
const std::string filePath = entry.path().generic_string();
|
const bool isHeaderFlag = isHeader(entry);
|
||||||
const std::string fileName = entry.path().filename().generic_string();
|
const bool isDocFileHeuristicFlag =
|
||||||
scannerDebug() << "Checking: " << filePath << std::endl;
|
isDocFileHeuristic(entry.path().generic_string());
|
||||||
|
const bool shouldProcessHeader =
|
||||||
|
isRegularFile && isHeaderFlag && !isDocFileHeuristicFlag;
|
||||||
|
const std::string filePath = entry.path().generic_string();
|
||||||
|
|
||||||
|
if (shouldProcessHeader) {
|
||||||
|
scannerDebug() << "Processing header: " << filePath << std::endl;
|
||||||
if (!processHeader(makeHeaderAbsolute(filePath)))
|
if (!processHeader(makeHeaderAbsolute(filePath)))
|
||||||
error = SyncFailed;
|
error = SyncFailed;
|
||||||
|
} else {
|
||||||
|
scannerDebug()
|
||||||
|
<< "Skipping processing header: " << filePath
|
||||||
|
<< " isRegularFile: " << isRegularFile
|
||||||
|
<< " isHeaderFlag: " << isHeaderFlag
|
||||||
|
<< " isDocFileHeuristicFlag: " << isDocFileHeuristicFlag
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -576,11 +589,13 @@ public:
|
|||||||
const auto &headers = m_commandLineArgs->headers();
|
const auto &headers = m_commandLineArgs->headers();
|
||||||
for (auto it = headers.begin(); it != headers.end(); ++it) {
|
for (auto it = headers.begin(); it != headers.end(); ++it) {
|
||||||
const auto &header = *it;
|
const auto &header = *it;
|
||||||
|
scannerDebug() << "Processing header: " << header << std::endl;
|
||||||
if (!processHeader(makeHeaderAbsolute(header))) {
|
if (!processHeader(makeHeaderAbsolute(header))) {
|
||||||
error = SyncFailed;
|
error = SyncFailed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const auto &header : rspHeaders) {
|
for (const auto &header : rspHeaders) {
|
||||||
|
scannerDebug() << "Processing header: " << header << std::endl;
|
||||||
if (!processHeader(makeHeaderAbsolute(header)))
|
if (!processHeader(makeHeaderAbsolute(header)))
|
||||||
error = SyncFailed;
|
error = SyncFailed;
|
||||||
}
|
}
|
||||||
@ -748,8 +763,12 @@ public:
|
|||||||
bool isPrivate = m_currentFileType & PrivateHeader;
|
bool isPrivate = m_currentFileType & PrivateHeader;
|
||||||
bool isQpa = m_currentFileType & QpaHeader;
|
bool isQpa = m_currentFileType & QpaHeader;
|
||||||
bool isExport = m_currentFileType & ExportHeader;
|
bool isExport = m_currentFileType & ExportHeader;
|
||||||
scannerDebug() << headerFile << " m_currentFilename: " << m_currentFilename
|
scannerDebug()
|
||||||
<< " isPrivate: " << isPrivate << " isQpa: " << isQpa << std::endl;
|
<< "processHeader:start: " << headerFile
|
||||||
|
<< " m_currentFilename: " << m_currentFilename
|
||||||
|
<< " isPrivate: " << isPrivate
|
||||||
|
<< " isQpa: " << isQpa
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
// Chose the directory where to generate the header aliases or to copy header file if
|
// Chose the directory where to generate the header aliases or to copy header file if
|
||||||
// the '-copy' argument is passed.
|
// the '-copy' argument is passed.
|
||||||
@ -829,8 +848,10 @@ public:
|
|||||||
ParsingResult parsingResult;
|
ParsingResult parsingResult;
|
||||||
parsingResult.masterInclude = m_currentFileInSourceDir && !isExport && !is3rdParty
|
parsingResult.masterInclude = m_currentFileInSourceDir && !isExport && !is3rdParty
|
||||||
&& !isQpa && !isPrivate && !isGenerated;
|
&& !isQpa && !isPrivate && !isGenerated;
|
||||||
if (!parseHeader(headerFile, parsingResult, skipChecks))
|
if (!parseHeader(headerFile, parsingResult, skipChecks)) {
|
||||||
|
scannerDebug() << "parseHeader failed: " << headerFile << std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Record the private header file inside the version script content.
|
// Record the private header file inside the version script content.
|
||||||
if (isPrivate && !m_commandLineArgs->versionScriptFile().empty()
|
if (isPrivate && !m_commandLineArgs->versionScriptFile().empty()
|
||||||
@ -842,12 +863,22 @@ public:
|
|||||||
|
|
||||||
// Add the '#if QT_CONFIG(<feature>)' check for header files that supposed to be
|
// Add the '#if QT_CONFIG(<feature>)' check for header files that supposed to be
|
||||||
// included into the module master header only if corresponding feature is enabled.
|
// included into the module master header only if corresponding feature is enabled.
|
||||||
|
bool willBeInModuleMasterHeader = false;
|
||||||
if (!isQpa && !isPrivate) {
|
if (!isQpa && !isPrivate) {
|
||||||
if (m_currentFilename.find('_') == std::string::npos
|
if (m_currentFilename.find('_') == std::string::npos
|
||||||
&& parsingResult.masterInclude) {
|
&& parsingResult.masterInclude) {
|
||||||
m_masterHeaderContents[m_currentFilename] = parsingResult.requireConfig;
|
m_masterHeaderContents[m_currentFilename] = parsingResult.requireConfig;
|
||||||
|
willBeInModuleMasterHeader = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scannerDebug()
|
||||||
|
<< "processHeader:end: " << headerFile
|
||||||
|
<< " is3rdParty: " << is3rdParty
|
||||||
|
<< " isGenerated: " << isGenerated
|
||||||
|
<< " m_currentFileInSourceDir: " << m_currentFileInSourceDir
|
||||||
|
<< " willBeInModuleMasterHeader: " << willBeInModuleMasterHeader
|
||||||
|
<< std::endl;
|
||||||
} else if (m_currentFilename == "qconfig.h") {
|
} else if (m_currentFilename == "qconfig.h") {
|
||||||
// Hardcode generating of QtConfig alias
|
// Hardcode generating of QtConfig alias
|
||||||
updateSymbolDescriptor("QtConfig", "qconfig.h", SyncScanner::SymbolDescriptor::Pragma);
|
updateSymbolDescriptor("QtConfig", "qconfig.h", SyncScanner::SymbolDescriptor::Pragma);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user