KProcess -> K3Process

KShellProcess -> K3ShellProcess
KProcIO -> K3ProcIO
KProcessController -> K3ProcessController

not deprecating, as we don't have a replacement yet.
not moving yet, as kdelibs still has heavy dependencies on it.

agreed upon with dfaure.


svn path=/trunk/KDE/kdebase/nsplugins/; revision=646732
This commit is contained in:
Oswald Buddenhagen 2007-03-26 15:07:10 +00:00
parent 3a45248397
commit 11ca147adf
18 changed files with 63 additions and 63 deletions

View file

@ -44,7 +44,7 @@
#include <kaboutdata.h>
#include <kgenericfactory.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <k3process.h>
#include <kio/netaccess.h>
#include <kurl.h>
#include <k3urldrag.h>
@ -109,7 +109,7 @@ KCMUserAccount::KCMUserAccount( QWidget *parent, const QStringList &)
void KCMUserAccount::slotChangePassword()
{
KProcess *proc = new KProcess;
K3Process *proc = new K3Process;
QString bin = KGlobal::dirs()->findExe("kdepasswd");
if ( bin.isNull() )
{
@ -123,7 +123,7 @@ void KCMUserAccount::slotChangePassword()
}
*proc << bin << _ku->loginName() ;
proc->start(KProcess::DontCare);
proc->start(K3Process::DontCare);
delete proc;

View file

@ -28,7 +28,7 @@
#include <klocale.h>
#include <kapplication.h>
#include <krun.h>
#include <kprocess.h>
#include <k3process.h>
#include <kpropertiesdialog.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>

View file

@ -20,10 +20,10 @@ KQuery::KQuery(QObject *parent)
m_timeFrom(0), m_timeTo(0),
job(0), m_insideCheckEntries(false), m_result(0)
{
processLocate = new KProcess(this);
connect(processLocate,SIGNAL(receivedStdout(KProcess*, char*, int)),this,SLOT(slotreceivedSdtout(KProcess*,char*,int)));
connect(processLocate,SIGNAL(receivedStderr(KProcess*, char*, int)),this,SLOT(slotreceivedSdterr(KProcess*,char*,int)));
connect(processLocate,SIGNAL(processExited(KProcess*)),this,SLOT(slotendProcessLocate(KProcess*)));
processLocate = new K3Process(this);
connect(processLocate,SIGNAL(receivedStdout(K3Process*, char*, int)),this,SLOT(slotreceivedSdtout(K3Process*,char*,int)));
connect(processLocate,SIGNAL(receivedStderr(K3Process*, char*, int)),this,SLOT(slotreceivedSdterr(K3Process*,char*,int)));
connect(processLocate,SIGNAL(processExited(K3Process*)),this,SLOT(slotendProcessLocate(K3Process*)));
// Files with these mime types can be ignored, even if
// findFormatByFileContent() in some cases may claim that
@ -84,7 +84,7 @@ void KQuery::start()
*processLocate << m_url.path( KUrl::AddTrailingSlash ).toLatin1();
bufferLocate=NULL;
bufferLocateLength=0;
processLocate->start(KProcess::NotifyOnExit,KProcess::AllOutput);
processLocate->start(K3Process::NotifyOnExit,K3Process::AllOutput);
return;
}
@ -488,12 +488,12 @@ void KQuery::setUseFileIndex(bool useLocate)
m_useLocate=useLocate;
}
void KQuery::slotreceivedSdterr(KProcess* ,char* str,int)
void KQuery::slotreceivedSdterr(K3Process* ,char* str,int)
{
KMessageBox::error(NULL, QString(str), i18n("Error while using locate"));
}
void KQuery::slotreceivedSdtout(KProcess*,char* str,int l)
void KQuery::slotreceivedSdtout(K3Process*,char* str,int l)
{
int i;
@ -504,7 +504,7 @@ void KQuery::slotreceivedSdtout(KProcess*,char* str,int l)
bufferLocate[bufferLocateLength-l+i]=str[i];
}
void KQuery::slotendProcessLocate(KProcess*)
void KQuery::slotendProcessLocate(K3Process*)
{
QString qstr;
QStringList strlist;

View file

@ -12,7 +12,7 @@
#include <kio/job.h>
#include <kurl.h>
#include <kprocess.h>
#include <k3process.h>
class KFileItem;
@ -54,9 +54,9 @@ class KQuery : public QObject
void slotListEntries(KIO::Job *, const KIO::UDSEntryList &);
void slotResult(KJob *);
void slotCanceled(KJob *);
void slotreceivedSdtout(KProcess*,char*,int);
void slotreceivedSdterr(KProcess*,char*,int);
void slotendProcessLocate(KProcess*);
void slotreceivedSdtout(K3Process*,char*,int);
void slotreceivedSdterr(K3Process*,char*,int);
void slotendProcessLocate(K3Process*);
Q_SIGNALS:
void addFile(const KFileItem *filename, const QString& matchingLine);
@ -87,7 +87,7 @@ class KQuery : public QObject
char* bufferLocate;
int bufferLocateLength;
QStringList locateList;
KProcess *processLocate;
K3Process *processLocate;
QList<QRegExp*> m_regexps;// regexps for file name
// QValueList<bool> m_regexpsContainsGlobs; // what should this be good for ? Alex
KIO::ListJob *job;

View file

@ -24,7 +24,7 @@
#include <kio/jobuidelegate.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kprocess.h>
#include <k3process.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kmimetypetrader.h>
@ -376,18 +376,18 @@ bool ClientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, co
id.initId( startup_id_str );
id.setupStartupEnv();
#endif
KProcess proc;
K3Process proc;
proc << "kshell" << "konqueror";
if ( !mimetype.isEmpty() )
proc << "-mimetype" << mimetype;
if ( tempFile )
proc << "-tempfile";
proc << url.url();
proc.start( KProcess::DontCare );
proc.start( K3Process::DontCare );
#ifdef Q_WS_X11
KStartupInfo::resetStartupEnv();
#endif
kDebug( 1202 ) << "ClientApp::createNewWindow KProcess started" << endl;
kDebug( 1202 ) << "ClientApp::createNewWindow K3Process started" << endl;
//}
}
return true;

View file

@ -114,7 +114,7 @@
#include <kicon.h>
#include <kiconloader.h>
#include <kmenu.h>
#include <kprocess.h>
#include <k3process.h>
#include <kio/scheduler.h>
#include <kio/netaccess.h>
#include <kacceleratormanager.h>
@ -1403,7 +1403,7 @@ void KonqMainWindow::slotOpenTerminal()
}
}
KProcess cmd;
K3Process cmd;
cmd.setWorkingDirectory(dir);
// Compensate for terminal having arguments.
@ -1413,7 +1413,7 @@ void KonqMainWindow::slotOpenTerminal()
kDebug(1202) << "slotOpenTerminal: directory " << dir
<< ", terminal:" << term << endl;
cmd.start(KProcess::DontCare);
cmd.start(K3Process::DontCare);
}
void KonqMainWindow::slotOpenLocation()

View file

@ -29,7 +29,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <kprocess.h>
#include <k3process.h>
#include <knuminput.h>
#include "ksaveioconfig.h"
@ -127,9 +127,9 @@ void KCacheConfigDialog::configChanged()
void KCacheConfigDialog::slotClearCache()
{
KProcess process;
K3Process process;
process << "kio_http_cache_cleaner" << "--clear-all";
process.start(KProcess::DontCare);
process.start(K3Process::DontCare);
// Cleaning up might take a while. Better detach.
process.detach();
}

View file

@ -24,7 +24,7 @@
#include <k3listview.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocio.h>
#include <k3procio.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
@ -325,7 +325,7 @@ void KPluginOptions::scan()
save();
}
KProcIO* nspluginscan = new KProcIO;
K3ProcIO* nspluginscan = new K3ProcIO;
QString scanExe = KGlobal::dirs()->findExe("nspluginscan");
if (scanExe.isEmpty()) {
kDebug() << "can't find nspluginviewer" << endl;
@ -345,9 +345,9 @@ void KPluginOptions::scan()
// start nspluginscan
*nspluginscan << scanExe << "--verbose";
kDebug() << "Running nspluginscan" << endl;
connect(nspluginscan, SIGNAL(readReady(KProcIO*)),
this, SLOT(progress(KProcIO*)));
connect(nspluginscan, SIGNAL(processExited(KProcess *)),
connect(nspluginscan, SIGNAL(readReady(K3ProcIO*)),
this, SLOT(progress(K3ProcIO*)));
connect(nspluginscan, SIGNAL(processExited(K3Process *)),
this, SLOT(scanDone()));
connect(m_progress, SIGNAL(canceled()), this, SLOT(scanDone()));
@ -366,7 +366,7 @@ void KPluginOptions::scan()
m_widget->scanButton->setEnabled(true);
}
void KPluginOptions::progress(KProcIO *proc)
void KPluginOptions::progress(K3ProcIO *proc)
{
QString line;
while(proc->readln(line) > 0)

View file

@ -28,7 +28,7 @@ class QProgressDialog;
class QSlider;
class KDialog;
class KPluginOptions;
class KProcIO;
class K3ProcIO;
namespace Ui {
class NSConfigWidget;
}
@ -119,7 +119,7 @@ private:
protected Q_SLOTS:
void progress(KProcIO *);
void progress(K3ProcIO *);
void updatePLabel(int);
void change() { change( true ); }
void change( bool c ) { emit changed(c); m_changed = c; }

View file

@ -22,7 +22,7 @@
#include <kinputdialog.h>
#include <kmessagebox.h>
#include <konq_dirpart.h>
#include <kprocess.h>
#include <k3process.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:" ),
KProcess::quote( path ), &ok, part->widget() );
K3Process::quote( path ), &ok, part->widget() );
if ( ok )
{
QString chDir;
chDir="cd ";
chDir+=KProcess::quote(part->url().path());
chDir+=K3Process::quote(part->url().path());
chDir+="; ";
chDir+=cmd;

View file

@ -37,7 +37,7 @@
#include <kfileitem.h>
#include <kio/netaccess.h>
#include <kmenu.h>
#include <kprocess.h>
#include <k3process.h>
#include <kurlrequesterdialog.h>
#include <kinputdialog.h>
#include <kfiledialog.h>
@ -460,9 +460,9 @@ void Sidebar_Widget::initialCopy()
!dirEntries.contains( *eIt ) )
{ // we don't have that one yet -> copy it.
QString cp("cp -R -- ");
cp += KProcess::quote(dirtree_dir + *eIt);
cp += K3Process::quote(dirtree_dir + *eIt);
cp += " ";
cp += KProcess::quote(m_path);
cp += K3Process::quote(m_path);
kDebug() << "SidebarWidget::intialCopy executing " << cp << endl;
::system( QFile::encodeName(cp) );
}

View file

@ -47,7 +47,7 @@
#include <kinputdialog.h>
#include <kio/netaccess.h>
#include <kmimetype.h>
#include <kprocess.h>
#include <k3process.h>
#include <kpropertiesdialog.h>
#include <kprotocolinfo.h>
#include <kstandarddirs.h>
@ -679,9 +679,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 += KProcess::quote(dirtree_dir + *eIt);
cp += K3Process::quote(dirtree_dir + *eIt);
cp += " ";
cp += KProcess::quote(path);
cp += K3Process::quote(path);
kDebug(1201) << "KonqSidebarTree::scanDir executing " << cp << endl;
::system( QFile::encodeName(cp) );
}

View file

@ -32,7 +32,7 @@
#include <kshell.h>
#include <kshortcut.h>
#include <kprotocolmanager.h>
#include <kprocess.h>
#include <k3process.h>
#include <kio/job.h>
#include <kio/deletejob.h>
#include <kio/jobuidelegate.h>
@ -80,7 +80,7 @@ KonqOperations::~KonqOperations()
void KonqOperations::editMimeType( const QString & mimeType )
{
QString keditfiletype = QLatin1String("keditfiletype");
KRun::runCommand( keditfiletype + " " + KProcess::quote(mimeType),
KRun::runCommand( keditfiletype + " " + K3Process::quote(mimeType),
keditfiletype, keditfiletype /*unused*/);
}
@ -443,7 +443,7 @@ void KonqOperations::asyncDrop( const KFileItem * destItem )
// (If this fails, there is a bug in KFileItem::acceptsDrops / KDirModel::flags)
kDebug(1203) << "KonqOperations::doDrop " << m_destUrl.path() << "should be an executable" << endl;
Q_ASSERT ( access( QFile::encodeName(m_destUrl.path()), X_OK ) == 0 );
KProcess proc;
K3Process proc;
proc << m_destUrl.path() ;
// Launch executable for each of the files
KUrl::List lst = m_info->urls;
@ -451,7 +451,7 @@ void KonqOperations::asyncDrop( const KFileItem * destItem )
for ( ; it != lst.end() ; it++ )
proc << (*it).path(); // assume local files
kDebug(1203) << "starting " << m_destUrl.path() << " with " << lst.count() << " arguments" << endl;
proc.start( KProcess::DontCare );
proc.start( K3Process::DontCare );
}
delete this;
}

View file

@ -40,7 +40,7 @@
#include <kdesktopfile.h>
#include <kparts/componentfactory.h>
#include <kfileshare.h>
#include <kprocess.h>
#include <k3process.h>
#include <kauthorized.h>
#include <kglobal.h>

View file

@ -31,7 +31,7 @@
#include <kdebug.h>
#include <kapplication.h>
#include <kprocio.h>
#include <k3procio.h>
#include <ktoolinvocation.h>
extern "C"

View file

@ -30,7 +30,7 @@
#include <kapplication.h>
#include <kprocess.h>
#include <k3process.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
@ -271,7 +271,7 @@ bool NSPluginLoader::loadViewer()
kDebug() << "NSPluginLoader::loadViewer" << endl;
_running = false;
_process = new KProcess;
_process = new K3Process;
// get the dcop app id
int pid = (int)getpid();
@ -279,8 +279,8 @@ bool NSPluginLoader::loadViewer()
tmp.sprintf("org.kde.nspluginviewer-%d",pid);
_dbusService =tmp.toLatin1();
connect( _process, SIGNAL(processExited(KProcess*)),
this, SLOT(processTerminated(KProcess*)) );
connect( _process, SIGNAL(processExited(K3Process*)),
this, SLOT(processTerminated(K3Process*)) );
// find the external viewer process
QString viewer = KGlobal::dirs()->findExe("nspluginviewer");
@ -383,7 +383,7 @@ void NSPluginLoader::applicationRegistered( const QString& appId )
}
void NSPluginLoader::processTerminated(KProcess *proc)
void NSPluginLoader::processTerminated(K3Process *proc)
{
if ( _process == proc)
{

View file

@ -42,7 +42,7 @@
#define EMBEDCLASS QX11EmbedWidget
class OrgKdeNspluginsViewerInterface;
class KProcess;
class K3Process;
class QPushButton;
class QGridLayout;
class OrgKdeNspluginsInstanceInterface;
@ -99,13 +99,13 @@ protected:
protected Q_SLOTS:
void applicationRegistered( const QString& appId );
void processTerminated( KProcess *proc );
void processTerminated( K3Process *proc );
private:
QStringList _searchPaths;
Q3Dict<QString> _mapping, _filetype;
KProcess *_process;
K3Process *_process;
bool _running;
QString _dbusService;
OrgKdeNspluginsViewerInterface *_viewer;

View file

@ -51,7 +51,7 @@
#include <kprotocolmanager.h>
#include <klibloader.h>
#include <klocale.h>
#include <kprocess.h>
#include <k3process.h>
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
#include <kurl.h>
@ -507,20 +507,20 @@ void g_NPN_ReloadPlugins(NPBool reloadPages)
{
// http://devedge.netscape.com/library/manuals/2002/plugin/1.0/npn_api15.html#999713
kDebug(1431) << "g_NPN_ReloadPlugins()" << endl;
KProcess p;
K3Process p;
p << KGlobal::dirs()->findExe("nspluginscan");
if (reloadPages) {
// This is the proper way, but it cannot be done because we have no
// handle to the caller! How stupid! We cannot force all konqi windows
// to reload - that would be evil.
//p.start(KProcess::Block);
//p.start(K3Process::Block);
// Let's only allow the caller to be reloaded, not everything.
//if (_callback)
// _callback->reloadPage();
p.start(KProcess::DontCare);
p.start(K3Process::DontCare);
} else {
p.start(KProcess::DontCare);
p.start(K3Process::DontCare);
}
}