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

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdelibs/kdeprint/management
From:       Dirk Mueller <mueller () kde ! org>
Date:       2002-12-08 6:41:08
[Download RAW message or body]

CVS commit by mueller: 

shell quoting fixlets


  M +9 -4      smbview.cpp   1.7.2.1


--- kdelibs/kdeprint/management/smbview.cpp   1.7.2.1:
@@ -125,6 +125,8 @@ void SmbView::setOpen(QListViewItem *ite
                 { // opening group
                         m_current = item;
-                        QString cmd = QString("nmblookup -M %1 -S | grep '<20>' | \
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*<20>.*//' | xargs -iserv_name smbclient \
-L 'serv_name' -W %2 \
%3").arg(KProcess::quote(item->text(0))).arg(KProcess::quote(item->text(0))).arg(smbPasswordString(m_login,m_password));
                
-                        *m_proc << cmd;
+                        *m_proc << "nmblookup -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 -L 'serv_name' -W "; +      \
*m_proc << KProcess::quote(item->text(0)) + " "+ \
KProcess::quote(smbPasswordString(m_login,m_password));  startProcess(ServerListing);
                 }
@@ -132,6 +134,9 @@ void SmbView::setOpen(QListViewItem *ite
                 { // opening server
                         m_current = item;
-                        QString cmd = QString("smbclient -L %1 -W %2 \
%3").arg(KProcess::quote(item->text(0))).arg(KProcess::quote(item->parent()->text(0))).arg(smbPasswordString(m_login,m_password));
                
-                        *m_proc << cmd;
+                        *m_proc << "smbclient -L ";
+                        *m_proc << KProcess::quote(item->text(0));
+                        *m_proc << "-W";
+                        *m_proc << KProcess::quote(item->text(0));
+                        *m_proc << \
KProcess::quote(smbPasswordString(m_login,m_password));  startProcess(ShareListing);
                 }


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

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