@@ -37,7 +37,6 @@ CLANG_DIAG_OFF(deprecated)
3737#include < QVBoxLayout>
3838#include < QTabWidget>
3939#include < QFile>
40- #include < QTextCodec>
4140#include < QItemSelectionModel>
4241#include < QHeaderView>
4342#include < QDir>
@@ -130,7 +129,7 @@ AboutWindow::AboutWindow(QWidget* parent)
130129 QString licenseStr;
131130 QFile license ( QString::fromUtf8 (" :LICENSE_SHORT.txt" ) );
132131 license.open (QIODevice::ReadOnly | QIODevice::Text);
133- licenseStr = NATRON_NAMESPACE::convertFromPlainText (QTextCodec::codecForName ( " UTF-8 " )-> toUnicode ( license.readAll () ), NATRON_NAMESPACE::WhiteSpaceNormal);
132+ licenseStr = NATRON_NAMESPACE::convertFromPlainText (QString::fromUtf8 ( license.readAll () ), NATRON_NAMESPACE::WhiteSpaceNormal);
134133 aboutText.append (licenseStr);
135134 }
136135 {
@@ -445,7 +444,7 @@ AboutWindow::AboutWindow(QWidget* parent)
445444 {
446445 QFile changelogFile ( QString::fromUtf8 (" :CHANGELOG.md" ) );
447446 changelogFile.open (QIODevice::ReadOnly | QIODevice::Text);
448- _changelogText->setText ( QTextCodec::codecForName ( " UTF-8 " )-> toUnicode ( changelogFile.readAll () ) );
447+ _changelogText->setText ( QString::fromUtf8 ( changelogFile.readAll () ) );
449448 }
450449 _tabWidget->addTab ( _changelogText, tr (" Changelog" ) );
451450
@@ -460,7 +459,7 @@ AboutWindow::AboutWindow(QWidget* parent)
460459 {
461460 QFile team_file ( QString::fromUtf8 (" :CONTRIBUTORS.txt" ) );
462461 team_file.open (QIODevice::ReadOnly | QIODevice::Text);
463- _teamText->setText ( QTextCodec::codecForName ( " UTF-8 " )-> toUnicode ( team_file.readAll () ) );
462+ _teamText->setText ( QString::fromUtf8 ( team_file.readAll () ) );
464463 }
465464 _tabWidget->addTab ( _teamText, tr (" Contributors" ) );
466465
@@ -469,7 +468,7 @@ AboutWindow::AboutWindow(QWidget* parent)
469468 {
470469 QFile license ( QString::fromUtf8 (" :LICENSE.txt" ) );
471470 license.open (QIODevice::ReadOnly | QIODevice::Text);
472- _licenseText->setText ( QTextCodec::codecForName ( " UTF-8 " )-> toUnicode ( license.readAll () ) );
471+ _licenseText->setText ( QString::fromUtf8 ( license.readAll () ) );
473472 }
474473 _tabWidget->addTab ( _licenseText, tr (" License" ) );
475474
@@ -563,7 +562,7 @@ AboutWindow::onSelectionChanged(const QItemSelection & newSelection,
563562 fileName += ( item->text () == QString::fromUtf8 (" README" ) ) ? QString::fromUtf8 (" .md" ) : QString::fromUtf8 (" .txt" );
564563 QFile file (fileName);
565564 if ( file.open (QIODevice::ReadOnly | QIODevice::Text) ) {
566- QString content = QTextCodec::codecForName ( " UTF-8 " )-> toUnicode ( file.readAll () );
565+ QString content = QString::fromUtf8 ( file.readAll () );
567566 _thirdPartyBrowser->setText (content);
568567 }
569568 }
0 commit comments