Skip to content

Commit b47d6de

Browse files
committed
Add debugging statements for reconciling links between command line
options.
1 parent 9b1c893 commit b47d6de

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

mythtv/libs/libmythbase/mythcommandlineparser.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,9 @@ bool MythCommandLineParser::ReconcileLinks(void)
10551055
QMap<QString,CommandLineArg*>::iterator i1;
10561056
QList<CommandLineArg*>::iterator i2;
10571057

1058+
if (m_verbose)
1059+
cerr << "Reconciling links for option interdependencies." << endl;
1060+
10581061
for (i1 = m_namedArgs.begin(); i1 != m_namedArgs.end(); ++i1)
10591062
{
10601063
links = (*i1)->m_parents;
@@ -1075,6 +1078,11 @@ bool MythCommandLineParser::ReconcileLinks(void)
10751078
}
10761079

10771080
// replace linked argument
1081+
if (m_verbose)
1082+
cerr << QString(" Setting %1 as child of %2")
1083+
.arg((*i1)->m_name).arg((*i2)->m_name)
1084+
.toLocal8Bit().constData()
1085+
<< endl;
10781086
(*i1)->SetChildOf(m_namedArgs[(*i2)->m_name]);
10791087
}
10801088

@@ -1096,6 +1104,11 @@ bool MythCommandLineParser::ReconcileLinks(void)
10961104
}
10971105

10981106
// replace linked argument
1107+
if (m_verbose)
1108+
cerr << QString(" Setting %1 as parent of %2")
1109+
.arg((*i1)->m_name).arg((*i2)->m_name)
1110+
.toLocal8Bit().constData()
1111+
<< endl;
10991112
(*i1)->SetParentOf(m_namedArgs[(*i2)->m_name]);
11001113
}
11011114

@@ -1117,6 +1130,11 @@ bool MythCommandLineParser::ReconcileLinks(void)
11171130
}
11181131

11191132
// replace linked argument
1133+
if (m_verbose)
1134+
cerr << QString(" Setting %1 as requiring %2")
1135+
.arg((*i1)->m_name).arg((*i2)->m_name)
1136+
.toLocal8Bit().constData()
1137+
<< endl;
11201138
(*i1)->SetRequires(m_namedArgs[(*i2)->m_name]);
11211139
}
11221140

@@ -1137,6 +1155,11 @@ bool MythCommandLineParser::ReconcileLinks(void)
11371155
}
11381156

11391157
// replace linked argument
1158+
if (m_verbose)
1159+
cerr << QString(" Setting %1 as blocking %2")
1160+
.arg((*i1)->m_name).arg((*i2)->m_name)
1161+
.toLocal8Bit().constData()
1162+
<< endl;
11401163
(*i1)->SetBlocks(m_namedArgs[(*i2)->m_name]);
11411164
i2++;
11421165
}

0 commit comments

Comments
 (0)