i = Day->exec();
Day = 0;
void Analysis_of_accidents::addNewRecord(){ Day = new Day_and_person(SizeForDialogs); // Construct structs for Data DataRepository = new QStringList; int i; i = Day->exec(); if (i) { if (i==1) //Ok { *DataRepository << Day->returnDay_and_personList(); while (DataRepository->size() < (ColumnCount - 1)) *DataRepository << *emptyString; delete Day; Day = 0; emit StringListIsReady(); } else // >> { *DataRepository << Day->returnDay_and_personList(); addNewRecordEmployee(); } } else { // Cancel delete DataRepository; delete Day; Day = 0; return; } return;}
C++ (Qt)if (i) { if (i==1) //Ok
C++ (Qt)if ( i == QDialog::Accepted ){// if select ОК}else{// if select Cancel}
if (i==QDialog::Accepted) { *DataRepository << Conditions->returnConditionsList(); while (DataRepository->size() < (ColumnCount - 1)) *DataRepository << *emptyString; delete Conditions; Conditions = 0; delete Day; delete Employer; emit StringListIsReady(); } else if (i == Day_and_person::Next) { *DataRepository << Conditions->returnConditionsList(); addNewRecordPeoples(); } else { delete DataRepository; delete Conditions; Conditions = 0; delete Day; delete Employer; return; }
C++ (Qt) else { delete DataRepository; delete Conditions; Conditions = 0; delete Day; delete Employer; return; }
void Analysis_of_accidents::addNewRecord(){ Day = new Day_and_person(SizeForDialogs); // Construct structs for Data DataRepository = new QStringList; int i; i = Day->exec(); if (i==QDialog::Accepted) //Ok { *DataRepository << Day->returnDay_and_personList(); while (DataRepository->size() < (ColumnCount - 1)) *DataRepository << *emptyString; delete Day; Day = 0; emit StringListIsReady(); } else if (i==Day_and_person::Next) // >> { *DataRepository << Day->returnDay_and_personList(); addNewRecordEmployee(); } else { // Cancel delete DataRepository; //delete Day; //Day = 0; return; } return;}
delete Day;