Skip to content

Commit

Permalink
Rename noPrompt variable noAutodetect to reflect it's actual meaning …
Browse files Browse the repository at this point in the history
…and fix one incorrect assumption made because of the old name.
  • Loading branch information
daniel-kristjansson committed May 4, 2012
1 parent 47fb47c commit fe25cc5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions mythtv/libs/libmyth/mythcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ bool MythContextPrivate::Init(const bool gui,
* Despite its name, the disable argument currently only disables the chooser.
* If set, autoconfigure will still be attempted in some situations.
*/
bool MythContextPrivate::FindDatabase(const bool prompt, const bool noPrompt)
bool MythContextPrivate::FindDatabase(bool prompt, bool noAutodetect)
{
// The two bool. args actually form a Yes/Maybe/No (A tristate bool :-)
bool manualSelect = prompt && !noPrompt;
// We can only prompt if autodiscovery is enabled..
bool manualSelect = prompt && !noAutodetect;

QString failure;

Expand Down Expand Up @@ -377,14 +377,11 @@ bool MythContextPrivate::FindDatabase(const bool prompt, const bool noPrompt)
goto DBfound;
}

if (count > 1 || count == -1) // Multiple BEs, or needs PIN.
manualSelect = !noPrompt; // If allowed, prompt user
// Multiple BEs, or needs PIN.
manualSelect |= (count > 1 || count == -1);
}

if (!m_gui)
manualSelect = false; // no interactive command-line chooser yet


manualSelect &= m_gui; // no interactive command-line chooser yet

// Last, get the user to select a backend from a possible list:
if (manualSelect)
Expand Down

0 comments on commit fe25cc5

Please sign in to comment.