diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:15:24 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-21 19:34:09 +0200 |
commit | f2a0dc78d5bf54ebf33a9c490d05b6d36046f9ef (patch) | |
tree | 8f6523aa165219382c6bb220a468b9874587b3b2 /src/newstuff/manager.cpp | |
parent | 4f1d3929919cbac95617430088f33d44cbfb756a (diff) | |
download | tellico-f2a0dc78d5bf54ebf33a9c490d05b6d36046f9ef.tar.gz tellico-f2a0dc78d5bf54ebf33a9c490d05b6d36046f9ef.zip |
Rename old tq methods that no longer need a unique name
(cherry picked from commit 8d9b90ca794ffabf151719c2edebe9278a2d3f36)
Diffstat (limited to 'src/newstuff/manager.cpp')
-rw-r--r-- | src/newstuff/manager.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/newstuff/manager.cpp b/src/newstuff/manager.cpp index 90bd50f..e1e9d72 100644 --- a/src/newstuff/manager.cpp +++ b/src/newstuff/manager.cpp @@ -64,7 +64,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) { KTar archive(ref->fileName()); if(archive.open(IO_ReadOnly)) { const KArchiveDirectory* archiveDir = archive.directory(); - archiveDir->copyTo(Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/"))); + archiveDir->copyTo(Tellico::saveLocation(TQString::fromLatin1("entry-templates/"))); allFiles = archiveFiles(archiveDir); // remember files installed for template @@ -74,11 +74,11 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) { if(name.isEmpty()) { name = url_.fileName(); } - if(!name.endsWith(TQString::tqfromLatin1(".xsl"))) { - name += TQString::tqfromLatin1(".xsl"); + if(!name.endsWith(TQString::fromLatin1(".xsl"))) { + name += TQString::fromLatin1(".xsl"); } KURL dest; - dest.setPath(Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/")) + name); + dest.setPath(Tellico::saveLocation(TQString::fromLatin1("entry-templates/")) + name); success = true; if(TQFile::exists(dest.path())) { myDebug() << "Manager::installTemplate() - " << dest.path() << " exists!" << endl; @@ -115,7 +115,7 @@ bool Manager::removeTemplate(const TQString& name_) { } bool success = true; - TQString path = Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/")); + TQString path = Tellico::saveLocation(TQString::fromLatin1("entry-templates/")); for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { if((*it).endsWith(TQChar('/'))) { // ok to not delete all directories @@ -158,7 +158,7 @@ bool Manager::installScript(const KURL& url_) { TQFileInfo exeInfo(exeFile); DataSourceInfo* info = new DataSourceInfo(); - TQString copyTarget = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/")); + TQString copyTarget = Tellico::saveLocation(TQString::fromLatin1("data-sources/")); TQString scriptFolder; // package could have a top-level directory or not @@ -229,7 +229,7 @@ bool Manager::removeScript(const TQString& name_) { TQStringList files = fileGroup.readListEntry(name_); bool success = true; - TQString path = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/")); + TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/")); for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { if((*it).endsWith(TQChar('/'))) { // ok to not delete all directories @@ -252,7 +252,7 @@ bool Manager::removeScript(const TQString& name_) { return success; } -Tellico::NewStuff::InstalltqStatus Manager::installtqStatus(KNS::Entry* entry_) { +Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) { KConfigGroup config(KGlobal::config(), "KNewStuffStatus"); TQString datestring = config.readEntry(entry_->name()); if(datestring.isEmpty()) { @@ -270,7 +270,7 @@ Tellico::NewStuff::InstalltqStatus Manager::installtqStatus(KNS::Entry* entry_) // also check that executable files exists KConfigGroup fileGroup(KGlobal::config(), "KNewStuffFiles"); TQStringList files = fileGroup.readListEntry(entry_->name()); - TQString path = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/")); + TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/")); for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { if(!TQFile::exists(path + *it)) { return NotInstalled; @@ -303,7 +303,7 @@ TQString Manager::findXSL(const KArchiveDirectory* dir_) { const TQStringList entries = dir_->entries(); for(TQStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it) { const TQString& entry = *it; - if(entry.endsWith(TQString::tqfromLatin1(".xsl"))) { + if(entry.endsWith(TQString::fromLatin1(".xsl"))) { return entry; } } @@ -414,12 +414,12 @@ bool Manager::checkCommonFile() { // look for a file that gets installed to know the installation directory // need to check timestamps TQString userDataDir = Tellico::saveLocation(TQString()); - TQString userCommonFile = userDataDir + '/' + TQString::tqfromLatin1("tellico-common.xsl"); + TQString userCommonFile = userDataDir + '/' + TQString::fromLatin1("tellico-common.xsl"); if(TQFile::exists(userCommonFile)) { // check timestamps // pics/tellico.png is not likely to be in a user directory - TQString installDir = KGlobal::dirs()->findResourceDir("appdata", TQString::tqfromLatin1("pics/tellico.png")); - TQString installCommonFile = installDir + '/' + TQString::tqfromLatin1("tellico-common.xsl"); + TQString installDir = KGlobal::dirs()->findResourceDir("appdata", TQString::fromLatin1("pics/tellico.png")); + TQString installCommonFile = installDir + '/' + TQString::fromLatin1("tellico-common.xsl"); #ifndef NDEBUG if(userCommonFile == installCommonFile) { kdWarning() << "Manager::checkCommonFile() - install location is same as user location" << endl; @@ -438,7 +438,7 @@ bool Manager::checkCommonFile() { } } KURL src, dest; - src.setPath(KGlobal::dirs()->findResource("appdata", TQString::tqfromLatin1("tellico-common.xsl"))); + src.setPath(KGlobal::dirs()->findResource("appdata", TQString::fromLatin1("tellico-common.xsl"))); dest.setPath(userCommonFile); return KIO::NetAccess::file_copy(src, dest); } |