summaryrefslogtreecommitdiffstats
path: root/quanta/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:51:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:51:30 -0600
commit29df04c24350cc76a41e2410d1c92445f9338b98 (patch)
treec2b9cde128e24275393a83d9eaec58b2ef12d109 /quanta/src
parentc70534eef6085384ef7ddff369a154dbc8901917 (diff)
downloadtdewebdev-29df04c24350cc76a41e2410d1c92445f9338b98.tar.gz
tdewebdev-29df04c24350cc76a41e2410d1c92445f9338b98.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'quanta/src')
-rw-r--r--quanta/src/dtds.cpp10
-rw-r--r--quanta/src/kqapp.cpp6
-rw-r--r--quanta/src/quanta.cpp30
-rw-r--r--quanta/src/quanta.h8
-rw-r--r--quanta/src/quanta_init.cpp28
5 files changed, 41 insertions, 41 deletions
diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp
index c378bd05..97ec6ec0 100644
--- a/quanta/src/dtds.cpp
+++ b/quanta/src/dtds.cpp
@@ -67,8 +67,8 @@ DTDs::DTDs(TQObject *parent)
m_dict->setAutoDelete(true);
m_doc = new TQDomDocument();
- TQString localKDEdir = KGlobal::instance()->dirs()->localtdedir();
- TQStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
+ TQString localKDEdir = TDEGlobal::instance()->dirs()->localtdedir();
+ TQStringList tagsResourceDirs = TDEGlobal::instance()->dirs()->findDirs("appdata", "dtep");
TQStringList tagsDirs;
TQStringList::ConstIterator end = tagsResourceDirs.constEnd();
for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
@@ -904,7 +904,7 @@ void DTDs::slotLoadDTD()
KURL url = KFileDialog::getOpenURL("", i18n("*.dtd|DTD Definitions"), 0L);
if (!url.isEmpty())
{
- DTDParser dtdParser(url, KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
+ DTDParser dtdParser(url, TDEGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
if (dtdParser.parse())
{
TQString dirName = dtdParser.dirName();
@@ -962,7 +962,7 @@ void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload)
KURL src;
src.setPath(dirName);
KURL target;
- TQString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString destDir = TDEGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
target.setPath(destDir + src.fileName());
KIO::copy( src, target, false); //don't care about the result
}
@@ -993,7 +993,7 @@ void DTDs::slotLoadEntities()
if (dlg.exec())
{
DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText()));
- DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
+ DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), TDEGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
TQString dtdDir = TQFileInfo(dtd->fileName).dirPath();
if (dtdParser.parse(dtdDir, true))
{
diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp
index 39053e86..3b306f0f 100644
--- a/quanta/src/kqapp.cpp
+++ b/quanta/src/kqapp.cpp
@@ -47,7 +47,7 @@ KSplash::KSplash()
TQPixmap pm( UserIcon(SPLASH_PICTURE) );
setBackgroundPixmap(pm);
- TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = TDEGlobalSettings::splashScreenDesktopGeometry();
setGeometry( desk.center().x()-225, desk.center().y()-150, 450, 300 );
setLineWidth(0);
show();
@@ -65,7 +65,7 @@ KQApplication::KQApplication()
args = TDECmdLineArgs::parsedArgs();
splash = 0L;
- KGlobal::dirs()->addPrefix(PREFIX);
+ TDEGlobal::dirs()->addPrefix(PREFIX);
dcopClient()->registerAs("quanta", true);
//FIXME: Do not hide the problem, but really fix the session restoration.
@@ -121,7 +121,7 @@ void KQApplication::slotSplashTimeout()
KQUniqueApplication::KQUniqueApplication()
: KUniqueApplication()
{
- KGlobal::dirs()->addPrefix(PREFIX);
+ TDEGlobal::dirs()->addPrefix(PREFIX);
dcopClient()->registerAs("quanta", false);
}
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index 82c81283..434bff2f 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -218,7 +218,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
m_idleTimerEnabled = true;
- qConfig.globalDataDir = KGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
+ qConfig.globalDataDir = TDEGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
if (qConfig.globalDataDir.isEmpty())
{
quantaStarted = false;
@@ -316,7 +316,7 @@ QuantaApp::~QuantaApp()
}
m_toolbarList.clear();
- TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = TDEGlobal::dirs()->resourceDirs("tmp");
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
@@ -511,7 +511,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
"all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
KURL saveUrl = data.URLs[0];
bool found;
- TQString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
+ TQString encoding = TDEGlobal::charsets()->codecForName(data.encoding, found)->name();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf && encodingIf->encoding() != encoding)
encodingIf->setEncoding(encoding);
@@ -1042,7 +1042,7 @@ void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
TQDomNodeList nodeList;
ToolbarEntry *p_toolbar = 0L;
- saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
KEditToolbar *dlg;
if (!defaultToolbar.isEmpty())
dlg = new KEditToolbar(defaultToolbar, factory(), this);
@@ -1129,7 +1129,7 @@ void QuantaApp::slotOptionsConfigureToolbars()
void QuantaApp::slotNewToolbarConfig()
{
- applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
ToolbarTabWidget::ref()->setCurrentPage(currentPageIndex);
}
@@ -1191,7 +1191,7 @@ void QuantaApp::slotOptions()
fileMasks->sbAutoSave->setValue(m_config->readNumEntry("Autosave interval"));
//else default value 15
- TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(TDEGlobal::charsets()->availableEncodingNames());
fileMasks->encodingCombo->insertStringList( availableEncodingNames );
TQStringList::ConstIterator iter;
int iIndex = -1;
@@ -1800,7 +1800,7 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
//kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
if (toolbarTab->iconText() == KToolBar::IconTextBottom)
{
- tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + TQFontMetrics(TDEGlobalSettings::toolBarFont()).height() + 10);
toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
} else
{
@@ -2884,7 +2884,7 @@ bool QuantaApp::removeToolbars()
}
}
- TQFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
+ TQFile f(TDEGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
if (f.open( IO_ReadWrite | IO_Truncate ))
{
if (!m_actions->firstChild().firstChild().isNull())
@@ -3935,7 +3935,7 @@ void QuantaApp::slotAutosaveTimer()
}
/** Get script output */
-void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
+void QuantaApp::slotGetScriptOutput(TDEProcess* ,char* buf,int buflen)
{
TQCString tmp( buf, buflen + 1 );
m_scriptOutput = TQString();
@@ -3943,14 +3943,14 @@ void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
}
/** Get script error*/
-void QuantaApp::slotGetScriptError(KProcess* ,char* buf,int buflen)
+void QuantaApp::slotGetScriptError(TDEProcess* ,char* buf,int buflen)
{
//TODO: Implement some error handling?
Q_UNUSED(buf);
Q_UNUSED(buflen);
}
/** Notify when process exits*/
-void QuantaApp::slotProcessExited(KProcess* process)
+void QuantaApp::slotProcessExited(TDEProcess* process)
{
slotProcessTimeout();
delete process;
@@ -4767,10 +4767,10 @@ void QuantaApp::slotViewInKFM()
}
if ( !w->isUntitled() )
{
- KProcess *show = new KProcess(TQT_TQOBJECT(this));
+ TDEProcess *show = new TDEProcess(TQT_TQOBJECT(this));
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "kfmclient" << "newTab" << url.url();
- show->start( KProcess::DontCare );
+ show->start( TDEProcess::DontCare );
}
}
@@ -4801,7 +4801,7 @@ void QuantaApp::slotViewInLynx()
}
if ( !w->isUntitled() )
{
- KProcess *show = new KProcess(TQT_TQOBJECT(this));
+ TDEProcess *show = new TDEProcess(TQT_TQOBJECT(this));
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "konsole"
<< "--nohist"
@@ -4811,7 +4811,7 @@ void QuantaApp::slotViewInLynx()
<< "-e"
<< "lynx"
<< url.url();
- show->start( KProcess::DontCare );
+ show->start( TDEProcess::DontCare );
}
}
diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h
index e7714aea..c701d25b 100644
--- a/quanta/src/quanta.h
+++ b/quanta/src/quanta.h
@@ -73,7 +73,7 @@ class KHTMLView;
class KAction;
class KToggleAction;
-class KProcess;
+class TDEProcess;
class KSelectAction;
class KRecentFilesAction;
class KToolBarPoupAction;
@@ -468,11 +468,11 @@ protected slots:
void slotIdleTimerExpired();
void slotShowNoFramesPreview();
/** Get script output */
- void slotGetScriptOutput(KProcess*, char*, int);
+ void slotGetScriptOutput(TDEProcess*, char*, int);
/** Get script error */
- void slotGetScriptError(KProcess*, char*, int);
+ void slotGetScriptError(TDEProcess*, char*, int);
/** Notify when process exits */
- void slotProcessExited(KProcess*);
+ void slotProcessExited(TDEProcess*);
/** External app execution timeout handling */
void slotProcessTimeout();
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp
index 42765a21..73d6c858 100644
--- a/quanta/src/quanta_init.cpp
+++ b/quanta/src/quanta_init.cpp
@@ -133,7 +133,7 @@ void QuantaInit::initQuanta()
m_config = quantaApp->m_config;
parser = new Parser();
- TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = TDEGlobal::dirs()->resourceDirs("tmp");
TQDir dir;
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
@@ -276,7 +276,7 @@ void QuantaInit::initQuanta()
//get the PID of this running instance
qConfig.quantaPID = TQString::number(int(getpid()), 10);
- qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
+ qConfig.backupDirPath = TDEGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
m_quanta->autosaveTimer = new TQTimer(m_quanta);
connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotAutosaveTimer()));
@@ -1267,19 +1267,19 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList)
void QuantaInit::execCommandPS(const TQString& cmd)
{
- //We create a KProcess that executes the "ps" *nix command to get the PIDs of the
+ //We create a TDEProcess that executes the "ps" *nix command to get the PIDs of the
//other instances of quanta actually running
- KProcess *execCommand = new KProcess();
+ TDEProcess *execCommand = new TDEProcess();
*(execCommand) << TQStringList::split(" ",cmd);
- connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
- TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
- TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect(execCommand, TQT_SIGNAL(processExited(KProcess*)),
- TQT_TQOBJECT(m_quanta), TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(execCommand, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
+ TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptOutput(TDEProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
+ TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptError(TDEProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(processExited(TDEProcess*)),
+ TQT_TQOBJECT(m_quanta), TQT_SLOT(slotProcessExited(TDEProcess*)));
- if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All))
+ if (!execCommand->start(TDEProcess::NotifyOnExit,TDEProcess::All))
{
KMessageBox::error(m_quanta, i18n("Failed to query for running Quanta instances."));
}
@@ -1516,7 +1516,7 @@ void QuantaInit::readAbbreviations()
bool mainAbbrevFileFound = false;
TQStringList mainFileList;
mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml";
- mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
+ mainFileList << TDEGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
for (uint i = 0; i < mainFileList.count(); i++)
{
if (!TQFile::exists(mainFileList[i]))
@@ -1565,7 +1565,7 @@ void QuantaInit::readAbbreviations()
dirName = dirURL.path(1);
TQString abbrevFile = dirName;
TQString tmpStr = dirName;
- TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
+ TQStringList resourceDirs = TDEGlobal::dirs()->resourceDirs("data");
bool dirFound = false;
for (uint i = 0; i < resourceDirs.count(); i++)
{
@@ -1578,7 +1578,7 @@ void QuantaInit::readAbbreviations()
}
if (dirFound)
{
- abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/";
+ abbrevFile = TDEGlobal::dirs()->saveLocation("data", tmpStr) +"/";
}
abbrevFile.append("abbreviations");
if (!TQFile::exists(abbrevFile))