Bug 133852

Summary: Install stuff using "newest" or "most downloads" category doesn't work anymore
Product: [Unmaintained] kdelibs Reporter: Jörg Hermsdorf <yojoe>
Component: knewstuffAssignee: Josef Spillner <spillner>
Status: RESOLVED FIXED    
Severity: normal CC: everettattebury, heavytull
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jörg Hermsdorf 2006-09-10 13:12:24 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs

You can't install stuff using KNewStuff dialogs anymore, when you list things via the "newest" or "most downloads" category. When you click an item, no preview is loaded and the "Install" Button stays greyed out. Only the first category (highest rated) works.
I tested this with superkaramba, wallpapers, amarok themes, amarok scripts, ...
This bug occurs since upgrade to KDE 3.5.4, I think.
Comment 1 Damien Gombault 2006-09-10 13:51:11 UTC
I confirm this with KDE 3.5.4 on Gentoo AMD64.
Comment 2 Philip Rodrigues 2006-09-12 12:02:18 UTC
Confirmed on r581764
Comment 3 Philip Rodrigues 2006-09-15 14:50:47 UTC
Some analysis: this stems from the change in r547281 in which the KTabCtl was changed to a QTabWidget to fix RTL issues. The connect() call in line 258 is then invalid, since QTabWidget has no tabSelected() signal. I tried fixing this with the QTabWidget calls, but I couldn't get it to work. No doubt I'm missing something obvious though.

Note that changing the QTabWidget back to a KTabCtl fixes this bug (but presumably causes the bug fixed by the previous commit).
Comment 4 Philip Rodrigues 2006-09-16 16:41:32 UTC
*** Bug 134130 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Kling 2006-09-16 19:13:18 UTC
SVN commit 585244 by kling:

Unbreak "latest" and "most downloads" views.

BUG: 131979
BUG: 133852


 M  +3 -2      downloaddialog.cpp  
 M  +1 -1      downloaddialog.h  


--- branches/KDE/3.5/kdelibs/knewstuff/downloaddialog.cpp #585243:585244
@@ -255,7 +255,7 @@
   ctl->addTab(w_l, i18n("Latest"));
 
   m_curtab = 0;
-  connect(ctl, SIGNAL(tabSelected(int)), SLOT(slotTab(int)));
+  connect(ctl, SIGNAL(currentChanged(QWidget *)), SLOT(slotTab()));
 
   QHBoxLayout *box = new QHBoxLayout(frame);
   box->add(ctl);
@@ -601,8 +601,9 @@
   delete m_s;
 }
 
-void DownloadDialog::slotTab(int tab)
+void DownloadDialog::slotTab()
 {
+  int tab = static_cast<const QTabWidget *>(sender())->currentPageIndex();
   kdDebug() << "switch tab to: " << tab << endl;
 
   Entry *eold = getEntry();
--- branches/KDE/3.5/kdelibs/knewstuff/downloaddialog.h #585243:585244
@@ -216,7 +216,7 @@
     void slotInstall();
     void slotDetails();
     void slotInstalled(KIO::Job *job);
-    void slotTab(int tab);
+    void slotTab();
     void slotSelected();
     void slotPage(QWidget *w);
     void slotFinish();
Comment 6 Philip Rodrigues 2006-12-20 22:37:25 UTC
*** Bug 139015 has been marked as a duplicate of this bug. ***