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

List:       kde-commits
Subject:    branches/work/klinkstatus4-tidy
From:       Paulo Moura Guedes <moura () kdewebdev ! org>
Date:       2007-02-01 1:36:37
Message-ID: 1170293797.312963.29593.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 628951 by mojo:

Merged revisions 628846-628948 via svnmerge from 
https://mojo@svn.kde.org/home/kde/trunk/KDE/kdewebdev/klinkstatus

........
  r628948 | mojo | 2007-02-01 01:25:24 +0000 (Thu, 01 Feb 2007) | 1 line
  
  Some fixes (I hope) I have in my disk for a long time (longer than my memory can take).
........


 _M            . (directory)  
 M  +1 -1      src/parser/mstring.cpp  
 M  +1 -1      src/parser/url.cpp  
 M  +2 -1      src/ui/resultssearchbar.cpp  
 M  +11 -12    src/ui/sessionwidget.cpp  
 M  +1 -1      src/ui/tabwidgetsession.cpp  
 M  +1 -18     src/ui/treeview.cpp  


** branches/work/klinkstatus4-tidy #property svnmerge-integrated
   - /trunk/KDE/kdewebdev/klinkstatus:1-628845
   + /trunk/KDE/kdewebdev/klinkstatus:1-628948
--- branches/work/klinkstatus4-tidy/src/parser/mstring.cpp #628950:628951
@@ -68,7 +68,7 @@
         }
         --indice;
 
-        while(encontrou && indice_palavra != palavra.length() && indice < s.length())
+        while(encontrou && indice_palavra != palavra.length() && indice < s.length() && indice >= 0)
         {
             indice = nextNonSpaceChar(s, indice);
 
--- branches/work/klinkstatus4-tidy/src/parser/url.cpp #628950:628951
@@ -80,7 +80,7 @@
                 _string_url[0] == '?' || // query
                 _string_url[0] == '#') ) // fragment or reference
         {
-            s_url.append(base_url.fileName(false));
+            s_url.append(base_url.fileName(KUrl::ObeyTrailingSlash));
         }
 
         s_url.append(_string_url);
--- branches/work/klinkstatus4-tidy/src/ui/resultssearchbar.cpp #628950:628951
@@ -187,9 +187,10 @@
 void ResultsSearchBar::slotActivateSearch()
 {
     kDebug(23100) << "ResultsSearchBar::slotActivateSearch" << endl;
+
+    d->timer.stop();
     
     LinkStatusHelper::Status status = selectedStatus();
-    
     emit signalSearch(LinkMatcher(d->searchLine->text(), status));
 }
 
--- branches/work/klinkstatus4-tidy/src/ui/sessionwidget.cpp #628950:628951
@@ -237,7 +237,10 @@
 
     newSearchManager();
 
-    insertUrlAtCombobox(combobox_url->currentText());
+    // WORKAROUND addToHistory breaks currentText()
+    QString current_text = combobox_url->currentText();
+    insertUrlAtCombobox(current_text);
+
     combobox_url->saveItems();
     progressbar_checker->reset();
     progressbar_checker->setPercentageVisible(true);
@@ -252,7 +255,7 @@
     //table_linkstatus->clear();
     tree_view->clear();
 
-    KUrl url = Url::normalizeUrl(combobox_url->currentText());
+    KUrl url = Url::normalizeUrl(current_text);
 
     if(!url.protocol().startsWith("http"))
     {
@@ -339,10 +342,7 @@
         checkbox_external_links->hasFocus() ||
         checkbox_subdirs_only->hasFocus() ) )
     {
-        if(validFields())
-        {
-            slotStartSearch();
-        }
+        slotStartSearch();
     }
 
     else if(e->key() == Qt::Key_F6)
@@ -353,16 +353,14 @@
 
 bool SessionWidget::validFields()
 {
-    KUrl url = Url::normalizeUrl(combobox_url->currentText());
-
-    if(combobox_url->currentText().isEmpty())
+    QString url_string = combobox_url->currentText();
+//     kDebug() << "SessionWidget::validFields: " << url_string << endl;
+    if(url_string.isEmpty())
     {
         KMessageBox::sorry(this, i18n("Cowardly refusing to check an empty URL."));
         return false;
     }
-
-    else
-        return true;
+    return true;
 }
 
 void SessionWidget::slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal)
@@ -495,6 +493,7 @@
 
 void SessionWidget::insertUrlAtCombobox(QString const& url)
 {
+//     kDebug() << "SessionWidget::insertUrlAtCombobox: " << url << endl;
     combobox_url->addToHistory(url);
 }
 
--- branches/work/klinkstatus4-tidy/src/ui/tabwidgetsession.cpp #628950:628951
@@ -184,7 +184,7 @@
         if(url.fileName(KUrl::ObeyTrailingSlash).isEmpty())
             label = url.prettyUrl();
         else
-            label = url.fileName(false);
+            label = url.fileName(KUrl::ObeyTrailingSlash);
         
         label = KStringHandler::lsqueeze(label, 30);        
     }
--- branches/work/klinkstatus4-tidy/src/ui/treeview.cpp #628950:628951
@@ -262,24 +262,7 @@
 
 void TreeView::slotEditReferrerWithQuanta(QAction* action)
 {
-  int index = actions().indexOf(action);
-
-    if(index == 0)
-        return;
-    Q_ASSERT(index != -1);
-    Q_ASSERT(index != 1); // separator
-
-    //kDebug(23100) << "id: " << id << endl;
-    //kDebug(23100) << "index: " << index << endl;
-
-    index -= 2; // The list of referrers starts on index = 2
-
-    TreeViewItem* _item = myItem(currentItem());
-    if(!_item) return;
-    Q3ValueVector<KUrl> referrers = _item->linkStatus()->referrers();
-    Q_ASSERT(index >= 0 && index < referrers.size());
-
-    slotEditReferrerWithQuanta(referrers[index]);
+    slotEditReferrerWithQuanta(KUrl(action->text()));
 }
 
 void TreeView::slotEditReferrerWithQuanta(KUrl const& url)
[prev in list] [next in list] [prev in thread] [next in thread] 

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