diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kio/kfile/krecentdocument.cpp | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/kfile/krecentdocument.cpp')
-rw-r--r-- | kio/kfile/krecentdocument.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index 69fd63df5..b54bdf325 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -45,7 +45,7 @@ TQString KRecentDocument::recentDocumentDirectory() { // need to change this path, not sure where - return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); + return locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")); } TQStringList KRecentDocument::recentDocuments() @@ -74,7 +74,7 @@ TQStringList KRecentDocument::recentDocuments() void KRecentDocument::add(const KURL& url) { - KRecentDocument::add(url, qApp->argv()[0]); // ### argv[0] might not match the service filename! + KRecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! } void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) @@ -83,14 +83,14 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) return; TQString openStr = url.url(); - openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded + openStr.tqreplace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded kdDebug(250) << "KRecentDocument::add for " << openStr << endl; KConfig *config = KGlobal::config(); TQString oldGrp = config->group(); - config->setGroup(TQString::fromLatin1("RecentDocuments")); - bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); - int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); + config->setGroup(TQString::tqfromLatin1("RecentDocuments")); + bool useRecent = config->readBoolEntry(TQString::tqfromLatin1("UseRecent"), true); + int maxEntries = config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); config->setGroup(oldGrp); if(!useRecent) @@ -100,7 +100,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString dStr = path + url.fileName(); - TQString ddesktop = dStr + TQString::fromLatin1(".desktop"); + TQString ddesktop = dStr + TQString::tqfromLatin1(".desktop"); int i=1; // check for duplicates @@ -108,7 +108,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // see if it points to the same file and application KSimpleConfig tmp(ddesktop); tmp.setDesktopGroup(); - if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith")) + if(tmp.readEntry(TQString::tqfromLatin1("X-KDE-LastOpenedWith")) == desktopEntryName) { utime(TQFile::encodeName(ddesktop), NULL); @@ -118,7 +118,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) ++i; if ( i > maxEntries ) break; - ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i); + ddesktop = dStr + TQString::tqfromLatin1("[%1].desktop").arg(i); } TQDir dir(path); @@ -129,7 +129,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQStringList::Iterator it; it = list.begin(); while(i > maxEntries-1){ - TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it)); + TQFile::remove(dir.absPath() + TQString::tqfromLatin1("/") + (*it)); --i, ++it; } } @@ -137,15 +137,15 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // create the applnk KSimpleConfig conf(ddesktop); conf.setDesktopGroup(); - conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); - conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); + conf.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); + conf.writePathEntry( TQString::tqfromLatin1("URL"), openStr ); // If you change the line below, change the test in the above loop - conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); + conf.writeEntry( TQString::tqfromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); TQString name = url.fileName(); if (name.isEmpty()) name = openStr; - conf.writeEntry( TQString::fromLatin1("Name"), name ); - conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); + conf.writeEntry( TQString::tqfromLatin1("Name"), name ); + conf.writeEntry( TQString::tqfromLatin1("Icon"), KMimeType::iconForURL( url ) ); } void KRecentDocument::add(const TQString &openStr, bool isUrl) @@ -170,8 +170,8 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { KConfig *config = KGlobal::config(); - KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); - return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); + KConfigGroupSaver sa(config, TQString::tqfromLatin1("RecentDocuments")); + return config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); } |