MainWindow::~MainWindow() { delete ui; delete timer; delete formtoolbox; delete formephem; delete formglobecyl; delete cylequidist; delete satlist; delete seglist; opts.Save(); poi.Save(); imageptrs->DeleteImagePtrs(); // Deleting h5 files in program directory QDir workingdir("."); QStringList filters; filters << "*.h5" << "*.HDF" << "IMG_DK01*"; workingdir.setNameFilters(filters); QFileInfoList fileinfolist; workingdir.setFilter(QDir::Files | QDir::NoSymLinks); workingdir.setSorting(QDir::Name); fileinfolist = workingdir.entryInfoList(); for (int i = 0; i < fileinfolist.size(); ++i) { QFile h5file(fileinfolist.at(i).fileName()); if(h5file.remove()) qDebug() << QString("Deleting h5 and Himawari files : %1").arg(fileinfolist.at(i).fileName()); } QDir workingdir1("."); filters.clear(); filters << "S3A_OL_1_*"; workingdir1.setNameFilters(filters); workingdir1.setFilter(QDir::Dirs | QDir::NoSymLinks); QStringList infolist = workingdir1.entryList(); if(opts.remove_S3A_dirs) { for (int i = 0; i < infolist.size(); ++i) { QDir deletedir(infolist.at(i)); bool gelukt = deletedir.removeRecursively(); if(gelukt) qDebug() << "removing S3A dir : " << infolist.at(i); } } qDebug() << "================closing MainWindow================"; loggingFile.close(); }
MainWindow::~MainWindow() { delete ui; delete timer; delete formtoolbox; delete formephem; delete formglobecyl; delete cylequidist; delete satlist; delete seglist; opts.Save(); poi.Save(); imageptrs->DeleteImagePtrs(); // Deleting h5 files in program directory QDir workingdir("."); QStringList filters; filters << "*.h5" << "*.HDF" << "IMG_DK01*"; workingdir.setNameFilters(filters); QFileInfoList fileinfolist; workingdir.setFilter(QDir::Files | QDir::NoSymLinks); workingdir.setSorting(QDir::Name); fileinfolist = workingdir.entryInfoList(); for (int i = 0; i < fileinfolist.size(); ++i) { QFile h5file(fileinfolist.at(i).fileName()); if(h5file.remove()) qDebug() << QString("Deleting h5 and Himawari files : %1").arg(fileinfolist.at(i).fileName()); } qDebug() << "================closing MainWindow================"; }