[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/drkonqi
From:       Darío Andrés Rodríguez <andresbajotierra () gmail ! co
Date:       2009-11-30 21:41:37
Message-ID: 1259617297.080256.28560.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1056796 by darioandres:

- Set the "possible duplicates by query" list already sorted (newest first)



 M  +10 -3     reportassistantpages_bugzilla_duplicates.cpp  
 M  +2 -2      reportinterface.cpp  
 M  +1 -1      reportinterface.h  


--- trunk/KDE/kdebase/runtime/drkonqi/reportassistantpages_bugzilla_duplicates.cpp #1056795:1056796
@@ -131,13 +131,22 @@
 void BugzillaDuplicatesPage::aboutToHide()
 {
     stopCurrentSearch();
-    
+
+    //Save selected possible duplicates by user
     QStringList possibleDuplicates;
     int count = ui.m_selectedDuplicatesList->count();
     for(int i = 0; i<count; i++) {
         possibleDuplicates << ui.m_selectedDuplicatesList->item(i)->text();
     }
     reportInterface()->setPossibleDuplicates(possibleDuplicates);
+
+    //Save possible duplicates by query
+    QStringList duplicatesByQuery;
+    count = ui.m_bugListWidget->topLevelItemCount();
+    for(int i = 1; i<count; i++) {
+        duplicatesByQuery << ui.m_bugListWidget->topLevelItem(i)->text(0);
+    }
+    reportInterface()->setPossibleDuplicatesByQuery(duplicatesByQuery);
 }
 
 bool BugzillaDuplicatesPage::isComplete()
@@ -304,8 +313,6 @@
 
             QStringList fields = QStringList() << bug["bug_id"] << title;
             ui.m_bugListWidget->addTopLevelItem(new QTreeWidgetItem(fields));
-
-            reportInterface()->addPossibleDuplicateByQuery(bug["bug_id"]);
         }
 
         ui.m_bugListWidget->sortItems(0 , Qt::DescendingOrder);
--- trunk/KDE/kdebase/runtime/drkonqi/reportinterface.cpp #1056795:1056796
@@ -364,9 +364,9 @@
     return m_attachToBugNumber;
 }
 
-void ReportInterface::addPossibleDuplicateByQuery(const QString & duplicate)
+void ReportInterface::setPossibleDuplicatesByQuery(const QStringList & list)
 {
-    m_allPossibleDuplicatesByQuery.append(duplicate);
+    m_allPossibleDuplicatesByQuery = list;
 }
 
 BugzillaManager * ReportInterface::bugzillaManager() const
--- trunk/KDE/kdebase/runtime/drkonqi/reportinterface.h #1056795:1056796
@@ -69,7 +69,7 @@
     void setAttachToBugNumber(uint);
     uint attachToBugNumber() const;
 
-    void addPossibleDuplicateByQuery(const QString &);
+    void setPossibleDuplicatesByQuery(const QStringList &);
 
     BugzillaManager * bugzillaManager() const;
     
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic