[kmobiletools] KDE/kdepim
Laurent Montel
montel at kde.org
Sat Jun 16 20:25:59 CEST 2007
SVN commit 676358 by mlaurent:
K3Process::quote -> KShell::quoteArg
M +2 -1 kmail/kmfilteraction.cpp
M +15 -15 kmail/kmfoldermbox.cpp
M +3 -2 kmobiletools/kmtsetup/main.cpp
M +4 -4 korganizer/komailclient.cpp
M +2 -2 korganizer/urihandler.cpp
M +2 -2 libkdepim/kcmdesignerfields.cpp
M +2 -2 libkpgp/kpgpbase2.cpp
M +3 -3 libkpgp/kpgpbase5.cpp
M +3 -3 libkpgp/kpgpbaseG.cpp
--- trunk/KDE/kdepim/kmail/kmfilteraction.cpp #676357:676358
@@ -40,6 +40,7 @@
#include <k3process.h>
#include <kurlrequester.h>
#include <phonon/audioplayer.h>
+#include <kshell.h>
// Qt headers:
#include <QTextCodec>
@@ -489,7 +490,7 @@
QRegExp header_rx( "%\\{([a-z0-9-]+)\\}", Qt::CaseInsensitive );
int idx = 0;
while ( ( idx = header_rx.indexIn( result, idx ) ) != -1 ) {
- QString replacement = K3Process::quote( aMsg->headerField( header_rx.cap(1).toLatin1() ) );
+ QString replacement = KShell::quoteArg( aMsg->headerField( header_rx.cap(1).toLatin1() ) );
result.replace( idx, header_rx.matchedLength(), replacement );
idx += replacement.length();
}
--- trunk/KDE/kdepim/kmail/kmfoldermbox.cpp #676357:676358
@@ -39,7 +39,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <knotification.h>
-#include <k3process.h>
+#include <kshell.h>
#include <kconfig.h>
#include <kconfiggroup.h>
@@ -390,9 +390,9 @@
case procmail_lockfile:
cmd_str = "lockfile -l20 -r5 ";
if (!mProcmailLockFileName.isEmpty())
- cmd_str += QFile::encodeName(K3Process::quote(mProcmailLockFileName));
+ cmd_str += QFile::encodeName(KShell::quoteArg(mProcmailLockFileName));
else
- cmd_str += QFile::encodeName(K3Process::quote(location() + ".lock"));
+ cmd_str += QFile::encodeName(KShell::quoteArg(location() + ".lock"));
rc = system( cmd_str.data() );
if( rc != 0 )
@@ -404,7 +404,7 @@
}
if( mIndexStream )
{
- cmd_str = "lockfile -l20 -r5 " + QFile::encodeName(K3Process::quote(indexLocation() + ".lock"));
+ cmd_str = "lockfile -l20 -r5 " + QFile::encodeName(KShell::quoteArg(indexLocation() + ".lock"));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -417,7 +417,7 @@
break;
case mutt_dotlock:
- cmd_str = "mutt_dotlock " + QFile::encodeName(K3Process::quote(location()));
+ cmd_str = "mutt_dotlock " + QFile::encodeName(KShell::quoteArg(location()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -428,7 +428,7 @@
}
if( mIndexStream )
{
- cmd_str = "mutt_dotlock " + QFile::encodeName(K3Process::quote(indexLocation()));
+ cmd_str = "mutt_dotlock " + QFile::encodeName(KShell::quoteArg(indexLocation()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -441,7 +441,7 @@
break;
case mutt_dotlock_privileged:
- cmd_str = "mutt_dotlock -p " + QFile::encodeName(K3Process::quote(location()));
+ cmd_str = "mutt_dotlock -p " + QFile::encodeName(KShell::quoteArg(location()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -452,7 +452,7 @@
}
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -p " + QFile::encodeName(K3Process::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -p " + QFile::encodeName(KShell::quoteArg(indexLocation()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -519,34 +519,34 @@
case procmail_lockfile:
cmd_str = "rm -f ";
if (!mProcmailLockFileName.isEmpty())
- cmd_str += QFile::encodeName(K3Process::quote(mProcmailLockFileName));
+ cmd_str += QFile::encodeName(KShell::quoteArg(mProcmailLockFileName));
else
- cmd_str += QFile::encodeName(K3Process::quote(location() + ".lock"));
+ cmd_str += QFile::encodeName(KShell::quoteArg(location() + ".lock"));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "rm -f " + QFile::encodeName(K3Process::quote(indexLocation() + ".lock"));
+ cmd_str = "rm -f " + QFile::encodeName(KShell::quoteArg(indexLocation() + ".lock"));
rc = system( cmd_str.data() );
}
break;
case mutt_dotlock:
- cmd_str = "mutt_dotlock -u " + QFile::encodeName(K3Process::quote(location()));
+ cmd_str = "mutt_dotlock -u " + QFile::encodeName(KShell::quoteArg(location()));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -u " + QFile::encodeName(K3Process::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -u " + QFile::encodeName(KShell::quoteArg(indexLocation()));
rc = system( cmd_str.data() );
}
break;
case mutt_dotlock_privileged:
- cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(K3Process::quote(location()));
+ cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KShell::quoteArg(location()));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(K3Process::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KShell::quoteArg(indexLocation()));
rc = system( cmd_str.data() );
}
break;
--- trunk/KDE/kdepim/kmobiletools/kmtsetup/main.cpp #676357:676358
@@ -28,6 +28,7 @@
#include <k3process.h>
#include <kdebug.h>
#include <kstandarddirs.h>
+#include <kshell.h>
static const char description[] =
I18N_NOOP("KMobileTools Permission Wizard");
@@ -45,10 +46,10 @@
QString thisAppName=KStandardDirs::findExe(args->appName());
kDebug() << "Trying to start " << thisAppName << endl;
K3Process process;
- process << "kdesu" << "-t" << K3Process::quote(thisAppName);
+ process << "kdesu" << "-t" << KShell::quoteArg(thisAppName);
if(process.start( K3Process::Block ) && process.exitStatus()==0 ) return true;
process.clearArguments();
- process << "gksu" << "-d" << K3Process::quote(thisAppName);
+ process << "gksu" << "-d" << KShell::quoteArg(thisAppName);
if(process.start( K3Process::Block ) && process.exitStatus()==0 ) return true;
return false;
}
--- trunk/KDE/kdepim/korganizer/komailclient.cpp #676357:676358
@@ -38,7 +38,7 @@
#include <kurl.h>
#include <kapplication.h>
#include <ktoolinvocation.h>
-#include <k3process.h>
+#include <kshell.h>
#include <QtDBus>
#include <QByteArray>
@@ -147,15 +147,15 @@
if (command.isNull()) return false; // give up
command.append(QString::fromLatin1(" -s "));
- command.append(K3Process::quote(subject));
+ command.append(KShell::quoteArg(subject));
if (bcc) {
command.append(QString::fromLatin1(" -b "));
- command.append(K3Process::quote(from));
+ command.append(KShell::quoteArg(from));
}
command.append(" ");
- command.append(K3Process::quote(to));
+ command.append(KShell::quoteArg(to));
needHeaders = false;
}
--- trunk/KDE/kdepim/korganizer/urihandler.cpp #676357:676358
@@ -36,7 +36,7 @@
#include <kiconloader.h>
#include <krun.h>
#include <kapplication.h>
-#include <k3process.h>
+#include <kshell.h>
#include <kdebug.h>
#include <ktoolinvocation.h>
@@ -76,7 +76,7 @@
*/
QString iconPath = KIconLoader::global()->iconPath( "go", K3Icon::Small );
QString tmpStr = "kaddressbook --editor-only --uid ";
- tmpStr += K3Process::quote( uri.mid( ::qstrlen( KDEPIMPROTOCOL_CONTACT ) )
+ tmpStr += KShell::quoteArg( uri.mid( ::qstrlen( KDEPIMPROTOCOL_CONTACT ) )
);
KRun::runCommand( tmpStr, "KAddressBook", iconPath, 0 );
return true;
--- trunk/KDE/kdepim/libkdepim/kcmdesignerfields.cpp #676357:676358
@@ -44,7 +44,7 @@
#include <kglobal.h>
#include <k3listview.h>
#include <klocale.h>
-#include <k3process.h>
+#include <kshell.h>
#include <krun.h>
#include <kstandarddirs.h>
#include <kdirwatch.h>
@@ -437,7 +437,7 @@
Q3ListViewItem *item = mPageView->selectedItem();
if ( item ) {
PageItem *pageItem = static_cast<PageItem*>( item->parent() ? item->parent() : item );
- cmdLine += ' ' + K3Process::quote( pageItem->path() );
+ cmdLine += ' ' + KShell::quoteArg( pageItem->path() );
}
KRun::runCommand( cmdLine, topLevelWidget());
--- trunk/KDE/kdepim/libkpgp/kpgpbase2.cpp #676357:676358
@@ -27,7 +27,7 @@
#include <QByteArray>
#include <klocale.h>
-#include <k3process.h>
+#include <kshell.h>
#include <kdebug.h>
#define PGP2 "pgp"
@@ -531,7 +531,7 @@
for ( QStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
- exitStatus = run( cmd + " " + K3Process::quote( *it ).toLocal8Bit(),
+ exitStatus = run( cmd + " " + KShell::quoteArg( *it ).toLocal8Bit(),
0, true );
if ( exitStatus != 0 ) {
--- trunk/KDE/kdepim/libkpgp/kpgpbase5.cpp #676357:676358
@@ -29,7 +29,7 @@
#include <QByteArray>
#include <klocale.h>
-#include <k3process.h>
+#include <kshell.h>
#include <kdebug.h>
@@ -363,7 +363,7 @@
for ( QStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
- cmd += K3Process::quote( *it ).toLocal8Bit();
+ cmd += KShell::quoteArg( *it ).toLocal8Bit();
}
status = 0;
exitStatus = run( cmd, 0, true );
@@ -393,7 +393,7 @@
for ( QStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
- cmd += K3Process::quote( *it ).toLocal8Bit();
+ cmd += KShell::quoteArg( *it ).toLocal8Bit();
}
status = 0;
exitStatus = run( cmd, 0, true );
--- trunk/KDE/kdepim/libkpgp/kpgpbaseG.cpp #676357:676358
@@ -20,7 +20,7 @@
#include "kpgp.h"
#include <klocale.h>
-#include <k3process.h>
+#include <kshell.h>
#include <kdebug.h>
#include <QTextCodec>
@@ -412,7 +412,7 @@
for ( QStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
- cmd += K3Process::quote( *it ).toLocal8Bit();
+ cmd += KShell::quoteArg( *it ).toLocal8Bit();
}
status = 0;
exitStatus = runGpg( cmd, 0, true );
@@ -444,7 +444,7 @@
for ( QStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
- cmd += K3Process::quote( *it ).toLocal8Bit();
+ cmd += KShell::quoteArg( *it ).toLocal8Bit();
}
status = 0;
exitStatus = runGpg( cmd, 0, true );
More information about the kmobiletools
mailing list