Fixed openURL cast for resource
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
(cherry picked from commit 9a33bdcf50
)
This commit is contained in:
parent
b12dffe420
commit
bb843b86ab
@ -404,9 +404,9 @@ void ResourcePage::openUrl(const QUrl& url)
|
|||||||
auto jump = [url, slug, model, view] {
|
auto jump = [url, slug, model, view] {
|
||||||
for (int row = 0; row < model->rowCount({}); row++) {
|
for (int row = 0; row < model->rowCount({}); row++) {
|
||||||
const QModelIndex index = model->index(row);
|
const QModelIndex index = model->index(row);
|
||||||
const auto pack = model->data(index, Qt::UserRole).value<ModPlatform::IndexedPack>();
|
const auto pack = model->data(index, Qt::UserRole).value<ModPlatform::IndexedPack::Ptr>();
|
||||||
|
|
||||||
if (pack.slug == slug) {
|
if (pack->slug == slug) {
|
||||||
view->setCurrentIndex(index);
|
view->setCurrentIndex(index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user