Skip to content

Commit

Permalink
Bugfix:#333 Accented letters in annotations in UTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Jun 14, 2024
1 parent abbb5ec commit 8898a88
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/database/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ void Output::outputLatin1(const QString& filename, Database& database)
f.close();
}

QString Output::output(Database* database)
QString Output::outputUtf8(Database* database)
{
QString s;
QTextStream out(&s);
Expand Down
2 changes: 1 addition & 1 deletion src/database/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Output : public QObject
/** Create the output for the given database
* @param database A pointer to a database object. All games in the database will be output, one
* after the other, using the output(GameX* game) method */
QString output(Database* database);
QString outputUtf8(Database* database);

/** Append output to a closed file */
bool append(const QString& filename, GameX& game);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ bool MainWindow::confirmQuit()
{
if (dbi->database()->isModified())
{
output.outputLatin1(dbi->database()->filename(), *(dbi->database()));
output.output(dbi->database()->filename(), *(dbi->database()));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/mainwindowactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void MainWindow::saveDatabase(DatabaseInfo* dbInfo)
startOperation(tr("Saving %1...").arg(db->name()));
Output output(Output::Pgn, &BoardView::renderImageForBoard);
connect(&output, SIGNAL(progress(int)), SLOT(slotOperationProgress(int)));
output.outputLatin1(db->filename(), *db);
output.output(db->filename(), *db);
finishOperation(tr("%1 saved").arg(db->name()));
}
}
Expand Down Expand Up @@ -3443,7 +3443,7 @@ void MainWindow::copyFromDatabase(int preselect, QList<GameId> gameIndexList)
else
{
Output out(Output::Pgn);
QString s = out.output(dest);
QString s = out.outputUtf8(dest);
QApplication::clipboard()->setText(s);
QString msg = tr("Set %1 games into system clipboard.").arg(n);
slotStatusMessage(msg);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/testadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void TestAdapter::convertPgn(const QString& filename, const QString& outfile, QC
}

Output output(lc ? Output::LocalPgn : Output::Pgn);
output.outputLatin1(outfile, db);
output.output(outfile, db);
}
}

Expand Down

0 comments on commit 8898a88

Please sign in to comment.