The boolean variable connections in MythContext::PromptForSchemaUpgrade
From: Erik Hovland <erik@hovland.org>
is never changed. So it really is not useful.
---
libs/libmyth/mythcontext.cpp | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/libs/libmyth/mythcontext.cpp b/libs/libmyth/mythcontext.cpp
index 315006f..1d0bdad 100644
a
|
b
|
int MythContext::PromptForSchemaUpgrade(const QString &dbver, |
3474 | 3474 | const QString &backupResult) |
3475 | 3475 | { |
3476 | 3476 | bool autoUpgrade = false; |
3477 | | bool connections = false; // Are (other) FE/BEs connected? |
| 3477 | // bool connections = false; // Are (other) FE/BEs connected? |
3478 | 3478 | bool expertMode = false; // Use existing schema? Multiple buttons? |
3479 | 3479 | QString message; |
3480 | 3480 | int returnValue = MYTH_SCHEMA_UPGRADE; |
… |
… |
int MythContext::PromptForSchemaUpgrade(const QString &dbver, |
3508 | 3508 | |
3509 | 3509 | |
3510 | 3510 | // Deal with the trivial case first (No user prompting required) |
3511 | | if (autoUpgrade && upgradable && !connections) |
| 3511 | if (autoUpgrade && upgradable) // && !connections) |
3512 | 3512 | return MYTH_SCHEMA_UPGRADE; |
3513 | 3513 | |
3514 | 3514 | |
3515 | 3515 | // Build up strings used both in GUI and command shell contexts: |
3516 | 3516 | if (upgradable) |
3517 | 3517 | { |
| 3518 | /* |
3518 | 3519 | if (autoUpgrade && connections) |
3519 | 3520 | { |
3520 | 3521 | message = tr("Error: MythTV cannot upgrade the schema of this" |
… |
… |
int MythContext::PromptForSchemaUpgrade(const QString &dbver, |
3523 | 3524 | returnValue = MYTH_SCHEMA_ERROR; |
3524 | 3525 | } |
3525 | 3526 | else |
| 3527 | */ |
3526 | 3528 | { |
3527 | 3529 | message = tr("Warning: MythTV wants to upgrade" |
3528 | 3530 | " your database schema, from %1 to %2."); |
… |
… |
int MythContext::PromptForSchemaUpgrade(const QString &dbver, |
3604 | 3606 | else |
3605 | 3607 | message = tr("This cannot be un-done, so having a" |
3606 | 3608 | " database backup would be a good idea."); |
3607 | | if (connections) |
3608 | | message += "\n\n" + warnOtherCl; |
| 3609 | // if (connections) |
| 3610 | // message += "\n\n" + warnOtherCl; |
3609 | 3611 | |
3610 | 3612 | selected = MythPopupBox::ShowButtonPopup( |
3611 | 3613 | d->mainWindow, "Database Upgrade", message, |
… |
… |
int MythContext::PromptForSchemaUpgrade(const QString &dbver, |
3676 | 3678 | if (resp && resp.left(1).lower() != "y") |
3677 | 3679 | return MYTH_SCHEMA_EXIT; |
3678 | 3680 | |
3679 | | if (connections) |
3680 | | cout << endl << warnOtherCl <<endl; |
| 3681 | // if (connections) |
| 3682 | // cout << endl << warnOtherCl <<endl; |
3681 | 3683 | |
3682 | 3684 | if ((backupResult == "__FAILED__") || |
3683 | 3685 | (backupResult == "")) |