[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bgluon=5D_player=3A_Fix_the_downloadableCount_value_?=
From: Laszlo Papp <djszapi () archlinux ! us>
Date: 2011-03-31 20:23:40
Message-ID: 20110331202340.D9905A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit cc1e6d0bd9b4c37b7b5b1f80cbcefff87e802dc3 by Laszlo Papp.
Committed on 31/03/2011 at 22:15.
Pushed by lpapp into branch 'master'.
Fix the downloadableCount value as far as the signal needs to be emitted
M +4 -6 player/lib/models/gameitemsmodel.cpp
M +0 -1 player/lib/models/gameitemsmodel.h
M +0 -1 player/touch/Home.qml
http://commits.kde.org/gluon/cc1e6d0bd9b4c37b7b5b1f80cbcefff87e802dc3
diff --git a/player/lib/models/gameitemsmodel.cpp \
b/player/lib/models/gameitemsmodel.cpp index d717a58..fa555e4 100644
--- a/player/lib/models/gameitemsmodel.cpp
+++ b/player/lib/models/gameitemsmodel.cpp
@@ -70,7 +70,6 @@ GameItemsModel::GameItemsModel( QObject* parent )
roles[ProjectDirNameRoleDownloadable] = "projectDirNameDownloadable";
roles[ScreenshotUrlsRoleDownloadable] = "screenshotUrlsDownloadable";
roles[IDRoleDownloadable] = "idDownloadable";
- roles[StatusRoleDownloadable] = "statusDownloadable";
setRoleNames(roles);
fetchGamesList();
@@ -95,10 +94,10 @@ QVariant GameItemsModel::data( const QModelIndex& index, int role \
) const
return m_gameViewItems.values(GameViewItem::Installed).at( index.row() \
)->projectFileName(); case ScreenshotUrlsRole:
return m_gameViewItems.values(GameViewItem::Installed).at( index.row() \
)->screenshotUrls(); + case StatusRole:
+ return m_gameViewItems.values(GameViewItem::Installed).at( index.row() \
)->status(); case IDRole:
return m_gameViewItems.values(GameViewItem::Installed).at( index.row() \
)->id();
- case StatusRole:
- return m_gameViewItems.values(GameViewItem::Installed).at(index.row() \
)->status();
// Downloadable Game item roles
case GameNameRoleDownloadable:
@@ -113,8 +112,6 @@ QVariant GameItemsModel::data( const QModelIndex& index, int role \
) const
return m_gameViewItems.values(GameViewItem::Downloadable).at( index.row() \
)->screenshotUrls(); case IDRoleDownloadable:
return m_gameViewItems.values(GameViewItem::Downloadable).at( index.row() \
)->id();
- case StatusRoleDownloadable:
- return m_gameViewItems.values(GameViewItem::Downloadable).at(index.row() \
)->status(); default:
break;
}
@@ -203,7 +200,8 @@ void GameItemsModel::processFetchedGamesList(Attica::BaseJob* \
job)
m_gameViewItems.insertMulti(GameViewItem::Downloadable, gameViewItem);
reset();
}
-}
+ emit downloadableCountChanged();
+ }
else
{
qDebug() << "Could not fetch information";
diff --git a/player/lib/models/gameitemsmodel.h b/player/lib/models/gameitemsmodel.h
index 0e62717..16b219b 100644
--- a/player/lib/models/gameitemsmodel.h
+++ b/player/lib/models/gameitemsmodel.h
@@ -67,7 +67,6 @@ namespace GluonPlayer
ProjectDirNameRoleDownloadable,
ProjectFileNameRoleDownloadable,
ScreenshotUrlsRoleDownloadable,
- StatusRoleDownloadable,
IDRoleDownloadable,
};
diff --git a/player/touch/Home.qml b/player/touch/Home.qml
index b421b74..cd26fd4 100644
--- a/player/touch/Home.qml
+++ b/player/touch/Home.qml
@@ -62,7 +62,6 @@ Rectangle {
if (!mainview.loggedIn) {
mainview.statepoint = "mainwindow";
}
- // detailsPage.propagate(gameName, gameDescription, \
screenshotUrls, status, index); }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic