Ticket #5935: 10-mythwelcome-showusage.patch

File 10-mythwelcome-showusage.patch, 1.4 KB (added by Matthew Wire <devel@…>, 15 years ago)

The same for mythwelcome

  • mythtv/programs/mythwelcome/main.cpp

     
    4747
    4848    QApplication a(argc, argv);
    4949
    50     gContext = NULL;
    51     gContext = new MythContext(MYTH_BINARY_VERSION);
    52     if (!gContext->Init())
    53     {
    54         VERBOSE(VB_IMPORTANT, "mythwelcome: Could not initialize myth context. "
    55                         "Exiting.");
    56         return FRONTEND_EXIT_NO_MYTHCONTEXT;
    57     }
    58 
    59     if (!MSqlQuery::testDBConnection())
    60     {
    61         VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. "
    62                         "Exiting.");
    63         return -1;
    64     }
    65 
    6650    // Check command line arguments
    6751    for (int argpos = 1; argpos < a.argc(); ++argpos)
    6852    {
     
    121105        }
    122106    }
    123107
     108    gContext = NULL;
     109    gContext = new MythContext(MYTH_BINARY_VERSION);
     110    if (!gContext->Init())
     111    {
     112        VERBOSE(VB_IMPORTANT, "mythwelcome: Could not initialize myth context. "
     113                        "Exiting.");
     114        return FRONTEND_EXIT_NO_MYTHCONTEXT;
     115    }
     116
     117    if (!MSqlQuery::testDBConnection())
     118    {
     119        VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. "
     120                        "Exiting.");
     121        return -1;
     122    }
     123
    124124    if (logfile != "")
    125125    {
    126126        if (!log_rotate(true))