some cleanups and fixes

This commit is contained in:
Max-Wilhelm Bruker 2009-12-15 16:48:14 +01:00
parent 6ba2e98315
commit 564ae4db84
27 changed files with 371 additions and 206 deletions

View file

@ -102,7 +102,10 @@ void TabDeckStorage::actUpload()
if (!deck->loadFromFile(filePath, DeckList::CockatriceFormat))
return;
if (deck->getName().isEmpty()) {
QString deckName = QInputDialog::getText(this, tr("Enter deck name"), tr("This decklist does not have a name.\nPlease enter a name:"), QLineEdit::Normal, tr("Unnamed deck"));
bool ok;
QString deckName = QInputDialog::getText(this, tr("Enter deck name"), tr("This decklist does not have a name.\nPlease enter a name:"), QLineEdit::Normal, tr("Unnamed deck"), &ok);
if (!ok)
return;
if (deckName.isEmpty())
deckName = tr("Unnamed deck");
deck->setName(deckName);