Skip to content

Commit 0dc124d

Browse files
committed
Fix compiling for Qt 6.9.0 (Nice)
1 parent 118dbc6 commit 0dc124d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

launcher/meta/JsonFormat.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,10 @@ void serializeRequires(QJsonObject & objOut, RequireSet* ptr, const char * keyNa
8080
MetadataVersion currentFormatVersion();
8181
}
8282

83+
// HACK: Qt needs the items of container metatypes to be QDebug-able so just implement it to do nothing since we dont actually use it
84+
inline QDebug operator<<(QDebug debug, const Meta::Require &set)
85+
{
86+
return debug;
87+
}
88+
8389
Q_DECLARE_METATYPE(std::set<Meta::Require>)

launcher/minecraft/launch/ConfigureAuthlibInjector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void ConfigureAuthlibInjector::executeTask()
3131
Net::Download::makeCached(QUrl("https://authlib-injector.yushi.moe/artifact/latest.json"), entry, Net::Download::Option::NoOptions);
3232
m_job->addNetAction(latestJsonDl);
3333
connect(m_job.get(), &NetJob::succeeded, this, [this, entry, downloadFailed] {
34-
QFile authlibInjectorLatestJson = entry->getFullPath();
34+
QFile authlibInjectorLatestJson{entry->getFullPath()};
3535
authlibInjectorLatestJson.open(QIODevice::ReadOnly);
3636
if (!authlibInjectorLatestJson.isOpen())
3737
return emitFailed(QString("Failed to open authlib-injector info json: %1").arg(authlibInjectorLatestJson.errorString()));

0 commit comments

Comments
 (0)