#include "packagepage3.h" #include "ui_packagepage3.h" PackagePage3::PackagePage3(QWidget *parent) : QWizardPage(parent), ui(new Ui::PackagePage3) { ui->setupUi(this); this->setTitle("Optional Fields"); this->setSubTitle("Separate multiple elements by commas."); //Register fields registerField("leDependentPackages", ui->leDependent); registerField("leIncompatiblePackages", ui->leIncompatible); registerField("leUnlockLevels", ui->leUnlockLevels); } bool PackagePage3::validatePage(){ QString dependentPackages=ui->leDependent->text().trimmed(); QString incompatiblePackages=ui->leIncompatible->text().trimmed(); QString unlockLevels=ui->leUnlockLevels->text().trimmed(); if(!validateField(dependentPackages) || !validateField(incompatiblePackages) || !validateField(unlockLevels,true)){ return false; } return true; } bool PackagePage3::validateField(QString &field, bool isLevels){ //Check if the numbers are correct and correctly separated if(!field.isEmpty()){ QStringList list =Util::String::substring(field,","); for(int i=0; i