aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/WorldList.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-08-13 13:10:58 +0100
committerGitHub <noreply@github.com>2023-08-13 13:10:58 +0100
commita44cb6430eac81e6e89283c50b57142ca7f05747 (patch)
treef51678d129432b0a68d22de0178ccb8fd4f9a927 /launcher/minecraft/WorldList.cpp
parent44153a28e369943ea16545146fec81f7a62e44dd (diff)
parent35358f8180468af1572c35425b1f60c899d6b07d (diff)
downloadPrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.tar.gz
PrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.tar.bz2
PrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.zip
Merge pull request #1107 from Ryex/chore/add-compiler-warnings
Introduce more strict compiler warnings and fix them
Diffstat (limited to 'launcher/minecraft/WorldList.cpp')
-rw-r--r--launcher/minecraft/WorldList.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/launcher/minecraft/WorldList.cpp b/launcher/minecraft/WorldList.cpp
index 0feee299..fe089378 100644
--- a/launcher/minecraft/WorldList.cpp
+++ b/launcher/minecraft/WorldList.cpp
@@ -278,7 +278,7 @@ QVariant WorldList::data(const QModelIndex &index, int role) const
}
}
-QVariant WorldList::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant WorldList::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
{
switch (role)
{
@@ -320,7 +320,6 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
default:
return QVariant();
}
- return QVariant();
}
QStringList WorldList::mimeTypes() const
@@ -373,7 +372,7 @@ QMimeData *WorldList::mimeData(const QModelIndexList &indexes) const
if (indexes.size() == 0)
return new QMimeData();
- QList<World> worlds;
+ QList<World> worlds_;
for(auto idx : indexes)
{
if(idx.column() != 0)
@@ -381,13 +380,13 @@ QMimeData *WorldList::mimeData(const QModelIndexList &indexes) const
int row = idx.row();
if (row < 0 || row >= this->worlds.size())
continue;
- worlds.append(this->worlds[row]);
+ worlds_.append(this->worlds[row]);
}
- if(!worlds.size())
+ if(!worlds_.size())
{
return new QMimeData();
}
- return new WorldMimeData(worlds);
+ return new WorldMimeData(worlds_);
}
Qt::ItemFlags WorldList::flags(const QModelIndex &index) const