mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
Address comments, move dialog to appropriate folder.
This commit is contained in:
parent
f33c6a4db0
commit
9a3e748580
6 changed files with 44 additions and 41 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "decklist.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QFutureWatcher>
|
||||
|
|
@ -228,7 +229,7 @@ struct FormatDeckListForExport
|
|||
QString &sideBoardCards;
|
||||
// create main operator for struct, allowing the foreachcard to work.
|
||||
FormatDeckListForExport(QString &_mainBoardCards, QString &_sideBoardCards)
|
||||
: mainBoardCards(_mainBoardCards), sideBoardCards(_sideBoardCards){};
|
||||
: mainBoardCards(_mainBoardCards), sideBoardCards(_sideBoardCards) {};
|
||||
|
||||
void operator()(const InnerDecklistNode *node, const DecklistCardNode *card) const
|
||||
{
|
||||
|
|
@ -485,7 +486,7 @@ bool DeckLoader::convertToCockatriceFormat(QString fileName)
|
|||
{
|
||||
// Change the file extension to .cod
|
||||
QFileInfo fileInfo(fileName);
|
||||
QString newFileName = fileInfo.path() + "/" + fileInfo.completeBaseName() + ".cod";
|
||||
QString newFileName = QDir::toNativeSeparators(fileInfo.path() + "/" + fileInfo.completeBaseName() + ".cod");
|
||||
|
||||
// Open the new file for writing
|
||||
QFile file(newFileName);
|
||||
|
|
@ -509,6 +510,7 @@ bool DeckLoader::convertToCockatriceFormat(QString fileName)
|
|||
default:
|
||||
qCWarning(DeckLoaderLog) << "Unsupported file format for conversion:" << fileName;
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue