Ticket #4823: libs_libmyth_mythcontext.cpp-connections-is-useless.patch

File libs_libmyth_mythcontext.cpp-connections-is-useless.patch, 2.6 KB (added by Erik Hovland <erik@…>, 16 years ago)

removes connections and any code which depends on it

  • libs/libmyth/mythcontext.cpp

    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, 
    34743474                                        const QString &backupResult)
    34753475{
    34763476    bool    autoUpgrade = false;
    3477     bool    connections = false;  // Are (other) FE/BEs connected?
     3477//    bool    connections = false;  // Are (other) FE/BEs connected?
    34783478    bool    expertMode  = false;  // Use existing schema? Multiple buttons?
    34793479    QString message;
    34803480    int     returnValue = MYTH_SCHEMA_UPGRADE;
    int MythContext::PromptForSchemaUpgrade(const QString &dbver, 
    35083508
    35093509
    35103510    // Deal with the trivial case first (No user prompting required)
    3511     if (autoUpgrade && upgradable && !connections)
     3511    if (autoUpgrade && upgradable) // && !connections)
    35123512        return MYTH_SCHEMA_UPGRADE;
    35133513
    35143514
    35153515    // Build up strings used both in GUI and command shell contexts:
    35163516    if (upgradable)
    35173517    {
     3518/*
    35183519        if (autoUpgrade && connections)
    35193520        {
    35203521            message = tr("Error: MythTV cannot upgrade the schema of this"
    int MythContext::PromptForSchemaUpgrade(const QString &dbver, 
    35233524            returnValue = MYTH_SCHEMA_ERROR;
    35243525        }
    35253526        else
     3527 */
    35263528        {
    35273529            message = tr("Warning: MythTV wants to upgrade"
    35283530                         " your database schema, from %1 to %2.");
    int MythContext::PromptForSchemaUpgrade(const QString &dbver, 
    36043606                else
    36053607                    message = tr("This cannot be un-done, so having a"
    36063608                                 " database backup would be a good idea.");
    3607                 if (connections)
    3608                     message += "\n\n" + warnOtherCl;
     3609//                if (connections)
     3610//                    message += "\n\n" + warnOtherCl;
    36093611
    36103612                selected = MythPopupBox::ShowButtonPopup(
    36113613                    d->mainWindow, "Database Upgrade", message,
    int MythContext::PromptForSchemaUpgrade(const QString &dbver, 
    36763678    if (resp && resp.left(1).lower() != "y")
    36773679        return MYTH_SCHEMA_EXIT;
    36783680
    3679     if (connections)
    3680         cout << endl << warnOtherCl <<endl;
     3681//    if (connections)
     3682//        cout << endl << warnOtherCl <<endl;
    36813683
    36823684    if ((backupResult == "__FAILED__") ||
    36833685        (backupResult == ""))