diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 03:46:01 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 03:46:01 +0000 |
commit | 865f314dd5ed55508f45a32973b709b79a541e36 (patch) | |
tree | dc1a3a884bb2fc10a89a3c46313897d22c5771eb /kdeprint/management/smbview.cpp | |
parent | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff) | |
download | tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip |
kdelibs update to Trinity v3.5.11
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/management/smbview.cpp')
-rw-r--r-- | kdeprint/management/smbview.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp index 79e088209..6cf5ee4c8 100644 --- a/kdeprint/management/smbview.cpp +++ b/kdeprint/management/smbview.cpp @@ -179,11 +179,8 @@ void SmbView::setOpen(QListViewItem *item, bool on) m_current = item; *m_proc << "nmblookup"+m_wins_server+"-M "; *m_proc << KProcess::quote(item->text(0)); - *m_proc << " -S | grep '<20>' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*<20>.*//' | xargs -Iserv_name smbclient -N -L 'serv_name' -W "; - *m_proc << KProcess::quote(item->text(0)); - *m_proc << " -A "; - *m_proc << KProcess::quote(m_passwdFile->name()); - startProcess(ServerListing); + *m_proc << " -S"; + startProcess(ServerListing); } else if (item->depth() == 1) { // opening server @@ -192,8 +189,11 @@ void SmbView::setOpen(QListViewItem *item, bool on) *m_proc << KProcess::quote(item->text(0)); *m_proc << " -W "; *m_proc << KProcess::quote(item->parent()->text(0)); - *m_proc << " -A "; - *m_proc << KProcess::quote(m_passwdFile->name()); + if (m_login != QString::null) + { + *m_proc << " -A "; + *m_proc << KProcess::quote(m_passwdFile->name()); + } startProcess(ShareListing); } } @@ -220,16 +220,14 @@ void SmbView::processServers() QStringList lines = QStringList::split('\n',m_buffer,true); QString line; uint index(0); - for (;index < lines.count();index++) - if (lines[index].stripWhiteSpace().startsWith("Server")) - break; - index += 2; while (index < lines.count()) { line = lines[index++].stripWhiteSpace(); if (line.isEmpty()) break; QStringList words = QStringList::split(' ',line,false); + if (words[1] != "<00>" || words[3] == "<GROUP>") + continue; QListViewItem *item = new QListViewItem(m_current,words[0]); item->setExpandable(true); item->setPixmap(0,SmallIcon("kdeprint_computer")); |