status_t BKey::SetTo(BKeyPurpose purpose, const char* identifier, const char* secondaryIdentifier, const uint8* data, size_t length) { fCreationTime = 0; SetPurpose(purpose); SetIdentifier(identifier); SetSecondaryIdentifier(secondaryIdentifier); return SetData(data, length); }
BKey& BKey::operator=(const BKey& other) { SetPurpose(other.Purpose()); SetData((const uint8*)other.Data(), other.DataLength()); fIdentifier = other.fIdentifier; fSecondaryIdentifier = other.fSecondaryIdentifier; fOwner = other.fOwner; fCreationTime = other.fCreationTime; return *this; }
void MainWindow::on_buttonAdd_clicked() { auto profileDialog = new AddNewProfileDialog(this); profileDialog->setModal(true); profileDialog->SetPurpose(AddNewProfileDialog::Purpose::AddNewProfile); profileDialog->SetId(currentIndex+1); if(profileDialog->exec() == QDialog::Accepted) { auto profileToAdd = profileDialog->GetUpdatedProfile(); base->AddProfile(profileToAdd); RefreshProfileList(); } delete profileDialog; }