refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@@ -64,7 +64,9 @@ QString getCreditsHtml()
|
||||
{
|
||||
QString output;
|
||||
QTextStream stream(&output);
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
|
||||
stream.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
stream << "<center>\n";
|
||||
|
||||
//: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Developers"
|
||||
|
@@ -16,7 +16,7 @@ NewsDialog::NewsDialog(QList<NewsEntryPtr> entries, QWidget* parent) : QDialog(p
|
||||
m_article_list_hidden = ui->articleListWidget->isHidden();
|
||||
|
||||
auto first_item = ui->articleListWidget->item(0);
|
||||
ui->articleListWidget->setItemSelected(first_item, true);
|
||||
first_item->setSelected(true);
|
||||
|
||||
auto article_entry = m_entries.constFind(first_item->text()).value();
|
||||
ui->articleTitleLabel->setText(QString("<a href='%1'>%2</a>").arg(article_entry->link, first_item->text()));
|
||||
|
Reference in New Issue
Block a user