Ticket #6493: lastError_bug.patch

File lastError_bug.patch, 4.0 KB (added by sphery <mtdean@…>, 12 years ago)

Patch created by OJ (olejl in IRC)

  • mythmusic/mythmusic/dbcheck.cpp

     
    4141
    4242    while (thequery != "")
    4343    {
    44         query.exec(thequery);
    45 
    46         if (query.lastError().type() != QSqlError::NoError)
     44        if (!query.exec(thequery))
    4745        {
    4846            QString msg =
    4947                QString("DB Error (Performing database upgrade): \n"
  • mytharchive/mytharchive/dbcheck.cpp

     
    4343
    4444    while (thequery != "")
    4545    {
    46         query.exec(thequery);
    47 
    48         if (query.lastError().type() != QSqlError::NoError)
     46        if (!query.exec(thequery))
    4947        {
    5048            QString msg =
    5149                QString("DB Error (Performing database upgrade): \n"
  • mythbrowser/mythbookmarkmanager/browserdbutil.cpp

     
    3434
    3535    while (thequery != "")
    3636    {
    37         query.exec(thequery);
    38 
    39         if (query.lastError().type() != QSqlError::NoError)
     37        if (!query.exec(thequery))
    4038        {
    4139            QString msg =
    4240                QString("DB Error (Performing database upgrade): \n"
  • mythweather/mythweather/dbcheck.cpp

     
    3535    while (it != updates.end())
    3636    {
    3737        QString thequery = *it;
    38         query.exec(thequery);
    39 
    40         if (query.lastError().type() != QSqlError::NoError)
     38        if (!query.exec(thequery))
    4139        {
    4240            QString msg =
    4341                QString("DB Error (Performing database upgrade): \n"
  • mythgallery/mythgallery/dbcheck.cpp

     
    4141
    4242    while (thequery != "")
    4343    {
    44         query.exec(thequery);
    45 
    46         if (query.lastError().type() != QSqlError::NoError)
     44        if (!query.exec(thequery))
    4745        {
    4846            QString msg =
    4947                QString("DB Error (Performing database upgrade): \n"
  • mythflix/mythflix/dbcheck.cpp

     
    3939
    4040    while (thequery != "")
    4141    {
    42         query.exec(thequery);
    43 
    44         if (query.lastError().type() != QSqlError::None)
     42        if (!query.exec(thequery))
    4543        {
    4644            QString msg =
    4745                QString("DB Error (Performing database upgrade): \n"
  • mythgame/mythgame/dbcheck.cpp

     
    4141
    4242    while (thequery != "")
    4343    {
    44         query.exec(thequery);
    45 
    46         if (query.lastError().type() != QSqlError::None)
     44        if (!query.exec(thequery))
    4745        {
    4846            QString msg =
    4947                QString("DB Error (Performing database upgrade): \n"
  • mythnews/mythnews/dbcheck.cpp

     
    4242
    4343    while (thequery != "")
    4444    {
    45         query.exec(thequery);
    46 
    47         if (query.lastError().type() != QSqlError::NoError)
     45        if (!query.exec(thequery))
    4846        {
    4947            QString msg =
    5048                QString("DB Error (Performing database upgrade): \n"