A function parameter can be hidden within the function if the function
From: Erik Hovland <erik@hovland.org>
declares a variable with the same name. This fixes any in the libmythtv
directory.
---
libs/libmythtv/osd.cpp | 10 ++++-----
libs/libmythtv/siscan.cpp | 6 +++--
libs/libmythtv/videoout_xv.cpp | 8 +++----
libs/libmythtv/viewschdiff.cpp | 46 ++++++++++++++++++++--------------------
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/libs/libmythtv/osd.cpp b/libs/libmythtv/osd.cpp
index 82c485a..e8715b5 100644
|
a
|
b
|
void OSD::NewDialogBox(const QString &name, const QString &message,
|
| 2117 | 2117 | OSDTypeText *text = NULL; |
| 2118 | 2118 | do |
| 2119 | 2119 | { |
| 2120 | | QString name = QString("option%1").arg(availoptions + 1); |
| 2121 | | text = (OSDTypeText *)container->GetType(name); |
| | 2120 | QString optionName = QString("option%1").arg(availoptions + 1); |
| | 2121 | text = (OSDTypeText *)container->GetType(optionName); |
| 2122 | 2122 | if (text) |
| 2123 | 2123 | availoptions++; |
| 2124 | 2124 | } |
| … |
… |
void OSD::NewDialogBox(const QString &name, const QString &message,
|
| 2138 | 2138 | |
| 2139 | 2139 | for (int i = 1; i <= numoptions && i <= availoptions; i++) |
| 2140 | 2140 | { |
| 2141 | | QString name = QString("option%1").arg(offset + i); |
| 2142 | | text = (OSDTypeText *)container->GetType(name); |
| | 2141 | QString optionName = QString("option%1").arg(offset + i); |
| | 2142 | text = (OSDTypeText *)container->GetType(optionName); |
| 2143 | 2143 | if (!text) |
| 2144 | 2144 | { |
| 2145 | | VERBOSE(VB_IMPORTANT, "Couldn't find: " << name); |
| | 2145 | VERBOSE(VB_IMPORTANT, "Couldn't find: " << optionName); |
| 2146 | 2146 | return; |
| 2147 | 2147 | } |
| 2148 | 2148 | |
diff --git a/libs/libmythtv/siscan.cpp b/libs/libmythtv/siscan.cpp
index eaf82e1..58411a2 100644
|
a
|
b
|
bool SIScan::ScanTransport(int mplexid)
|
| 976 | 976 | while (query.next()) |
| 977 | 977 | { |
| 978 | 978 | int sourceid = query.value(0).toInt(); |
| 979 | | int mplexid = query.value(1).toInt(); |
| | 979 | int queriedMplexid = query.value(1).toInt(); |
| 980 | 980 | QString std = query.value(2).toString(); |
| 981 | 981 | int tsid = query.value(3).toInt(); |
| 982 | 982 | |
| 983 | 983 | QString fn = (tsid) ? QString("Transport ID %1").arg(tsid) : |
| 984 | | QString("Multiplex #%1").arg(mplexid); |
| | 984 | QString("Multiplex #%1").arg(queriedMplexid); |
| 985 | 985 | |
| 986 | 986 | VERBOSE(VB_SIPARSER, LOC + "Adding " + fn); |
| 987 | 987 | |
| 988 | | TransportScanItem item(sourceid, std, fn, mplexid, signalTimeout); |
| | 988 | TransportScanItem item(sourceid, std, fn, queriedMplexid, signalTimeout); |
| 989 | 989 | scanTransports += item; |
| 990 | 990 | } |
| 991 | 991 | |
diff --git a/libs/libmythtv/videoout_xv.cpp b/libs/libmythtv/videoout_xv.cpp
index 7a16e58..f86b4cc 100644
|
a
|
b
|
void VideoOutputXv::InitDisplayMeasurements(uint width, uint height)
|
| 531 | 531 | float displayAspect = gContext->GetFloatSettingOnHost( |
| 532 | 532 | "XineramaMonitorAspectRatio", |
| 533 | 533 | gContext->GetHostName(), pixel_aspect); |
| 534 | | int height = display_dim.height(); |
| 535 | | if (height <= 0) |
| 536 | | display_dim.setHeight(height = 300); |
| 537 | | display_dim.setWidth((int) round(height * displayAspect)); |
| | 534 | int displayHeight = display_dim.height(); |
| | 535 | if (displayHeight <= 0) |
| | 536 | display_dim.setHeight(displayHeight = 300); |
| | 537 | display_dim.setWidth((int) round(displayHeight * displayAspect)); |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | 540 | VERBOSE(VB_PLAYBACK, LOC + |
diff --git a/libs/libmythtv/viewschdiff.cpp b/libs/libmythtv/viewschdiff.cpp
index c321299..3dc45c3 100644
|
a
|
b
|
void ViewScheduleDiff::updateList(QPainter *p)
|
| 512 | 512 | break; |
| 513 | 513 | |
| 514 | 514 | struct ProgramStruct s = recList[skip+i]; |
| 515 | | struct ProgramInfo *p = s.after; |
| 516 | | if (!p) p = s.before; |
| | 515 | struct ProgramInfo *progInfo = s.after; |
| | 516 | if (!progInfo) progInfo = s.before; |
| 517 | 517 | |
| 518 | 518 | QString temp; |
| 519 | 519 | |
| 520 | | temp = (p->recstartts).toString(dateformat); |
| 521 | | temp += " " + (p->recstartts).toString(timeformat); |
| | 520 | temp = (progInfo->recstartts).toString(dateformat); |
| | 521 | temp += " " + (progInfo->recstartts).toString(timeformat); |
| 522 | 522 | ltype->SetItemText(i, 1, temp); |
| 523 | 523 | |
| 524 | | ltype->SetItemText(i, 2, p->ChannelText(channelFormat)); |
| | 524 | ltype->SetItemText(i, 2, progInfo->ChannelText(channelFormat)); |
| 525 | 525 | |
| 526 | | temp = p->title; |
| 527 | | if ((p->subtitle).stripWhiteSpace().length() > 0) |
| 528 | | temp += " - \"" + p->subtitle + "\""; |
| | 526 | temp = progInfo->title; |
| | 527 | if ((progInfo->subtitle).stripWhiteSpace().length() > 0) |
| | 528 | temp += " - \"" + progInfo->subtitle + "\""; |
| 529 | 529 | ltype->SetItemText(i, 3, temp); |
| 530 | 530 | |
| 531 | 531 | if (s.before) temp = s.before->RecStatusChar(); |
| … |
… |
void ViewScheduleDiff::updateList(QPainter *p)
|
| 541 | 541 | |
| 542 | 542 | if (!s.after) |
| 543 | 543 | ltype->EnableForcedFont(i, "disabledrecording"); |
| 544 | | else if (p->recstatus == rsRecording) |
| | 544 | else if (progInfo->recstatus == rsRecording) |
| 545 | 545 | ltype->EnableForcedFont(i, "recording"); |
| 546 | | else if (p->recstatus == rsConflict || |
| 547 | | p->recstatus == rsOffLine || |
| 548 | | p->recstatus == rsAborted) |
| | 546 | else if (progInfo->recstatus == rsConflict || |
| | 547 | progInfo->recstatus == rsOffLine || |
| | 548 | progInfo->recstatus == rsAborted) |
| 549 | 549 | ltype->EnableForcedFont(i, "conflictingrecording"); |
| 550 | | else if (p->recstatus == rsWillRecord) |
| | 550 | else if (progInfo->recstatus == rsWillRecord) |
| 551 | 551 | ltype->EnableForcedFont(i, "record"); |
| 552 | | else if (p->recstatus == rsRepeat || |
| 553 | | p->recstatus == rsOtherShowing || |
| 554 | | (p->recstatus != rsDontRecord && |
| 555 | | p->recstatus <= rsEarlierShowing)) |
| | 552 | else if (progInfo->recstatus == rsRepeat || |
| | 553 | progInfo->recstatus == rsOtherShowing || |
| | 554 | (progInfo->recstatus != rsDontRecord && |
| | 555 | progInfo->recstatus <= rsEarlierShowing)) |
| 556 | 556 | ltype->EnableForcedFont(i, "disabledrecording"); |
| 557 | 557 | } |
| 558 | 558 | } |
| … |
… |
void ViewScheduleDiff::updateInfo(QPainter *p)
|
| 619 | 619 | LayerSet *container = theme->GetSet("program_info"); |
| 620 | 620 | if (container) |
| 621 | 621 | { |
| 622 | | ProgramInfo *p = CurrentProgram(); |
| | 622 | ProgramInfo *progInfo = CurrentProgram(); |
| 623 | 623 | |
| 624 | | if (p) |
| | 624 | if (progInfo) |
| 625 | 625 | { |
| 626 | | p->ToMap(infoMap); |
| | 626 | progInfo->ToMap(infoMap); |
| 627 | 627 | container->ClearAllText(); |
| 628 | 628 | container->SetText(infoMap); |
| 629 | 629 | } |
| … |
… |
void ViewScheduleDiff::updateRecStatus(QPainter *p)
|
| 655 | 655 | LayerSet *container = theme->GetSet("status_info"); |
| 656 | 656 | if (container) |
| 657 | 657 | { |
| 658 | | ProgramInfo *p = CurrentProgram(); |
| 659 | | if (p) |
| | 658 | ProgramInfo *progInfo = CurrentProgram(); |
| | 659 | if (progInfo) |
| 660 | 660 | { |
| 661 | | p->ToMap(infoMap); |
| | 661 | progInfo->ToMap(infoMap); |
| 662 | 662 | container->ClearAllText(); |
| 663 | 663 | container->SetText(infoMap); |
| 664 | 664 | } |