Subversion Repositories svn1

Rev

Rev 236 | Rev 256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 236 Rev 240
Line 10... Line 10...
10
const char       *qck_err_mess[] = {
10
const char       *qck_err_mess[] = {
11
    "No error",
11
    "No error",
12
    "Invalid start time",
12
    "Invalid start time",
13
    "Invalid end time",
13
    "Invalid end time",
14
    "End before start",
14
    "End before start",
15
    "Team data not entered"
15
    "Team data not entered",
-
 
16
    "NE with named competitor"
16
};
17
};
17
 
18
 
18
qmDataCheck::qmDataCheck(QWidget *parent) :
19
qmDataCheck::qmDataCheck(QWidget *parent) :
19
    QWidget(parent),
20
    QWidget(parent),
20
    ui(new Ui::qmDataCheck)
21
    ui(new Ui::qmDataCheck)
Line 54... Line 55...
54
    {
55
    {
55
        team_type team_buf;
56
        team_type team_buf;
56
        if( valid_field( tm ) )
57
        if( valid_field( tm ) )
57
        {
58
        {
58
            g_record( tm, &team_buf );
59
            g_record( tm, &team_buf );
59
            if( team_buf.flags.disqualified == FALSE
60
            if ( !team_buf.flags.disqualified)
60
                && test_times( &team_buf, leg_end ) )
-
 
61
            {
61
            {
-
 
62
                test_times( &team_buf, leg_end );
-
 
63
                if( check_error.type > 0 )
-
 
64
                {
62
                count_bad++;
65
                    count_bad++;
63
                qmDataCheckItem *item = new qmDataCheckItem( tm, check_error.leg);
66
                    qmDataCheckItem *item = new qmDataCheckItem( tm, check_error.leg);
64
                QString msg = QString("Team %1, Leg %2: %3").arg(QString::number(tm)).arg(QString::number(check_error.leg)).arg(qck_err_mess[check_error.type]);
67
                    QString msg = QString("Team %1, Leg %2: %3").arg(QString::number(tm)).arg(QString::number(check_error.leg)).arg(qck_err_mess[check_error.type]);
65
                item->setData(Qt::EditRole, msg);
68
                    item->setData(Qt::EditRole, msg);
66
                ui->listWidget->addItem(item);
69
                    ui->listWidget->addItem(item);
-
 
70
                }
67
            }
71
            }
68
        }
72
        }
69
    }
73
    }
70
    if( count_bad )
74
    if( count_bad )
71
        MainWindow::showMessage(QString("%1 teams with inconsistent data").arg(count_bad));
75
        MainWindow::showMessage(QString("%1 teams with inconsistent data").arg(count_bad));