Make use Harmattan Transfer Ui.

NEW
Unassigned

Status

7 years ago
7 years ago

People

(Reporter: jbos, Unassigned)

Tracking

Trunk
ARM
MeeGo

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
.Make use Harmattan Transfer Ui.
(Reporter)

Comment 1

7 years ago
Created attachment 559987 [details] [diff] [review]
Adds download manager impl. to qt version and attaches this way to transfer ui
Attachment #559987 - Flags: review?(romaxa)
Comment on attachment 559987 [details] [diff] [review]
Adds download manager impl. to qt version and attaches this way to transfer ui

>+ * Copyright (c) 2011 Nokia Corporation
>+ * All rights reserved.

License header is wrong

>+
>+MozDownloadManager *MozDownloadManager::gTransferUiService = 0;
 Type* var = x;

>+
>+MozDownloadManager *
Type*


>+MozDownloadManager::Observe(nsISupports * aData,
>+                                        const char *aTopic,
>+                                        const PRUnichar *)

indent and pointer style...


>+
>+    if (!observerService)
>+        return NS_ERROR_FAILURE;
>+    if (!mClient)
>+        return NS_ERROR_FAILURE;
{}, here and many other places below.

>+        QMap<PRUint32, Transfer*>::const_iterator i = mDownloads.constBegin();
>+        while (i != mDownloads.constEnd()) {
>+            downloadManager->PauseDownload(i.key());
>+            ++i;
>+	}
indentation broken


>+
>+    if(!mClient->init()) {
if (

>+    connect(mClient,SIGNAL(pauseTransfer (Transfer *)), this,
                      ^ space
>+            SLOT(transferPaused(Transfer *)));

>+NS_IMETHODIMP 
>+MozDownloadManager::GetDocument(nsIDOMDocument**){ return NS_OK; }

no single line function... or move it to header..


>+    if (id == -1) return;
move return to next line..


>+MozDownloadManager::transferErrorRepairRequested (Transfer *transfer)
                                                  ^ no space here
>+{


>diff -r d322900e7388 widget/src/qt/nsScreenManagerQt.cpp
>--- a/widget/src/qt/nsScreenManagerQt.cpp	Mon Aug 29 10:56:50 2011 -0700
>+++ b/widget/src/qt/nsScreenManagerQt.cpp	Tue Sep 13 16:41:28 2011 +0200
>@@ -40,6 +40,10 @@
> #include "qdesktopwidget.h"
> #include "qapplication.h"
> 
>+#ifdef MOZ_ENABLE_MEEGOTOUCH
>+#include "mozDownloadManager.h"
>+#endif
>+
> #include "nsScreenManagerQt.h"
> #include "nsScreenQt.h"
> 
>@@ -66,6 +70,11 @@
>     nScreens = desktop->numScreens();
>     screens = new nsCOMPtr<nsIScreen>[nScreens];
> 
>+#ifdef MOZ_ENABLE_MEEGOTOUCH
>+    // initialize downloadmanager -> it takes care about it self.
>+    MozDownloadManager::GetSingleton();
>+#endif
>+
>     for (int i = 0; i < nScreens; ++i)
>         screens[i] = new nsScreenQt(i);
> }

don't think it is the right place to init transfer listener here 
nsWidgetFactory.cpp is more like better place for that...
Also we should destroy this stull on exit...
Attachment #559987 - Flags: review?(romaxa) → review-
(Reporter)

Comment 3

7 years ago
Created attachment 561210 [details] [diff] [review]
fixed comments - not working yet

have trouble to get initialized. Any idea how this factory thing works?
Attachment #559987 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.