void Widget::on_scanCompleted() { //int n = 0; QList<QStandardItem *> items; ui->progressBar->setValue(0x40000000); if (!d3_tooltip->makeItem(ui->lineEdit->text())) { ui->label_err_2->setText("<span style='font-size:14pt; font-weight:600; color:#aa0000;'>KO</span>"); ui->checkBox_2->setChecked(false); ui->checkBox_2->setText("Something failed. Investigations needed."); return; } else { ui->label_err_2->setText("<span style='font-size:14pt; font-weight:600; color:#00aa00;'>OK</span>"); ui->checkBox_2->setChecked(true); ui->checkBox_2->setText("All pointers has been found. Export ready."); ui->groupBox_3->setEnabled(true); addHotkey(); items = d3_tooltip->model->takeRow(0); for (unsigned char e = 0; e < D3_ToolTip::ENUM_END && e+1 < items.size(); e++) { d3_strings[e]->setText(items.at(e+1)->data(Qt::UserRole).toString()); } } }
bool MenuConf::readItemHotkeysIfPresent(FILE* f, Item* item) { eatWhitespace(f); if(curChar == ',') { nextChar(f); eatWhitespace(f); if(curChar != '[') { printf("%d, %d: Expected '['\n", lineIndex, caret); return false; } else { nextChar(f); while(true) { eatWhitespace(f); if(curChar == ']') { nextChar(f); return false; } if(curChar == '\n' || curChar == EOF) { printf("%d, %d: Expected hotkey or ']'\n", lineIndex, caret); return false; } if(item->data->hotkeys) { if(curChar != ',') { printf("%d, %d: Expected ','\n", lineIndex, caret); return false; } nextChar(f); } eatWhitespace(f); Hotkey* hotkey = new Hotkey(); if(readHotkey(f, hotkey->string, Hotkey::StringSize)) { addHotkey(item->data, hotkey); } } } } return true; }