Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 846684d2bd
commit fc49aab70d

@ -43,7 +43,7 @@ namespace KileDialog
// line 1: picture and label // line 1: picture and label
TQLabel *picture = new TQLabel("", labelwidget); TQLabel *picture = new TQLabel("", labelwidget);
picture->setPixmap( KGlobal::instance()->iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium) ); picture->setPixmap( TDEGlobal::instance()->iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium) );
TQLabel *label = new TQLabel(i18n( "Do you really want to delete these files?" ), labelwidget); TQLabel *label = new TQLabel(i18n( "Do you really want to delete these files?" ), labelwidget);
labellayout->addWidget(picture); labellayout->addWidget(picture);
labellayout->addSpacing(20); labellayout->addSpacing(20);

@ -892,7 +892,7 @@ namespace KileDocument
void CodeCompletion::readWordlist( TQStringList &wordlist, const TQString &filename, bool global ) void CodeCompletion::readWordlist( TQStringList &wordlist, const TQString &filename, bool global )
{ {
TQString file = ( global ) TQString file = ( global )
? KGlobal::dirs()->findResource( "appdata", "complete/" + filename ) ? TDEGlobal::dirs()->findResource( "appdata", "complete/" + filename )
: m_localAbbrevFile; : m_localAbbrevFile;
if ( file.isEmpty() ) return; if ( file.isEmpty() ) return;

@ -411,7 +411,7 @@ void ConfigCodeCompletion::getCwlDirs()
m_localCwlDir = locateLocal("appdata","complete/"); m_localCwlDir = locateLocal("appdata","complete/");
m_globalCwlDir = TQString(); m_globalCwlDir = TQString();
TQStringList dirs = KGlobal::dirs()->findDirs("appdata","complete/"); TQStringList dirs = TDEGlobal::dirs()->findDirs("appdata","complete/");
for ( TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it ) for ( TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it )
{ {
if ( (*it) != m_localCwlDir ) if ( (*it) != m_localCwlDir )

@ -161,14 +161,14 @@ void Tester::saveResults(const KURL & dest)
void Tester::runTests() void Tester::runTests()
{ {
TQString srcdir = KGlobal::dirs()->findResourceDir("appdata","test/runTests.sh") + "test"; TQString srcdir = TDEGlobal::dirs()->findResourceDir("appdata","test/runTests.sh") + "test";
KILE_DEBUG() << "Tester::runTests: srcdir = " << srcdir << endl; KILE_DEBUG() << "Tester::runTests: srcdir = " << srcdir << endl;
m_tempDir = new KTempDir(); m_tempDir = new KTempDir();
TQString destdir = m_tempDir->name(); TQString destdir = m_tempDir->name();
KILE_DEBUG() << "Tester::runTests: destdir = " << destdir << endl; KILE_DEBUG() << "Tester::runTests: destdir = " << destdir << endl;
m_resultsFile = destdir + "results.rc"; m_resultsFile = destdir + "results.rc";
TQString shellname = KGlobal::dirs()->findExe("sh"); TQString shellname = TDEGlobal::dirs()->findExe("sh");
KILE_DEBUG() << "Tester::runTests: shellname = " << shellname << endl; KILE_DEBUG() << "Tester::runTests: shellname = " << shellname << endl;
m_process = new KShellProcess(TQFile::encodeName( shellname )); m_process = new KShellProcess(TQFile::encodeName( shellname ));
if (! KileConfig::teXPaths().isEmpty()) if (! KileConfig::teXPaths().isEmpty())
@ -178,9 +178,9 @@ void Tester::runTests()
*m_process << "cd " + KShellProcess::quote(destdir) + " && "; *m_process << "cd " + KShellProcess::quote(destdir) + " && ";
*m_process << "cp " + KShellProcess::quote(srcdir) +"/* " + KShellProcess::quote(destdir) + " && "; *m_process << "cp " + KShellProcess::quote(srcdir) +"/* " + KShellProcess::quote(destdir) + " && ";
*m_process << "source runTests.sh " + KShellProcess::quote(m_resultsFile) + " " + KShellProcess::quote(destdir); *m_process << "source runTests.sh " + KShellProcess::quote(m_resultsFile) + " " + KShellProcess::quote(destdir);
connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(determineProgress(KProcess *, char *, int))); connect(m_process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(determineProgress(TDEProcess *, char *, int)));
connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(processTestResults(KProcess *))); connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(processTestResults(TDEProcess *)));
if (m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) emit(started()); if (m_process->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput)) emit(started());
} }
void Tester::stop() void Tester::stop()
@ -188,7 +188,7 @@ void Tester::stop()
if (m_process) m_process->kill(); if (m_process) m_process->kill();
} }
void Tester::determineProgress(KProcess */*proc*/, char *buf, int len) void Tester::determineProgress(TDEProcess */*proc*/, char *buf, int len)
{ {
static TQString s = TQString(); static TQString s = TQString();
@ -202,7 +202,7 @@ void Tester::determineProgress(KProcess */*proc*/, char *buf, int len)
} }
} }
void Tester::processTestResults (KProcess *proc) void Tester::processTestResults (TDEProcess *proc)
{ {
if (proc->normalExit()) if (proc->normalExit())
{ {

@ -20,7 +20,7 @@
class KTempDir; class KTempDir;
class KConfig; class KConfig;
class KProcess; class TDEProcess;
class KURL; class KURL;
/** /**
@ -83,8 +83,8 @@ signals:
void finished(bool); void finished(bool);
private slots: private slots:
void determineProgress(KProcess *, char *, int); void determineProgress(TDEProcess *, char *, int);
void processTestResults (KProcess *); void processTestResults (TDEProcess *);
void processTool(KConfig *, const TQString &); void processTool(KConfig *, const TQString &);
void addResult(const TQString &tool, const TQValueList<ConfigTest> &tests); void addResult(const TQString &tool, const TQValueList<ConfigTest> &tests);
@ -93,7 +93,7 @@ private:
TQMap<TQString,TQValueList<ConfigTest> > m_results; TQMap<TQString,TQValueList<ConfigTest> > m_results;
TQString m_resultsFile; TQString m_resultsFile;
KTempDir *m_tempDir; KTempDir *m_tempDir;
KProcess *m_process; TDEProcess *m_process;
}; };
#endif #endif

@ -111,7 +111,7 @@ bool ConvertMap::load()
//makeMap(encoding()); //makeMap(encoding());
//if map already exists, replace it //if map already exists, replace it
TQFile qf(KGlobal::dirs()->findResource("appdata","encodings/" + encoding() + ".enc")); TQFile qf(TDEGlobal::dirs()->findResource("appdata","encodings/" + encoding() + ".enc"));
if ( qf.open(IO_ReadOnly) ) if ( qf.open(IO_ReadOnly) )
{ {

@ -34,7 +34,7 @@ DocumentationViewer::DocumentationViewer(TQWidget *parent, const char *name ) :
konqConfig.setGroup("HTML Settings"); konqConfig.setGroup("HTML Settings");
//const KHTMLSettings * set = settings(); //const KHTMLSettings * set = settings();
//( const_cast<KHTMLSettings *>(set) )->init( &konqConfig, false ); //( const_cast<KHTMLSettings *>(set) )->init( &konqConfig, false );
TQString rc = KGlobal::dirs()->findResource("appdata", "docpartui.rc"); TQString rc = TDEGlobal::dirs()->findResource("appdata", "docpartui.rc");
setXMLFile(rc); setXMLFile(rc);
(void) KStdAction::back(this, TQT_SLOT(back()), actionCollection(),"Back" ); (void) KStdAction::back(this, TQT_SLOT(back()), actionCollection(),"Back" );
(void) KStdAction::forward(this, TQT_SLOT(forward()), actionCollection(),"Forward" ); (void) KStdAction::forward(this, TQT_SLOT(forward()), actionCollection(),"Forward" );

@ -410,30 +410,30 @@ void IncludeGraphics::execute(const TQString &command)
m_proc->clearArguments(); m_proc->clearArguments();
(*m_proc) << TQStringList::split(' ',command); (*m_proc) << TQStringList::split(' ',command);
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), connect(m_proc, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotProcessExited(KProcess*)) ); this, TQT_SLOT(slotProcessExited(TDEProcess*)) );
m_output = ""; m_output = "";
KILE_DEBUG() << "=== IncludeGraphics::execute ====================" << endl; KILE_DEBUG() << "=== IncludeGraphics::execute ====================" << endl;
KILE_DEBUG() << " execute '" << command << "'" << endl; KILE_DEBUG() << " execute '" << command << "'" << endl;
m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); m_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
} }
// get all output of identify // get all output of identify
void IncludeGraphics::slotProcessOutput(KProcess*,char* buffer,int buflen) void IncludeGraphics::slotProcessOutput(TDEProcess*,char* buffer,int buflen)
{ {
m_output += TQString::fromLocal8Bit(buffer,buflen); m_output += TQString::fromLocal8Bit(buffer,buflen);
} }
// identify was called // identify was called
void IncludeGraphics::slotProcessExited(KProcess* proc) void IncludeGraphics::slotProcessExited(TDEProcess* proc)
{ {
if ( proc->normalExit() && !proc->exitStatus() ) { if ( proc->normalExit() && !proc->exitStatus() ) {
KILE_DEBUG() << " result: " << m_output << endl; KILE_DEBUG() << " result: " << m_output << endl;

@ -30,7 +30,7 @@ class TQCheckBox;
class KileInfo; class KileInfo;
class KLineEdit; class KLineEdit;
class KProcess; class TDEProcess;
class KShellProcess; class KShellProcess;
namespace KileDialog namespace KileDialog
@ -52,8 +52,8 @@ private slots:
void chooseFile(); void chooseFile();
void updateFigure(); void updateFigure();
void slotProcessOutput(KProcess* proc,char* buffer,int buflen); void slotProcessOutput(TDEProcess* proc,char* buffer,int buflen);
void slotProcessExited(KProcess* proc); void slotProcessExited(TDEProcess* proc);
void slotOk(); void slotOk();

@ -92,7 +92,7 @@ Kile::Kile( bool allowRestore, TQWidget *parent, const char *name ) :
{ {
m_focusWidget = this; m_focusWidget = this;
m_config = KGlobal::config(); m_config = TDEGlobal::config();
readUserSettings(); readUserSettings();
readRecentFileSettings(); readRecentFileSettings();
@ -120,7 +120,7 @@ Kile::Kile( bool allowRestore, TQWidget *parent, const char *name ) :
readGUISettings(); readGUISettings();
KGlobal::dirs()->addResourceType( "app_symbols",KStandardDirs::kde_default("data") + "kile/mathsymbols/"); // needed for Symbolview TDEGlobal::dirs()->addResourceType( "app_symbols",KStandardDirs::kde_default("data") + "kile/mathsymbols/"); // needed for Symbolview
setXMLFile( "kileui.rc" ); setXMLFile( "kileui.rc" );
@ -652,7 +652,7 @@ void Kile::setupActions()
else {WatchFileAction->setChecked(false);} else {WatchFileAction->setChecked(false);}
setHelpMenuEnabled(false); setHelpMenuEnabled(false);
const TDEAboutData *aboutData = KGlobal::instance()->aboutData(); const TDEAboutData *aboutData = TDEGlobal::instance()->aboutData();
KHelpMenu *help_menu = new KHelpMenu( this, aboutData); KHelpMenu *help_menu = new KHelpMenu( this, aboutData);
KStdAction::tipOfDay(TQT_TQOBJECT(this), TQT_SLOT(showTip()), actionCollection(), "help_tipofday"); KStdAction::tipOfDay(TQT_TQOBJECT(this), TQT_SLOT(showTip()), actionCollection(), "help_tipofday");

@ -211,7 +211,7 @@ InputDialog::InputDialog(const TQString &caption, uint options, const TQStringLi
if ( (options & KileAction::KeepHistory) || (options & KileAction::FromLabelList) || (options & KileAction::FromBibItemList) ) if ( (options & KileAction::KeepHistory) || (options & KileAction::FromLabelList) || (options & KileAction::FromBibItemList) )
{ {
KComboBox *input = new KComboBox(true, page, "input_dialog_input"); KComboBox *input = new KComboBox(true, page, "input_dialog_input");
input->setCompletionMode(KGlobalSettings::CompletionAuto); input->setCompletionMode(TDEGlobalSettings::CompletionAuto);
input->setMinimumWidth(300); input->setMinimumWidth(300);
focus = input; focus = input;

@ -33,7 +33,7 @@ static TQWidget *splash=0;
KileApplication::KileApplication() KileApplication::KileApplication()
{ {
TQRect screen = TQApplication::desktop()->screenGeometry(); TQRect screen = TQApplication::desktop()->screenGeometry();
TQPixmap pm(KGlobal::dirs()->findResource("appdata","pics/kile_splash.png")); TQPixmap pm(TDEGlobal::dirs()->findResource("appdata","pics/kile_splash.png"));
splash = new TQWidget( 0, "splash", WDestructiveClose | WStyle_Customize | WStyle_NoBorder | WX11BypassWM | WStyle_StaysOnTop ); splash = new TQWidget( 0, "splash", WDestructiveClose | WStyle_Customize | WStyle_NoBorder | WX11BypassWM | WStyle_StaysOnTop );
pix=new TQFrame(splash,"pix",TQWidget::WStyle_NoBorder | TQWidget::WStyle_Customize); pix=new TQFrame(splash,"pix",TQWidget::WStyle_NoBorder | TQWidget::WStyle_Customize);
pix->setBackgroundPixmap(pm); pix->setBackgroundPixmap(pm);

@ -86,7 +86,7 @@ KileFileSelect::KileFileSelect(KileDocument::Extensions *extensions, TQWidget *p
lo->setStretchFactor(dir, 2); lo->setStretchFactor(dir, 2);
m_comboEncoding = new KComboBox( false, this, "comboEncoding" ); m_comboEncoding = new KComboBox( false, this, "comboEncoding" );
TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames()); TQStringList availableEncodingNames(TDEGlobal::charsets()->availableEncodingNames());
m_comboEncoding->setEditable( true ); m_comboEncoding->setEditable( true );
m_comboEncoding->insertStringList( availableEncodingNames ); m_comboEncoding->insertStringList( availableEncodingNames );
TQToolTip::add(m_comboEncoding, i18n("Set encoding")); TQToolTip::add(m_comboEncoding, i18n("Set encoding"));

@ -478,12 +478,12 @@ void KileGrepDialog::slotItemSelected(const TQString& item)
void KileGrepDialog::startGrep() void KileGrepDialog::startGrep()
{ {
childproc = new KProcess(); childproc = new TDEProcess();
childproc->setUseShell(true); childproc->setUseShell(true);
if ( m_mode == KileGrep::Project ) if ( m_mode == KileGrep::Project )
{ {
TQString command = buildProjectCommand() + ' ' + KProcess::quote(m_projectfiles[m_grepJobs-1]); TQString command = buildProjectCommand() + ' ' + TDEProcess::quote(m_projectfiles[m_grepJobs-1]);
KILE_DEBUG() << "\tgrep (project): " << command << endl; KILE_DEBUG() << "\tgrep (project): " << command << endl;
(*childproc) << TQStringList::split(' ',command); (*childproc) << TQStringList::split(' ',command);
} }
@ -495,14 +495,14 @@ void KileGrepDialog::startGrep()
} }
m_grepJobs--; m_grepJobs--;
connect( childproc, TQT_SIGNAL(processExited(KProcess *)), connect( childproc, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(childExited()) ); TQT_SLOT(childExited()) );
connect( childproc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), connect( childproc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
TQT_SLOT(receivedOutput(KProcess *, char *, int)) ); TQT_SLOT(receivedOutput(TDEProcess *, char *, int)) );
connect( childproc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), connect( childproc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
TQT_SLOT(receivedErrOutput(KProcess *, char *, int)) ); TQT_SLOT(receivedErrOutput(TDEProcess *, char *, int)) );
childproc->start(KProcess::NotifyOnExit, KProcess::AllOutput); childproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
} }
void KileGrepDialog::processOutput() void KileGrepDialog::processOutput()
@ -530,13 +530,13 @@ void KileGrepDialog::processOutput()
kapp->processEvents(); kapp->processEvents();
} }
void KileGrepDialog::receivedOutput(KProcess */*proc*/, char *buffer, int buflen) void KileGrepDialog::receivedOutput(TDEProcess */*proc*/, char *buffer, int buflen)
{ {
buf += TQString::fromLocal8Bit(buffer, buflen); buf += TQString::fromLocal8Bit(buffer, buflen);
processOutput(); processOutput();
} }
void KileGrepDialog::receivedErrOutput(KProcess */*proc*/, char *buffer, int buflen) void KileGrepDialog::receivedErrOutput(TDEProcess */*proc*/, char *buffer, int buflen)
{ {
errbuf += TQString::fromLocal8Bit( buffer, buflen ); errbuf += TQString::fromLocal8Bit( buffer, buflen );
} }
@ -619,7 +619,7 @@ TQString KileGrepDialog::getShellPattern()
TQString pattern = getPattern(); TQString pattern = getPattern();
pattern.replace("'", "'\\''"); pattern.replace("'", "'\\''");
return '\'' + pattern + '\''; return '\'' + pattern + '\'';
//return KProcess::quote(pattern); //return TDEProcess::quote(pattern);
} }
@ -648,7 +648,7 @@ TQString KileGrepDialog::buildFilesCommand()
TQString shell_command; TQString shell_command;
shell_command += "find "; shell_command += "find ";
shell_command += KProcess::quote(dir_combo->url()); shell_command += TDEProcess::quote(dir_combo->url());
shell_command += " \\( -name "; shell_command += " \\( -name ";
shell_command += files; shell_command += files;
shell_command += " \\)"; shell_command += " \\)";

@ -37,7 +37,7 @@ class TQEvent;
class KComboBox; class KComboBox;
class KLineEdit; class KLineEdit;
class KProcess; class TDEProcess;
class KURLRequester; class KURLRequester;
class KListBox; class KListBox;
@ -73,7 +73,7 @@ signals:
private: private:
KileInfo *m_ki; KileInfo *m_ki;
KileGrep::Mode m_mode; KileGrep::Mode m_mode;
KProcess *childproc; TDEProcess *childproc;
int m_grepJobs; int m_grepJobs;
void readConfig(); void readConfig();
@ -123,8 +123,8 @@ private:
private slots: private slots:
void childExited(); void childExited();
void receivedOutput(KProcess *proc, char *buffer, int buflen); void receivedOutput(TDEProcess *proc, char *buffer, int buflen);
void receivedErrOutput(KProcess *proc, char *buffer, int buflen); void receivedErrOutput(TDEProcess *proc, char *buffer, int buflen);
void slotItemSelected(const TQString&); void slotItemSelected(const TQString&);
void slotSearch(); void slotSearch();
void slotClear(); void slotClear();

@ -281,7 +281,7 @@ namespace KileHelp
void Help::helpKileRefsKeyword(Kate::View *view) void Help::helpKileRefsKeyword(Kate::View *view)
{ {
TQString kilehelp = KGlobal::dirs()->findResource("html","en/kile/latexhelp.html"); TQString kilehelp = TDEGlobal::dirs()->findResource("html","en/kile/latexhelp.html");
KILE_DEBUG() << "kilehelp = " << kilehelp << endl; KILE_DEBUG() << "kilehelp = " << kilehelp << endl;
if ( ! kilehelp.isEmpty() ) if ( ! kilehelp.isEmpty() )
{ {
@ -327,7 +327,7 @@ namespace KileHelp
void Help::readHelpList(const TQString &filename,TQMap<TQString,TQString> &map) void Help::readHelpList(const TQString &filename,TQMap<TQString,TQString> &map)
{ {
TQString file = KGlobal::dirs()->findResource("appdata","help/" + filename); TQString file = TDEGlobal::dirs()->findResource("appdata","help/" + filename);
if ( file.isEmpty() ) if ( file.isEmpty() )
{ {
KILE_DEBUG() << " file not found: " << filename << endl; KILE_DEBUG() << " file not found: " << filename << endl;

@ -406,7 +406,7 @@ namespace KileJScript {
*/ */
JScript::JScript(unsigned int id, const TQString& file) : m_id(id), m_file(file), m_action(NULL) { JScript::JScript(unsigned int id, const TQString& file) : m_id(id), m_file(file), m_action(NULL) {
m_name = KGlobal::dirs()->relativeLocation("appdata", file); m_name = TDEGlobal::dirs()->relativeLocation("appdata", file);
if(m_name.startsWith("scripts")) { if(m_name.startsWith("scripts")) {
m_name = m_name.mid(8); // remove "scripts" + path separator m_name = m_name.mid(8); // remove "scripts" + path separator
} }
@ -586,7 +586,7 @@ m_kileInfo->viewManager()->currentView()->down();*/
} }
m_config->setGroup(TQString()); m_config->setGroup(TQString());
TQStringList scriptFileNamesList = KGlobal::dirs()->findAllResources("appdata", "scripts/*.js", true, true); TQStringList scriptFileNamesList = TDEGlobal::dirs()->findAllResources("appdata", "scripts/*.js", true, true);
for(TQStringList::iterator i = scriptFileNamesList.begin(); i != scriptFileNamesList.end(); ++i) { for(TQStringList::iterator i = scriptFileNamesList.begin(); i != scriptFileNamesList.end(); ++i) {
registerScript(*i, pathIDMap, takenIDMap, maxID); registerScript(*i, pathIDMap, takenIDMap, maxID);
} }
@ -692,7 +692,7 @@ m_kileInfo->viewManager()->currentView()->down();*/
} }
void Manager::populateDirWatch() { void Manager::populateDirWatch() {
TQStringList jScriptDirectories = KGlobal::dirs()->findDirs("appdata", "scripts"); TQStringList jScriptDirectories = TDEGlobal::dirs()->findDirs("appdata", "scripts");
for(TQStringList::iterator i = jScriptDirectories.begin(); i != jScriptDirectories.end(); ++i) { for(TQStringList::iterator i = jScriptDirectories.begin(); i != jScriptDirectories.end(); ++i) {
// FIXME: future KDE versions could support the recursive // FIXME: future KDE versions could support the recursive
// watching of directories out of the box. // watching of directories out of the box.

@ -65,9 +65,9 @@
else else
KILE_DEBUG() << "\tNO KShellProcess created" << endl; KILE_DEBUG() << "\tNO KShellProcess created" << endl;
connect(m_proc, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ), this, TQT_SLOT(slotProcessOutput(KProcess*, char*, int ) ) ); connect(m_proc, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), this, TQT_SLOT(slotProcessOutput(TDEProcess*, char*, int ) ) );
connect(m_proc, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),this, TQT_SLOT(slotProcessOutput(KProcess*, char*, int ) ) ); connect(m_proc, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ),this, TQT_SLOT(slotProcessOutput(TDEProcess*, char*, int ) ) );
connect(m_proc, TQT_SIGNAL( processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*))); connect(m_proc, TQT_SIGNAL( processExited(TDEProcess*)), this, TQT_SLOT(slotProcessExited(TDEProcess*)));
} }
ProcessLauncher::~ProcessLauncher() ProcessLauncher::~ProcessLauncher()
@ -142,7 +142,7 @@
out += "*****\n"; out += "*****\n";
emit(output(out)); emit(output(out));
return m_proc->start(tool()->manager()->shouldBlock() ? KProcess::Block : KProcess::NotifyOnExit, KProcess::AllOutput); return m_proc->start(tool()->manager()->shouldBlock() ? TDEProcess::Block : TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
} }
else else
return false; return false;
@ -168,7 +168,7 @@
emit(message(Error, i18n("Launching failed, diagnostics:"))); emit(message(Error, i18n("Launching failed, diagnostics:")));
TQString exe = KRun::binaryName(tool()->readEntry("command"), false); TQString exe = KRun::binaryName(tool()->readEntry("command"), false);
TQString path = KGlobal::dirs()->findExe(exe, TQString(), true); TQString path = TDEGlobal::dirs()->findExe(exe, TQString(), true);
if ( path.isNull() ) if ( path.isNull() )
{ {
@ -189,12 +189,12 @@
return true; return true;
} }
void ProcessLauncher::slotProcessOutput(KProcess*, char* buf, int len) void ProcessLauncher::slotProcessOutput(TDEProcess*, char* buf, int len)
{ {
emit output(TQString::fromLocal8Bit(buf, len)); emit output(TQString::fromLocal8Bit(buf, len));
} }
void ProcessLauncher::slotProcessExited(KProcess*) void ProcessLauncher::slotProcessExited(TDEProcess*)
{ {
KILE_DEBUG() << "==KileTool::ProcessLauncher::slotProcessExited=============" << endl; KILE_DEBUG() << "==KileTool::ProcessLauncher::slotProcessExited=============" << endl;
KILE_DEBUG() << "\t" << tool()->name() << endl; KILE_DEBUG() << "\t" << tool()->name() << endl;
@ -241,7 +241,7 @@
setCommand("konsole"); setCommand("konsole");
setOptions(noclose + " -T \"" + cmd + " (Kile)\" -e " + cmd + ' ' + tool()->readEntry("options")); setOptions(noclose + " -T \"" + cmd + " (Kile)\" -e " + cmd + ' ' + tool()->readEntry("options"));
if ( KGlobal::dirs()->findExe(KRun::binaryName(cmd, false)).isNull() ) return false; if ( TDEGlobal::dirs()->findExe(KRun::binaryName(cmd, false)).isNull() ) return false;
return ProcessLauncher::launch(); return ProcessLauncher::launch();
} }

@ -23,7 +23,7 @@
class TQWidgetStack; class TQWidgetStack;
class KProcess; class TDEProcess;
class KShellProcess; class KShellProcess;
class KileInfo; class KileInfo;
namespace KParts { class ReadOnlyPart; class PartManager; } namespace KParts { class ReadOnlyPart; class PartManager; }
@ -94,8 +94,8 @@ namespace KileTool
bool selfCheck(); bool selfCheck();
private slots: private slots:
void slotProcessOutput(KProcess*, char*, int ); void slotProcessOutput(TDEProcess*, char*, int );
void slotProcessExited(KProcess*); void slotProcessExited(TDEProcess*);
private: private:
TQString m_wd, m_cmd, m_options, m_texinputs, m_bibinputs, m_bstinputs; TQString m_wd, m_cmd, m_options, m_texinputs, m_bibinputs, m_bstinputs;

@ -304,7 +304,7 @@ void KileProject::readMakeIndexOptions()
TQString grp = KileTool::groupFor("MakeIndex", m_config); TQString grp = KileTool::groupFor("MakeIndex", m_config);
//get the default value //get the default value
KConfig *cfg = KGlobal::config(); KConfig *cfg = TDEGlobal::config();
cfg->setGroup(KileTool::groupFor("MakeIndex", KileTool::configName("MakeIndex", cfg))); cfg->setGroup(KileTool::groupFor("MakeIndex", KileTool::configName("MakeIndex", cfg)));
TQString deflt = cfg->readEntry("options", "'%S'.idx"); TQString deflt = cfg->readEntry("options", "'%S'.idx");

@ -83,8 +83,8 @@ namespace KileTool
void Factory::writeStdConfig() void Factory::writeStdConfig()
{ {
TQString from_cfg = KGlobal::dirs()->findResource("appdata", "kilestdtools.rc"); TQString from_cfg = TDEGlobal::dirs()->findResource("appdata", "kilestdtools.rc");
TQString to_cfg = KGlobal::dirs()->saveLocation("config") + "/kilerc"; TQString to_cfg = TDEGlobal::dirs()->saveLocation("config") + "/kilerc";
KConfig *pCfg = new KConfig(from_cfg, false, false); KConfig *pCfg = new KConfig(from_cfg, false, false);
pCfg->copyTo(to_cfg, m_config); pCfg->copyTo(to_cfg, m_config);
} }

@ -76,7 +76,7 @@ ManageTemplatesDialog::ManageTemplatesDialog(KileTemplate::Manager *templateMana
TQHBoxLayout *iconLayout = new TQHBoxLayout(topLayout, spacingHint()); TQHBoxLayout *iconLayout = new TQHBoxLayout(topLayout, spacingHint());
iconLayout->addWidget(new TQLabel(i18n("Icon:"), page)); iconLayout->addWidget(new TQLabel(i18n("Icon:"), page));
m_iconEdit = new KLineEdit(KGlobal::dirs()->findResource("appdata", "pics/type_Default.png"), page); m_iconEdit = new KLineEdit(TDEGlobal::dirs()->findResource("appdata", "pics/type_Default.png"), page);
iconLayout->addWidget(m_iconEdit); iconLayout->addWidget(m_iconEdit);
KPushButton *iconbut = new KPushButton(i18n("Select..."),page); KPushButton *iconbut = new KPushButton(i18n("Select..."),page);

@ -9,7 +9,7 @@
void NewToolWizard::init() void NewToolWizard::init()
{ {
m_toolList = KileTool::toolList(KGlobal::config(), false); m_toolList = KileTool::toolList(TDEGlobal::config(), false);
//setup the Name page (page 0) //setup the Name page (page 0)
connect(m_leName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &))); connect(m_leName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &)));

@ -275,29 +275,29 @@ void PostscriptDialog::execute()
m_proc->clearArguments(); m_proc->clearArguments();
(*m_proc) << TQStringList::split(' ',"sh " + m_tempfile); (*m_proc) << TQStringList::split(' ',"sh " + m_tempfile);
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), connect(m_proc, TQT_SIGNAL(receivedStdout(TDEProcess *,char *,int)),
this, TQT_SLOT(slotProcessOutput(KProcess *,char *,int))); this, TQT_SLOT(slotProcessOutput(TDEProcess *,char *,int)));
connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(processExited(KProcess *)), connect(m_proc, TQT_SIGNAL(processExited(TDEProcess *)),
this, TQT_SLOT(slotProcessExited(KProcess *))); this, TQT_SLOT(slotProcessExited(TDEProcess *)));
KILE_DEBUG() << "=== PostscriptDialog::runPsutils() ====================" << endl; KILE_DEBUG() << "=== PostscriptDialog::runPsutils() ====================" << endl;
KILE_DEBUG() << " execute '" << m_tempfile << "'" << endl; KILE_DEBUG() << " execute '" << m_tempfile << "'" << endl;
//if ( ! proc->start(KProcess::NotifyOnExit, KProcess::NoCommunication) ) //if ( ! proc->start(TDEProcess::NotifyOnExit, TDEProcess::NoCommunication) )
if ( ! m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) if ( ! m_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) )
KILE_DEBUG() << "\tstart of shell process failed" << endl; KILE_DEBUG() << "\tstart of shell process failed" << endl;
} }
} }
void PostscriptDialog::slotProcessOutput(KProcess*,char* buf,int len) void PostscriptDialog::slotProcessOutput(TDEProcess*,char* buf,int len)
{ {
emit( output(TQCString(buf,len+1)) ); emit( output(TQCString(buf,len+1)) );
} }
void PostscriptDialog::slotProcessExited (KProcess *proc) void PostscriptDialog::slotProcessExited (TDEProcess *proc)
{ {
if ( ! proc->normalExit() ) if ( ! proc->normalExit() )
showError(i18n("An error occurred, while rearranging the file.")); showError(i18n("An error occurred, while rearranging the file."));

@ -72,8 +72,8 @@ private slots:
void chooseOutfile(); void chooseOutfile();
void comboboxChanged(int index); void comboboxChanged(int index);
void slotUser1(); void slotUser1();
void slotProcessOutput(KProcess*,char* buf,int len); void slotProcessOutput(TDEProcess*,char* buf,int len);
void slotProcessExited (KProcess *proc); void slotProcessExited (TDEProcess *proc);
private: private:
bool checkParameter(); bool checkParameter();

@ -357,9 +357,9 @@ TQWidget *QuickDocument::setupProperties(TQTabWidget *tab)
label->setBuddy(m_leDate); label->setBuddy(m_leDate);
// set current date // set current date
m_leDate->setText( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); m_leDate->setText( TDEGlobal::locale()->formatDate(TQDate::currentDate(), true) );
// For KDE4: // For KDE4:
//m_leDate->setText( KGlobal::locale()->formatDate(TQDate::currentDate(), KLocale::ShortDate) ); //m_leDate->setText( TDEGlobal::locale()->formatDate(TQDate::currentDate(), KLocale::ShortDate) );
return personalInfo; return personalInfo;
} }

@ -9,7 +9,7 @@
void QuickToolConfigWidget::updateSequence(const TQString &sequence) void QuickToolConfigWidget::updateSequence(const TQString &sequence)
{ {
TQStringList toollist = KileTool::toolList(KGlobal::config(), true); TQStringList toollist = KileTool::toolList(TDEGlobal::config(), true);
toollist.sort(); toollist.sort();
m_cbTools->clear(); m_cbTools->clear();
m_cbTools->insertStringList(toollist); m_cbTools->insertStringList(toollist);
@ -35,7 +35,7 @@ void QuickToolConfigWidget::updateConfigs(const TQString &tool)
{ {
m_cbConfigs->clear(); m_cbConfigs->clear();
m_cbConfigs->insertItem(i18n("Not Specified")); m_cbConfigs->insertItem(i18n("Not Specified"));
m_cbConfigs->insertStringList(KileTool::configNames(tool, KGlobal::config())); m_cbConfigs->insertStringList(KileTool::configNames(tool, TDEGlobal::config()));
} }
void QuickToolConfigWidget::down() void QuickToolConfigWidget::down()

@ -260,7 +260,7 @@ void SymbolView::fillWidget(const TQString& prefix)
if( prefix == MFUSprefix) if( prefix == MFUSprefix)
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup(MFUSGroup); config->setGroup(MFUSGroup);
TQString configPaths = config->readEntry("paths"); TQString configPaths = config->readEntry("paths");
TQString configrefCnts = config->readEntry("counts"); TQString configrefCnts = config->readEntry("counts");
@ -276,7 +276,7 @@ void SymbolView::fillWidget(const TQString& prefix)
} }
else else
{ {
paths = KGlobal::dirs()->findAllResources("app_symbols", prefix + "/*.png",false,true); paths = TDEGlobal::dirs()->findAllResources("app_symbols", prefix + "/*.png",false,true);
paths.sort(); paths.sort();
for( uint i = 0 ; i < paths.count() ; i++ ) for( uint i = 0 ; i < paths.count() ; i++ )
refCnts.append("1"); refCnts.append("1");
@ -302,7 +302,7 @@ void SymbolView::writeConfig()
TQStringList paths,refCnts; TQStringList paths,refCnts;
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup(MFUSGroup); config->setGroup(MFUSGroup);
if( KileConfig::clearMFUS() ) if( KileConfig::clearMFUS() )

@ -67,7 +67,7 @@ bool Manager::copyAppData(const KURL& src, const TQString& subdir, const TQStrin
TQString dir; TQString dir;
//let saveLocation find and create the appropriate place to //let saveLocation find and create the appropriate place to
//store the templates (usually $HOME/.trinity/share/apps/kile/templates) //store the templates (usually $HOME/.trinity/share/apps/kile/templates)
dir = KGlobal::dirs()->saveLocation("appdata", subdir, true); dir = TDEGlobal::dirs()->saveLocation("appdata", subdir, true);
KURL targetURL = KURL::fromPathOrURL(dir); KURL targetURL = KURL::fromPathOrURL(dir);
targetURL.addPath(fileName); targetURL.addPath(fileName);
@ -152,7 +152,7 @@ bool Manager::replace(const KileTemplate::Info& toBeReplaced, const KURL& newTem
void Manager::scanForTemplates() { void Manager::scanForTemplates() {
KILE_DEBUG() << "===scanForTemplates()===================" << endl; KILE_DEBUG() << "===scanForTemplates()===================" << endl;
TQStringList dirs = KGlobal::dirs()->findDirs("appdata", "templates"); TQStringList dirs = TDEGlobal::dirs()->findDirs("appdata", "templates");
TQDir templates; TQDir templates;
KileTemplate::Info ti; KileTemplate::Info ti;
KileDocument::Extensions *extensions = m_kileInfo->extensions(); KileDocument::Extensions *extensions = m_kileInfo->extensions();
@ -167,7 +167,7 @@ void Manager::scanForTemplates() {
TQFileInfo fileInfo(ti.path); TQFileInfo fileInfo(ti.path);
ti.name = fileInfo.baseName(true).mid(9); //remove "template_", do it this way to avoid problems with user input! ti.name = fileInfo.baseName(true).mid(9); //remove "template_", do it this way to avoid problems with user input!
ti.type = extensions->determineDocumentType(KURL::fromPathOrURL(ti.path)); ti.type = extensions->determineDocumentType(KURL::fromPathOrURL(ti.path));
ti.icon = KGlobal::dirs()->findResource("appdata","pics/type_" + ti.name + extensions->defaultExtensionForDocumentType(ti.type) + ".kileicon"); ti.icon = TDEGlobal::dirs()->findResource("appdata","pics/type_" + ti.name + extensions->defaultExtensionForDocumentType(ti.type) + ".kileicon");
if (m_TemplateList.contains(ti)) if (m_TemplateList.contains(ti))
{ {
KILE_DEBUG() << "\tignoring: " << ti.path << endl; KILE_DEBUG() << "\tignoring: " << ti.path << endl;
@ -268,34 +268,34 @@ void TemplateIconView::searchLaTeXClassFiles()
delete m_proc; delete m_proc;
m_proc = new KProcess(TQT_TQOBJECT(this)); m_proc = new TDEProcess(TQT_TQOBJECT(this));
m_proc->clearArguments(); m_proc->clearArguments();
m_proc->setUseShell(true); m_proc->setUseShell(true);
(*m_proc) << TQStringList::split(' ', command); (*m_proc) << TQStringList::split(' ', command);
m_output = TQString(); m_output = TQString();
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), connect(m_proc, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotProcessExited(KProcess*)) ); this, TQT_SLOT(slotProcessExited(TDEProcess*)) );
KILE_DEBUG() << "=== NewFileWidget::searchClassFiles() ====================" << endl; KILE_DEBUG() << "=== NewFileWidget::searchClassFiles() ====================" << endl;
KILE_DEBUG() << "\texecute: " << command << endl; KILE_DEBUG() << "\texecute: " << command << endl;
if ( ! m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) if ( ! m_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) )
{ {
KILE_DEBUG() << "\tstart of shell process failed" << endl; KILE_DEBUG() << "\tstart of shell process failed" << endl;
addTemplateIcons(KileDocument::LaTeX); addTemplateIcons(KileDocument::LaTeX);
} }
} }
void TemplateIconView::slotProcessOutput(KProcess*, char* buf, int len) void TemplateIconView::slotProcessOutput(TDEProcess*, char* buf, int len)
{ {
m_output += TQString::fromLocal8Bit(buf,len); m_output += TQString::fromLocal8Bit(buf,len);
} }
void TemplateIconView::slotProcessExited(KProcess *proc) void TemplateIconView::slotProcessExited(TDEProcess *proc)
{ {
if ( ! proc->normalExit() ) if ( ! proc->normalExit() )
m_output = TQString(); m_output = TQString();
@ -308,7 +308,7 @@ void TemplateIconView::addTemplateIcons(KileDocument::Type type)
{ {
if(!m_templateManager) return; if(!m_templateManager) return;
TQString emptyIcon = KGlobal::dirs()->findResource("appdata", "pics/"+ TQString(DEFAULT_EMPTY_ICON) + ".png" ); TQString emptyIcon = TDEGlobal::dirs()->findResource("appdata", "pics/"+ TQString(DEFAULT_EMPTY_ICON) + ".png" );
KileTemplate::Info emptyDocumentInfo; KileTemplate::Info emptyDocumentInfo;
emptyDocumentInfo.name = DEFAULT_EMPTY_CAPTION; emptyDocumentInfo.name = DEFAULT_EMPTY_CAPTION;

@ -153,14 +153,14 @@ class TemplateIconView : public KIconView {
KileTemplate::Manager *m_templateManager; KileTemplate::Manager *m_templateManager;
TQString m_output; TQString m_output;
TQString m_selicon; TQString m_selicon;
KProcess *m_proc; TDEProcess *m_proc;
void addTemplateIcons(KileDocument::Type type); void addTemplateIcons(KileDocument::Type type);
void searchLaTeXClassFiles(); void searchLaTeXClassFiles();
protected slots: protected slots:
void slotProcessOutput(KProcess*,char* buf,int len); void slotProcessOutput(TDEProcess*,char* buf,int len);
void slotProcessExited (KProcess *proc); void slotProcessExited (TDEProcess *proc);
}; };
#endif #endif

@ -537,26 +537,26 @@ void TexDocDialog::executeScript(const TQString &command)
(*m_proc) << TQStringList::split(' ',command); (*m_proc) << TQStringList::split(' ',command);
m_output = TQString(); m_output = TQString();
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(slotProcessOutput(KProcess*,char*,int)) ); this, TQT_SLOT(slotProcessOutput(TDEProcess*,char*,int)) );
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), connect(m_proc, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotProcessExited(KProcess*)) ); this, TQT_SLOT(slotProcessExited(TDEProcess*)) );
KILE_DEBUG() << "=== TexDocDialog::runShellSkript() ====================" << endl; KILE_DEBUG() << "=== TexDocDialog::runShellSkript() ====================" << endl;
KILE_DEBUG() << " execute: " << command << endl; KILE_DEBUG() << " execute: " << command << endl;
if ( ! m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) if ( ! m_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) )
KILE_DEBUG() << "\tstart of shell process failed" << endl; KILE_DEBUG() << "\tstart of shell process failed" << endl;
} }
void TexDocDialog::slotProcessOutput(KProcess*,char* buf,int len) void TexDocDialog::slotProcessOutput(TDEProcess*,char* buf,int len)
{ {
m_output += TQString::fromLocal8Bit(buf,len); m_output += TQString::fromLocal8Bit(buf,len);
} }
void TexDocDialog::slotProcessExited(KProcess *proc) void TexDocDialog::slotProcessExited(TDEProcess *proc)
{ {
if ( proc->normalExit() && !proc->exitStatus() ) if ( proc->normalExit() && !proc->exitStatus() )
{ {

@ -88,8 +88,8 @@ private slots:
void slotTextChanged(const TQString &text); void slotTextChanged(const TQString &text);
void slotSearchClicked(); void slotSearchClicked();
void slotProcessOutput(KProcess*,char* buf,int len); void slotProcessOutput(TDEProcess*,char* buf,int len);
void slotProcessExited (KProcess *proc); void slotProcessExited (TDEProcess *proc);
void slotInitToc(); void slotInitToc();
void slotShowFile(); void slotShowFile();

Loading…
Cancel
Save