mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove the explicit UTF-8 conversions
Thanks to commit bdbfdcdfa0fb ('Ask Qt 4 to use the UTF-8 codec as the "codec for C strings"') we no longer need the explicit UTF-8 conversion when creating QStrings from char *. Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
106659774a
commit
1d0d42f861
2 changed files with 8 additions and 8 deletions
|
@ -60,7 +60,7 @@ Translator::Translator(QObject *parent):
|
|||
QString Translator::translate(const char *context, const char *sourceText,
|
||||
const char *disambiguation) const
|
||||
{
|
||||
return QString::fromUtf8(gettext(sourceText));
|
||||
return gettext(sourceText);
|
||||
}
|
||||
|
||||
static const GdkPixdata subsurface_icon_pixbuf = {};
|
||||
|
@ -1795,7 +1795,7 @@ void MainWindow::setCurrentFileName(const QString &fileName)
|
|||
|
||||
void MainWindow::on_actionOpen_triggered()
|
||||
{
|
||||
QString defaultFileName = QString::fromUtf8(prefs.default_filename);
|
||||
QString defaultFileName = prefs.default_filename;
|
||||
QFileInfo fileInfo(defaultFileName);
|
||||
|
||||
QFileDialog dialog(this, tr("Open File"), fileInfo.path());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue