Commit 7c21e77e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

KShell::quotearg

svn path=/trunk/KDE/kdebase/apps/; revision=676435
parent e671950f
......@@ -22,7 +22,7 @@
#include <kinputdialog.h>
#include <kmessagebox.h>
#include <konq_dirpart.h>
#include <k3process.h>
#include <kshell.h>
#include <kapplication.h>
#include "kshellcmddialog.h"
#include <kgenericfactory.h>
......@@ -72,12 +72,12 @@ void KShellCmdPlugin::slotExecuteShellCommand()
bool ok;
QString cmd = KInputDialog::getText( i18n("Execute Shell Command"),
i18n( "Execute shell command in current directory:" ),
K3Process::quote( path ), &ok, part->widget() );
KShell::quoteArg( path ), &ok, part->widget() );
if ( ok )
{
QString chDir;
chDir="cd ";
chDir+=K3Process::quote(part->url().path());
chDir+=KShell::quoteArg(part->url().path());
chDir+="; ";
chDir+=cmd;
......
......@@ -42,7 +42,7 @@
#include <kfileitem.h>
#include <kio/netaccess.h>
#include <kmenu.h>
#include <k3process.h>
#include <kshell.h>
#include <kurlrequesterdialog.h>
#include <kfiledialog.h>
#include <kdesktopfile.h>
......@@ -465,9 +465,9 @@ void Sidebar_Widget::initialCopy()
!dirEntries.contains( *eIt ) )
{ // we don't have that one yet -> copy it.
QString cp("cp -R -- ");
cp += K3Process::quote(dirtree_dir + *eIt);
cp += KShell::quoteArg(dirtree_dir + *eIt);
cp += ' ';
cp += K3Process::quote(m_path);
cp += KShell::quoteArg(m_path);
kDebug() << "SidebarWidget::intialCopy executing " << cp << endl;
::system( QFile::encodeName(cp) );
}
......
......@@ -44,7 +44,7 @@
#include <kinputdialog.h>
#include <kio/netaccess.h>
#include <kmimetype.h>
#include <k3process.h>
#include <kshell.h>
#include <kpropertiesdialog.h>
#include <kprotocolinfo.h>
#include <kstandarddirs.h>
......@@ -676,9 +676,9 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path,
&& !entries.contains( *eIt ) && !dirEntries.contains( *eIt ) )
{ // we don't have that one yet -> copy it.
QString cp("cp -R -- ");
cp += K3Process::quote(dirtree_dir + *eIt);
cp += KShell::quoteArg(dirtree_dir + *eIt);
cp += ' ';
cp += K3Process::quote(path);
cp += KShell::quoteArg(path);
kDebug(1201) << "KonqSidebarTree::scanDir executing " << cp << endl;
::system( QFile::encodeName(cp) );
}
......
......@@ -49,6 +49,7 @@
#include <kfileitem.h>
#include <kdesktopfile.h>
#include <kimageio.h>
#include <kshell.h>
#include <konq_iconviewwidget.h>
#include <QtDBus/QtDBus>
......@@ -81,7 +82,7 @@ void KonqOperations::editMimeType( const QString & mimeType, QWidget* parent )
QString keditfiletype = QLatin1String("keditfiletype");
KRun::runCommand( keditfiletype
+ " --parent " + QString::number( (long)parent->winId())
+ ' ' + K3Process::quote(mimeType),
+ ' ' + KShell::quoteArg(mimeType),
keditfiletype, keditfiletype /*unused*/, parent );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment