refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -321,7 +321,8 @@ bool World::install(const QString &to, const QString &name)
|
||||
|
||||
if(ok && !name.isEmpty() && m_actualName != name)
|
||||
{
|
||||
World newWorld(finalPath);
|
||||
QFileInfo finalPathInfo(finalPath);
|
||||
World newWorld(finalPathInfo);
|
||||
if(newWorld.isValid())
|
||||
{
|
||||
newWorld.rename(name);
|
||||
|
@ -301,7 +301,11 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
QVariant retrieveData(const QString &mimetype, QMetaType type) const
|
||||
#else
|
||||
QVariant retrieveData(const QString &mimetype, QVariant::Type type) const
|
||||
#endif
|
||||
{
|
||||
QList<QUrl> urls;
|
||||
for(auto &world: m_worlds)
|
||||
|
@ -317,7 +317,8 @@ bool ModFolderModel::installMod(const QString &filename)
|
||||
return false;
|
||||
}
|
||||
FS::updateTimestamp(newpath);
|
||||
installedMod.repath(newpath);
|
||||
QFileInfo newpathInfo(newpath);
|
||||
installedMod.repath(newpathInfo);
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
@ -335,7 +336,8 @@ bool ModFolderModel::installMod(const QString &filename)
|
||||
qWarning() << "Copy of folder from" << originalPath << "to" << newpath << "has (potentially partially) failed.";
|
||||
return false;
|
||||
}
|
||||
installedMod.repath(newpath);
|
||||
QFileInfo newpathInfo(newpath);
|
||||
installedMod.repath(newpathInfo);
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user