ProjectExplorer: Log some values to narrow down a bug

Task-number: QTCREATORBUG-26875
Change-Id: Ifad56dc711241a03d391328cae202adc338ee0eb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2022-03-03 10:30:14 +01:00
parent 98673190ad
commit 631e2c2a4a

View File

@@ -59,6 +59,7 @@
#include <QCheckBox> #include <QCheckBox>
#include <QDebug> #include <QDebug>
#include <QFormLayout> #include <QFormLayout>
#include <QLoggingCategory>
#include <QVBoxLayout> #include <QVBoxLayout>
using namespace Utils; using namespace Utils;
@@ -70,6 +71,8 @@ const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.BuildConfiguration.
const char CUSTOM_PARSERS_KEY[] = "ProjectExplorer.BuildConfiguration.CustomParsers"; const char CUSTOM_PARSERS_KEY[] = "ProjectExplorer.BuildConfiguration.CustomParsers";
const char PARSE_STD_OUT_KEY[] = "ProjectExplorer.BuildConfiguration.ParseStandardOutput"; const char PARSE_STD_OUT_KEY[] = "ProjectExplorer.BuildConfiguration.ParseStandardOutput";
Q_LOGGING_CATEGORY(bcLog, "qtc.buildconfig");
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Internal { namespace Internal {
@@ -609,6 +612,8 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
{ {
MacroExpander exp; MacroExpander exp;
qCDebug(bcLog) << Q_FUNC_INFO << projectDir << mainFilePath << projectName << bcName;
// TODO: Remove "Current" variants in ~4.16 // TODO: Remove "Current" variants in ~4.16
exp.registerFileVariables(Constants::VAR_CURRENTPROJECT_PREFIX, exp.registerFileVariables(Constants::VAR_CURRENTPROJECT_PREFIX,
QCoreApplication::translate("ProjectExplorer", "Main file of current project"), QCoreApplication::translate("ProjectExplorer", "Main file of current project"),
@@ -639,7 +644,9 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
exp.registerSubProvider([kit] { return kit->macroExpander(); }); exp.registerSubProvider([kit] { return kit->macroExpander(); });
QString buildDir = ProjectExplorerPlugin::buildDirectoryTemplate(); QString buildDir = ProjectExplorerPlugin::buildDirectoryTemplate();
qCDebug(bcLog) << "build dir template:" << buildDir;
buildDir = exp.expand(buildDir); buildDir = exp.expand(buildDir);
qCDebug(bcLog) << "expanded build:" << buildDir;
if (spaceHandling == ReplaceSpaces) if (spaceHandling == ReplaceSpaces)
buildDir.replace(" ", "-"); buildDir.replace(" ", "-");