Permalink
Browse files

Enabled threaded syncs

  • Loading branch information...
1 parent 2d8cb51 commit 54c10a0aec80a333c83df4d2c210d66f36743fc1 @bzar committed Apr 23, 2012
Submodule src updated 1 files
+1 −1 src/repository.cpp
@@ -82,17 +82,6 @@ View {
anchors.horizontalCenter: parent.horizontalCenter
spacing: pnd.installed && !pnd.isDownloading && pnd.hasUpgrade ? 8 : 16
Button {
- label: "Launch"
- sublabel: Utils.prettySize(pnd.size)
- control: "keyboard-enter"
- color: Theme.colors.install
- width: 256
- height: 64
- radius: 4
- visible: pnd.installed && !pnd.isDownloading
- onClicked: execute()
- }
- Button {
label: "Install"
sublabel: Utils.prettySize(pnd.size)
control: "game-y"
@@ -125,6 +114,18 @@ View {
visible: pnd.installed && pnd.hasUpgrade && !pnd.isDownloading
onClicked: upgrade()
}
+ Button {
+ label: "Launch"
+ sublabel: Utils.prettySize(pnd.size)
+ control: "keyboard-enter"
+ color: Theme.colors.install
+ width: 256
+ height: 64
+ radius: 4
+ visible: pnd.installed && !pnd.isDownloading
+ onClicked: execute()
+ }
+
Column {
width: 256
height: 64
@@ -153,7 +153,6 @@ void PNDManager::crawl()
{
device->crawl();
}
- //repository->update();
localRepository->update();
updatePackages();
emit crawlDone();
@@ -197,8 +196,8 @@ void PNDManager::updatePackages()
QPndman::Package* remotePackage = remote.value(p->getId(), 0);
if(localPackage || remotePackage)
{
- p->setLocalPackage(localPackage);
p->setRemotePackage(remotePackage);
+ p->setLocalPackage(localPackage);
packagesById.insert(p->getId(), p);
}
else
@@ -44,17 +44,17 @@ SyncWorkerSingletonThread* SyncWorkerSingleton::thread = 0;
SyncWorkerSingleton *SyncWorkerSingleton::instance()
{
-/* if(thread == 0)
+ if(thread == 0)
{
thread = new SyncWorkerSingletonThread(QApplication::instance());
thread->start(QThread::LowPriority);
while(thread->getSingleton() == 0) {
QThread::yieldCurrentThread();
}
}
- return thread->getSingleton();*/
- static SyncWorkerSingleton* singleton = new SyncWorkerSingleton(QApplication::instance());
- return singleton;
+ return thread->getSingleton();
+ /*static SyncWorkerSingleton* singleton = new SyncWorkerSingleton(QApplication::instance());
+ return singleton;*/
}
SyncWorkerSingleton::~SyncWorkerSingleton()

0 comments on commit 54c10a0

Please sign in to comment.