diff options
author | Timothy Pearson <[email protected]> | 2013-01-25 00:14:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-25 00:14:31 -0600 |
commit | 145d30f0b8cbacc3599379e8717299734f3bb534 (patch) | |
tree | 3713677dce079619063612b12788282fd32e53af /src/newstuff/manager.cpp | |
parent | 5b6d393e0a2c88cce8f433607c091ae883ef54f9 (diff) | |
download | tellico-145d30f0b8cbacc3599379e8717299734f3bb534.tar.gz tellico-145d30f0b8cbacc3599379e8717299734f3bb534.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'src/newstuff/manager.cpp')
-rw-r--r-- | src/newstuff/manager.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/newstuff/manager.cpp b/src/newstuff/manager.cpp index 8eabc7d..45eae08 100644 --- a/src/newstuff/manager.cpp +++ b/src/newstuff/manager.cpp @@ -83,7 +83,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) { if(TQFile::exists(dest.path())) { myDebug() << "Manager::installTemplate() - " << dest.path() << " exists!" << endl; success = false; - } else if(KIO::NetAccess::file_copy(url_, dest)) { + } else if(TDEIO::NetAccess::file_copy(url_, dest)) { xslFile = dest.fileName(); allFiles += xslFile; } @@ -94,7 +94,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) { } else { // remove ".xsl" xslFile.truncate(xslFile.length()-4); - KConfigGroup config(TDEGlobal::config(), "KNewStuffFiles"); + TDEConfigGroup config(TDEGlobal::config(), "KNewStuffFiles"); config.writeEntry(xslFile, allFiles); m_urlNameMap.insert(url_, xslFile); } @@ -106,7 +106,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) { } bool Manager::removeTemplate(const TQString& name_) { - KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); + TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); TQStringList files = fileGroup.readListEntry(name_); // at least, delete xsl file if(files.isEmpty()) { @@ -130,7 +130,7 @@ bool Manager::removeTemplate(const TQString& name_) { // remove config entries even if unsuccessful fileGroup.deleteEntry(name_); - KConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus"); + TDEConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus"); TQString entryName = statusGroup.readEntry(name_); statusGroup.deleteEntry(name_); statusGroup.deleteEntry(entryName); @@ -170,7 +170,7 @@ bool Manager::installScript(const KURL& url_) { KURL u; u.setPath(scriptFolder); myLog() << "Manager::installScript() - deleting " << scriptFolder << endl; - KIO::NetAccess::del(u, Kernel::self()->widget()); + TDEIO::NetAccess::del(u, Kernel::self()->widget()); info->isUpdate = true; } scriptFolder = copyTarget; @@ -200,7 +200,7 @@ bool Manager::installScript(const KURL& url_) { ::chmod(TQFile::encodeName(dest.path()), item.permissions() | S_IXUSR); { - KConfig spec(info->specFile, false, false); + TDEConfig spec(info->specFile, false, false); // update name info->sourceName = spec.readEntry("Name", info->sourceName); spec.writePathEntry("ExecPath", info->sourceExec); @@ -209,7 +209,7 @@ bool Manager::installScript(const KURL& url_) { } { - KConfigGroup config(TDEGlobal::config(), "KNewStuffFiles"); + TDEConfigGroup config(TDEGlobal::config(), "KNewStuffFiles"); config.writeEntry(info->sourceName, archiveFiles(archiveDir)); m_urlNameMap.insert(url_, info->sourceName); } @@ -225,7 +225,7 @@ bool Manager::installScript(const KURL& url_) { } bool Manager::removeScript(const TQString& name_) { - KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); + TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); TQStringList files = fileGroup.readListEntry(name_); bool success = true; @@ -244,7 +244,7 @@ bool Manager::removeScript(const TQString& name_) { // remove config entries even if unsuccessful fileGroup.deleteEntry(name_); - KConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus"); + TDEConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus"); TQString entryName = statusGroup.readEntry(name_); statusGroup.deleteEntry(name_); statusGroup.deleteEntry(entryName); @@ -253,7 +253,7 @@ bool Manager::removeScript(const TQString& name_) { } Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) { - KConfigGroup config(TDEGlobal::config(), "KNewStuffStatus"); + TDEConfigGroup config(TDEGlobal::config(), "KNewStuffStatus"); TQString datestring = config.readEntry(entry_->name()); if(datestring.isEmpty()) { return NotInstalled; @@ -268,7 +268,7 @@ Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) { } // also check that executable files exists - KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); + TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles"); TQStringList files = fileGroup.readListEntry(entry_->name()); TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/")); for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { @@ -346,13 +346,13 @@ void Manager::install(DataType type_, KNS::Entry* entry_) { KURL destination; destination.setPath(m_tempFile->name()); - KIO::FileCopyJob* job = KIO::file_copy(entry_->payload(), destination, -1, true); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotDownloadJobResult(KIO::Job*))); + TDEIO::FileCopyJob* job = TDEIO::file_copy(entry_->payload(), destination, -1, true); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotDownloadJobResult(TDEIO::Job*))); m_jobMap.insert(job, EntryPair(entry_, type_)); } -void Manager::slotDownloadJobResult(KIO::Job* job_) { - KIO::FileCopyJob* job = static_cast<KIO::FileCopyJob*>(job_); +void Manager::slotDownloadJobResult(TDEIO::Job* job_) { + TDEIO::FileCopyJob* job = static_cast<TDEIO::FileCopyJob*>(job_); if(job->error()) { GUI::CursorSaver cs(TQt::arrowCursor); delete m_tempFile; @@ -394,7 +394,7 @@ void Manager::slotInstallFinished() { if(newScript && newScript->successfulInstall()) { const TQString name = m_urlNameMap[newScript->url()]; KNS::Entry* entry = m_scriptEntryMap[newScript]; - KConfigGroup config(TDEGlobal::config(), "KNewStuffStatus"); + TDEConfigGroup config(TDEGlobal::config(), "KNewStuffStatus"); // have to keep a config entry that maps the name of the file to the name // of the newstuff entry, so we can track which entries are installed // name and entry-name() are probably the same for scripts, but not a problem @@ -440,7 +440,7 @@ bool Manager::checkCommonFile() { KURL src, dest; src.setPath(TDEGlobal::dirs()->findResource("appdata", TQString::fromLatin1("tellico-common.xsl"))); dest.setPath(userCommonFile); - return KIO::NetAccess::file_copy(src, dest); + return TDEIO::NetAccess::file_copy(src, dest); } #include "manager.moc" |