Bug 134049 - Hide password in the quick connect dialog
Summary: Hide password in the quick connect dialog
Status: RESOLVED FIXED
Alias: None
Product: kftpgrabber
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jernej Kos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 06:51 UTC by LuRan
Modified: 2006-10-26 19:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LuRan 2006-09-14 06:51:17 UTC
Version:           svn snapshot (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.1.1 with gentoo patches
OS:                Linux

The password in the 'password' lineedit is covered with '*', but they can still be seen in the 'url' and 'select connection', also a button to delete the current selected item of connection will be handy too.
Comment 1 Jernej Kos 2006-10-26 19:29:41 UTC
SVN commit 599327 by kostko:

Hide passwords from recent site list in quick connect dialog.

BUG: 134049

 M  +15 -5     quickconnect.cpp  
 M  +5 -1      quickconnect.h  


--- trunk/extragear/network/kftpgrabber/src/widgets/quickconnect.cpp #599326:599327
@@ -86,7 +86,7 @@
   connect(m_layout->passwordBox, SIGNAL(textChanged(const QString&)), this, SLOT(slotPassChanged()));
   connect(m_layout->portBox, SIGNAL(valueChanged(int)), this, SLOT(slotPortChanged(int)));
   connect(m_layout->anonLogin, SIGNAL(clicked()), this, SLOT(slotAnonClicked()));
-  connect(m_layout->recentConnections, SIGNAL(activated(const QString&)), this, SLOT(slotRecentConnectionActivated(const QString&)));
+  connect(m_layout->recentConnections, SIGNAL(activated(int)), this, SLOT(slotRecentConnectionActivated(int)));
 
   // Init url
   m_url.setProtocol("ftp");
@@ -110,8 +110,16 @@
   m_layout->serverEncoding->setCurrentText(defEncoding);
   
   // Populate recent sites
-  m_layout->recentConnections->insertStringList(KFTPCore::Config::recentSites());
-  slotRecentConnectionActivated(KFTPCore::Config::recentSites().first());
+  int index = 0;
+  QStringList recentSites = KFTPCore::Config::recentSites();
+  for (QStringList::Iterator i = recentSites.begin(); i != recentSites.end(); ++i) {
+    KURL siteUrl = KURL(*i);
+    
+    m_recentSites[index] = siteUrl;
+    m_layout->recentConnections->insertItem(siteUrl.prettyURL(), index++);
+  }
+  
+  slotRecentConnectionActivated(0);
 }
 
 QuickConnectDialog::~QuickConnectDialog()
@@ -120,9 +128,10 @@
     delete m_protocolAdvancedDialog;
 }
 
-void QuickConnectDialog::slotRecentConnectionActivated(const QString &url)
+void QuickConnectDialog::slotRecentConnectionActivated(int index)
 {
-  m_layout->urlBox->setText(url);
+  KURL url = m_recentSites[index];
+  m_layout->urlBox->setText(url.url());
   
   if (m_url.user() == "anonymous") {
     m_layout->anonLogin->setChecked(true);
@@ -182,6 +191,7 @@
     m_layout->portBox->setValue(m_url.port());
   }
   
+  m_layout->urlBox->setText(m_url.prettyURL());
   m_noUrlChange = false;
 }
 
--- trunk/extragear/network/kftpgrabber/src/widgets/quickconnect.h #599326:599327
@@ -39,6 +39,8 @@
 
 #include "kftpquickconnectlayout.h"
 
+#include <qmap.h>
+
 #include <kdialogbase.h>
 #include <kurl.h>
 
@@ -138,6 +140,8 @@
     Bookmarks::BookmarkEditorTLS *m_protocolAdvancedDialog;
 
     bool m_portChanged;
+    
+    QMap<int, KURL> m_recentSites;
 private slots:
     virtual void slotOk();
 
@@ -149,7 +153,7 @@
     void slotAnonClicked();
     void slotProtocolChanged(int);
     void slotProtoAdvancedClicked();
-    void slotRecentConnectionActivated(const QString &url);
+    void slotRecentConnectionActivated(int index);
 };
 
 }