mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 15:16:15 -08:00
Implemented suggested improvements
This commit is contained in:
@@ -108,9 +108,15 @@ bool OracleWizard::saveTokensToFile(const QString & fileName)
|
|||||||
{
|
{
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
if(!file.open(QIODevice::WriteOnly))
|
if(!file.open(QIODevice::WriteOnly))
|
||||||
|
{
|
||||||
|
qDebug() << "File open (w) failed for" << fileName;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
if(file.write(tokensData) == -1)
|
if(file.write(tokensData) == -1)
|
||||||
|
{
|
||||||
|
qDebug() << "File write (w) failed for" << fileName;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
file.close();
|
file.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -653,7 +659,7 @@ void LoadTokensPage::actDownloadFinishedTokensFile()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// save allsets.json url, but only if the user customized it and download was successfull
|
// save tokens.xml url, but only if the user customized it and download was successfull
|
||||||
if(urlLineEdit->text() != QString(TOKENS_URL))
|
if(urlLineEdit->text() != QString(TOKENS_URL))
|
||||||
wizard()->settings->setValue("tokensurl", urlLineEdit->text());
|
wizard()->settings->setValue("tokensurl", urlLineEdit->text());
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user