static void acceptCfgDef(tarantool_cfg *c, OptDef *opt, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional) { ConfettyError r; while(opt) { r = acceptValue(c, opt, check_rdonly); switch(r) { case CNF_OK: if (n_accepted) (*n_accepted)++; break; case CNF_OPTIONAL: out_warning(r, "Option '%s' is not supported", dumpOptDef(opt->name)); if (n_optional) (*n_optional)++; break; case CNF_MISSED: out_warning(r, "Could not find '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGTYPE: out_warning(r, "Wrong value type for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGINDEX: out_warning(r, "Wrong array index in '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_RDONLY: out_warning(r, "Could not accept read only '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGINT: out_warning(r, "Could not parse integer value for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGRANGE: out_warning(r, "Wrong range for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_NOMEMORY: out_warning(r, "Not enough memory to accept '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_NOTSET: out_warning(r, "Option '%s' is not set (or has a default value)", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; default: out_warning(r, "Unknown error for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; } opt = opt->next; } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setWindowTitle("Dialogs"); enter_text = new Dialog(); connect(enter_text, SIGNAL(newText(QString)), this, SLOT(acceptValue(QString))); }