forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prismlauncher: add patch for qt 6.6 support
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From c39637720109dd5d97750907c51e9c0fb8f43f0b Mon Sep 17 00:00:00 2001 | ||
From: Nick Cao <[email protected]> | ||
Date: Wed, 11 Oct 2023 22:51:23 -0400 | ||
Subject: [PATCH] launcher/translations: explicitly convert QVector iterators | ||
to pointers | ||
|
||
--- | ||
launcher/translations/TranslationsModel.cpp | 5 ++--- | ||
1 file changed, 2 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp | ||
index 2763cca2..64c21dbd 100644 | ||
--- a/launcher/translations/TranslationsModel.cpp | ||
+++ b/launcher/translations/TranslationsModel.cpp | ||
@@ -524,7 +524,7 @@ Language * TranslationsModel::findLanguage(const QString& key) | ||
} | ||
else | ||
{ | ||
- return found; | ||
+ return &(*found); | ||
} | ||
} | ||
|
||
@@ -655,8 +655,7 @@ QModelIndex TranslationsModel::selectedIndex() | ||
auto found = findLanguage(d->m_selectedLanguage); | ||
if(found) | ||
{ | ||
- // QVector iterator freely converts to pointer to contained type | ||
- return index(found - d->m_languages.begin(), 0, QModelIndex()); | ||
+ return index(found - &(*d->m_languages.begin()), 0, QModelIndex()); | ||
} | ||
return QModelIndex(); | ||
} | ||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters