@@ -42,10 +42,10 @@ using Tellico::Fetch::ExecExternalFetcher;
TQStringList ExecExternalFetcher::parseArguments(const TQString& str_) {
// matching escaped quotes is too hard... :(
-// TQRegExp quotes(TQString::tqfromLatin1("[^\\\\](['\"])(.*[^\\\\])\\1"));
- TQRegExp quotes(TQString::tqfromLatin1("(['\"])(.*)\\1"));
+// TQRegExp quotes(TQString::fromLatin1("[^\\\\](['\"])(.*[^\\\\])\\1"));
+ TQRegExp quotes(TQString::fromLatin1("(['\"])(.*)\\1"));
quotes.setMinimal(true);
- TQRegExp spaces(TQString::tqfromLatin1("\\s+"));
+ TQRegExp spaces(TQString::fromLatin1("\\s+"));
spaces.setMinimal(true);
TQStringList args;
@@ -139,14 +139,14 @@ void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
value.remove('-'); // remove hyphens from isbn values
// shouldn't hurt and might keep from confusing stupid search sources
}
- TQRegExp rx1(TQString::tqfromLatin1("['\"].*\\1"));
+ TQRegExp rx1(TQString::fromLatin1("['\"].*\\1"));
if(!rx1.exactMatch(value)) {
value.prepend('"').append('"');
}
TQString args = m_args[key_];
- TQRegExp rx2(TQString::tqfromLatin1("['\"]%1\\1"));
- args.replace(rx2, TQString::tqfromLatin1("%1"));
- startSearch(parseArguments(args.tqarg(value))); // replace %1 with search value
+ TQRegExp rx2(TQString::fromLatin1("['\"]%1\\1"));
+ args.replace(rx2, TQString::fromLatin1("%1"));
+ startSearch(parseArguments(args.arg(value))); // replace %1 with search value
}
void ExecExternalFetcher::startSearch(const TQStringList& args_) {
@@ -196,7 +196,7 @@ void ExecExternalFetcher::slotData(KProcess*, char* buffer_, int len_) {
void ExecExternalFetcher::slotError(KProcess*, char* buffer_, int len_) {
GUI::CursorSaver cs(TQt::arrowCursor);
TQString msg = TQString::fromLocal8Bit(buffer_, len_);
- msg.prepend(source() + TQString::tqfromLatin1(": "));
+ msg.prepend(source() + TQString::fromLatin1(": "));
if(msg.endsWith(TQChar('\n'))) {
msg.truncate(msg.length()-1);
}
@@ -235,7 +235,7 @@ void ExecExternalFetcher::slotProcessExited(KProcess*) {
Data::CollPtr coll = imp->collection();
if(!coll) {
if(!imp->statusMessage().isEmpty()) {
- message(imp->statusMessage(), MessageHandler::tqStatus);
+ message(imp->statusMessage(), MessageHandler::Status);
}
myDebug() << "ExecExternalFetcher::slotProcessExited() - "<< source() << ": no collection pointer" << endl;
delete imp;
@@ -256,56 +256,56 @@ void ExecExternalFetcher::slotProcessExited(KProcess*) {
switch(coll->type()) {
case Data::Collection::Book:
case Data::Collection::Bibtex:
- desc = entry->field(TQString::tqfromLatin1("author"))
+ desc = entry->field(TQString::fromLatin1("author"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
break;
case Data::Collection::Video:
- desc = entry->field(TQString::tqfromLatin1("studio"))
+ desc = entry->field(TQString::fromLatin1("studio"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("director"))
+ + entry->field(TQString::fromLatin1("director"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"))
+ + entry->field(TQString::fromLatin1("year"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("medium"));
+ + entry->field(TQString::fromLatin1("medium"));
break;
case Data::Collection::Album:
- desc = entry->field(TQString::tqfromLatin1("artist"))
+ desc = entry->field(TQString::fromLatin1("artist"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("label"))
+ + entry->field(TQString::fromLatin1("label"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
case Data::Collection::Game:
- desc = entry->field(TQString::tqfromLatin1("platform"));
+ desc = entry->field(TQString::fromLatin1("platform"));
break;
case Data::Collection::ComicBook:
- desc = entry->field(TQString::tqfromLatin1("publisher"))
+ desc = entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("pub_year"));
break;
case Data::Collection::BoardGame:
- desc = entry->field(TQString::tqfromLatin1("designer"))
+ desc = entry->field(TQString::fromLatin1("designer"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"))
+ + entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
default:
break;
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, entry);
emit signalResultFound(r);
}
@@ -398,8 +398,8 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt
gridLayout->addWidget(cb, ++row, 0);
m_cbDict.insert(key, cb);
GUI::LineEdit* le = new GUI::LineEdit(grid);
- le->setHint(TQString::tqfromLatin1("%1")); // for example
- le->completionObject()->addItem(TQString::tqfromLatin1("%1"));
+ le->setHint(TQString::fromLatin1("%1")); // for example
+ le->completionObject()->addItem(TQString::fromLatin1("%1"));
gridLayout->addWidget(le, row, 1);
m_leDict.insert(key, le);
if(fetcher_ && fetcher_->m_args.contains(key)) {
@@ -417,9 +417,9 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt
m_cbUpdate = new TQCheckBox(i18n("Update"), grid);
gridLayout->addWidget(m_cbUpdate, ++row, 0);
m_leUpdate = new GUI::LineEdit(grid);
- m_leUpdate->setHint(TQString::tqfromLatin1("%{title}")); // for example
- m_leUpdate->completionObject()->addItem(TQString::tqfromLatin1("%{title}"));
- m_leUpdate->completionObject()->addItem(TQString::tqfromLatin1("%{isbn}"));
+ m_leUpdate->setHint(TQString::fromLatin1("%{title}")); // for example
+ m_leUpdate->completionObject()->addItem(TQString::fromLatin1("%{title}"));
+ m_leUpdate->completionObject()->addItem(TQString::fromLatin1("%{isbn}"));
gridLayout->addWidget(m_leUpdate, row, 1);
/* TRANSLATORS: Do not translate %{author}. */
w2 = i18n("Enter the arguments which should be used to search for available updates to an entry.
"
diff --git a/src/fetch/fetcher.h b/src/fetch/fetcher.h
index d2fc301..0474299 100644
--- a/src/fetch/fetcher.h
+++ b/src/fetch/fetcher.h
@@ -117,7 +117,7 @@ public:
virtual ConfigWidget* configWidget(TQWidget* parent) const = 0;
signals:
-// void signaltqStatus(const TQString& status);
+// void signalStatus(const TQString& status);
void signalResultFound(Tellico::Fetch::SearchResult* result);
void signalDone(Tellico::Fetch::Fetcher::Ptr);
diff --git a/src/fetch/fetchmanager.cpp b/src/fetch/fetchmanager.cpp
index fb83e9f..4a64052 100644
--- a/src/fetch/fetchmanager.cpp
+++ b/src/fetch/fetchmanager.cpp
@@ -94,11 +94,11 @@ void Manager::loadFetchers() {
m_configMap.clear();
KConfig* config = KGlobal::config();
- if(config->hasGroup(TQString::tqfromLatin1("Data Sources"))) {
- KConfigGroup configGroup(config, TQString::tqfromLatin1("Data Sources"));
+ if(config->hasGroup(TQString::fromLatin1("Data Sources"))) {
+ KConfigGroup configGroup(config, TQString::fromLatin1("Data Sources"));
int nSources = configGroup.readNumEntry("Sources Count", 0);
for(int i = 0; i < nSources; ++i) {
- TQString group = TQString::tqfromLatin1("Data Source %1").tqarg(i);
+ TQString group = TQString::fromLatin1("Data Source %1").arg(i);
Fetcher::Ptr f = createFetcher(config, group);
if(f) {
m_configMap.insert(f, group);
@@ -359,7 +359,7 @@ Tellico::Fetch::FetcherVec Manager::defaultFetchers() {
vec.append(new GoogleScholarFetcher(this));
vec.append(new DiscogsFetcher(this));
// only add IBS if user includes italian
- if(KGlobal::locale()->languagesTwoAlpha().contains(TQString::tqfromLatin1("it"))) {
+ if(KGlobal::locale()->languagesTwoAlpha().contains(TQString::fromLatin1("it"))) {
vec.append(new IBSFetcher(this));
}
return vec;
@@ -374,7 +374,7 @@ Tellico::Fetch::FetcherVec Manager::createUpdateFetchers(int collType_) {
KConfigGroup config(KGlobal::config(), "Data Sources");
int nSources = config.readNumEntry("Sources Count", 0);
for(int i = 0; i < nSources; ++i) {
- TQString group = TQString::tqfromLatin1("Data Source %1").tqarg(i);
+ TQString group = TQString::fromLatin1("Data Source %1").arg(i);
// needs the KConfig*
Fetcher::Ptr f = createFetcher(KGlobal::config(), group);
if(f && f->canFetch(collType_) && f->canUpdate()) {
@@ -409,8 +409,8 @@ Tellico::Fetch::Fetcher::Ptr Manager::createUpdateFetcher(int collType_, const T
return fetcher;
}
-void Manager::updatetqStatus(const TQString& message_) {
- emit signaltqStatus(message_);
+void Manager::updateStatus(const TQString& message_) {
+ emit signalStatus(message_);
}
Tellico::Fetch::TypePairList Manager::typeList() {
@@ -440,7 +440,7 @@ Tellico::Fetch::TypePairList Manager::typeList() {
list.append(TypePair(DiscogsFetcher::defaultName(), Discogs));
// now find all the scripts distributed with tellico
- TQStringList files = KGlobal::dirs()->findAllResources("appdata", TQString::tqfromLatin1("data-sources/*.spec"),
+ TQStringList files = KGlobal::dirs()->findAllResources("appdata", TQString::fromLatin1("data-sources/*.spec"),
false, true);
for(TQStringList::Iterator it = files.begin(); it != files.end(); ++it) {
KConfig spec(*it, false, false);
@@ -587,7 +587,7 @@ TQPixmap Manager::fetcherIcon(Fetch::Fetcher::CPtr fetcher_, int group_, int siz
if(fetcher_->type() == Fetch::Z3950) {
const Fetch::Z3950Fetcher* f = static_cast(fetcher_.data());
KURL u;
- u.setProtocol(TQString::tqfromLatin1("http"));
+ u.setProtocol(TQString::fromLatin1("http"));
u.setHost(f->host());
TQString icon = favIcon(u);
if(u.isValid() && !icon.isEmpty()) {
@@ -599,16 +599,16 @@ TQPixmap Manager::fetcherIcon(Fetch::Fetcher::CPtr fetcher_, int group_, int siz
const Fetch::ExecExternalFetcher* f = static_cast(fetcher_.data());
const TQString p = f->execPath();
KURL u;
- if(p.find(TQString::tqfromLatin1("allocine")) > -1) {
- u = TQString::tqfromLatin1("http://www.allocine.fr");
- } else if(p.find(TQString::tqfromLatin1("ministerio_de_cultura")) > -1) {
- u = TQString::tqfromLatin1("http://www.mcu.es");
- } else if(p.find(TQString::tqfromLatin1("dark_horse_comics")) > -1) {
- u = TQString::tqfromLatin1("http://www.darkhorse.com");
- } else if(p.find(TQString::tqfromLatin1("boardgamegeek")) > -1) {
- u = TQString::tqfromLatin1("http://www.boardgamegeek.com");
- } else if(f->source().find(TQString::tqfromLatin1("amarok"), 0, false /*case-sensitive*/) > -1) {
- return LOAD_ICON(TQString::tqfromLatin1("amarok"), group_, size_);
+ if(p.find(TQString::fromLatin1("allocine")) > -1) {
+ u = TQString::fromLatin1("http://www.allocine.fr");
+ } else if(p.find(TQString::fromLatin1("ministerio_de_cultura")) > -1) {
+ u = TQString::fromLatin1("http://www.mcu.es");
+ } else if(p.find(TQString::fromLatin1("dark_horse_comics")) > -1) {
+ u = TQString::fromLatin1("http://www.darkhorse.com");
+ } else if(p.find(TQString::fromLatin1("boardgamegeek")) > -1) {
+ u = TQString::fromLatin1("http://www.boardgamegeek.com");
+ } else if(f->source().find(TQString::fromLatin1("amarok"), 0, false /*case-sensitive*/) > -1) {
+ return LOAD_ICON(TQString::fromLatin1("amarok"), group_, size_);
}
if(!u.isEmpty() && u.isValid()) {
TQString icon = favIcon(u);
@@ -628,13 +628,13 @@ TQPixmap Manager::fetcherIcon(Fetch::Type type_, int group_, int size_) {
case IMDB:
name = favIcon("http://imdb.com"); break;
case Z3950:
- name = TQString::tqfromLatin1("network"); break; // rather arbitrary
+ name = TQString::fromLatin1("network"); break; // rather arbitrary
case SRU:
- name = TQString::tqfromLatin1("network_local"); break; // just to be different than z3950
+ name = TQString::fromLatin1("network_local"); break; // just to be different than z3950
case Entrez:
name = favIcon("http://www.ncbi.nlm.nih.gov"); break;
case ExecExternal:
- name = TQString::tqfromLatin1("exec"); break;
+ name = TQString::fromLatin1("exec"); break;
case Yahoo:
name = favIcon("http://yahoo.com"); break;
case AnimeNfo:
@@ -644,7 +644,7 @@ TQPixmap Manager::fetcherIcon(Fetch::Type type_, int group_, int size_) {
case ISBNdb:
name = favIcon("http://isbndb.com"); break;
case GCstarPlugin:
- name = TQString::tqfromLatin1("gcstar"); break;
+ name = TQString::fromLatin1("gcstar"); break;
case CrossRef:
name = favIcon("http://crossref.org"); break;
case Arxiv:
diff --git a/src/fetch/fetchmanager.h b/src/fetch/fetchmanager.h
index 8bb7f23..8d86616 100644
--- a/src/fetch/fetchmanager.h
+++ b/src/fetch/fetchmanager.h
@@ -74,7 +74,7 @@ public:
static TQPixmap fetcherIcon(Fetch::Fetcher::CPtr ptr, int iconGroup=3 /*Small*/, int size=0 /* default*/);
signals:
- void signaltqStatus(const TQString& status);
+ void signalStatus(const TQString& status);
void signalResultFound(Tellico::Fetch::SearchResult* result);
void signalDone();
@@ -88,7 +88,7 @@ private:
Manager();
Fetcher::Ptr createFetcher(KConfig* config, const TQString& configGroup);
FetcherVec defaultFetchers();
- void updatetqStatus(const TQString& message);
+ void updateStatus(const TQString& message);
static TQString favIcon(const KURL& url);
static bool bundledScriptHasExecPath(const TQString& specFile, KConfig* config);
diff --git a/src/fetch/gcstarpluginfetcher.cpp b/src/fetch/gcstarpluginfetcher.cpp
index ccb963d..a1f6140 100644
--- a/src/fetch/gcstarpluginfetcher.cpp
+++ b/src/fetch/gcstarpluginfetcher.cpp
@@ -32,7 +32,7 @@
#include
#include
-#include
+#include
#include
#include
@@ -45,23 +45,23 @@ GCstarPluginFetcher::PluginParse GCstarPluginFetcher::pluginParse = NotYet;
GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
if(!pluginMap.contains(collType_)) {
GUI::CursorSaver cs;
- TQString gcstar = KStandardDirs::findExe(TQString::tqfromLatin1("gcstar"));
+ TQString gcstar = KStandardDirs::findExe(TQString::fromLatin1("gcstar"));
if(pluginParse == NotYet) {
KProcIO proc;
- proc << gcstar << TQString::tqfromLatin1("--version");
+ proc << gcstar << TQString::fromLatin1("--version");
// wait 5 seconds at most, just a sanity thing, never want to block completely
if(proc.start(KProcess::Block) && proc.wait(5)) {
TQString output;
proc.readln(output);
if(!output.isEmpty()) {
// always going to be x.y[.z] ?
- TQRegExp versionRx(TQString::tqfromLatin1("(\\d+)\\.(\\d+)(?:\\.(\\d+))?"));
+ TQRegExp versionRx(TQString::fromLatin1("(\\d+)\\.(\\d+)(?:\\.(\\d+))?"));
if(versionRx.search(output) > -1) {
int x = versionRx.cap(1).toInt();
int y = versionRx.cap(2).toInt();
int z = versionRx.cap(3).toInt(); // ok to be empty
- myDebug() << TQString::tqfromLatin1("GCstarPluginFetcher() - found %1.%2.%3").tqarg(x).tqarg(y).tqarg(z) << endl;
+ myDebug() << TQString::fromLatin1("GCstarPluginFetcher() - found %1.%2.%3").arg(x).arg(y).arg(z) << endl;
// --list-plugins argument was added for 1.3 release
pluginParse = (x >= 1 && y >=3) ? New : Old;
}
@@ -94,9 +94,9 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_)
KProcIO proc;
proc << gcstar_
- << TQString::tqfromLatin1("-x")
- << TQString::tqfromLatin1("--list-plugins")
- << TQString::tqfromLatin1("--collection") << gcstarCollection;
+ << TQString::fromLatin1("-x")
+ << TQString::fromLatin1("--list-plugins")
+ << TQString::fromLatin1("--collection") << gcstarCollection;
if(!proc.start(KProcess::Block)) {
myWarning() << "GCstarPluginFetcher::readPluginsNew() - can't start" << endl;
@@ -117,10 +117,10 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_)
// authors have \t at beginning
line = line.stripWhiteSpace();
if(!hasName) {
- info.insert(TQString::tqfromLatin1("name"), line);
+ info.insert(TQString::fromLatin1("name"), line);
hasName = true;
} else {
- info.insert(TQString::tqfromLatin1("author"), line);
+ info.insert(TQString::fromLatin1("author"), line);
}
// myDebug() << line << endl;
}
@@ -130,10 +130,10 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_)
}
void GCstarPluginFetcher::readPluginsOld(int collType_, const TQString& gcstar_) {
- TQDir dir(gcstar_, TQString::tqfromLatin1("GC*.pm"));
- dir.cd(TQString::tqfromLatin1("../../lib/gcstar/GCPlugins/"));
+ TQDir dir(gcstar_, TQString::fromLatin1("GC*.pm"));
+ dir.cd(TQString::fromLatin1("../../lib/gcstar/GCPlugins/"));
- TQRegExp rx(TQString::tqfromLatin1("get(Name|Author|Lang)\\s*\\{\\s*return\\s+['\"](.+)['\"]"));
+ TQRegExp rx(TQString::fromLatin1("get(Name|Author|Lang)\\s*\\{\\s*return\\s+['\"](.+)['\"]"));
rx.setMinimal(true);
PluginList plugins;
@@ -156,7 +156,7 @@ void GCstarPluginFetcher::readPluginsOld(int collType_, const TQString& gcstar_)
info.insert(rx.cap(1).lower(), rx.cap(2));
}
// only add if it has a name
- if(info.contains(TQString::tqfromLatin1("name"))) {
+ if(info.contains(TQString::fromLatin1("name"))) {
plugins << info;
}
}
@@ -166,13 +166,13 @@ void GCstarPluginFetcher::readPluginsOld(int collType_, const TQString& gcstar_)
TQString GCstarPluginFetcher::gcstarType(int collType_) {
switch(collType_) {
- case Data::Collection::Book: return TQString::tqfromLatin1("GCbooks");
- case Data::Collection::Video: return TQString::tqfromLatin1("GCfilms");
- case Data::Collection::Game: return TQString::tqfromLatin1("GCgames");
- case Data::Collection::Album: return TQString::tqfromLatin1("GCmusics");
- case Data::Collection::Coin: return TQString::tqfromLatin1("GCcoins");
- case Data::Collection::Wine: return TQString::tqfromLatin1("GCwines");
- case Data::Collection::BoardGame: return TQString::tqfromLatin1("GCboardgames");
+ case Data::Collection::Book: return TQString::fromLatin1("GCbooks");
+ case Data::Collection::Video: return TQString::fromLatin1("GCfilms");
+ case Data::Collection::Game: return TQString::fromLatin1("GCgames");
+ case Data::Collection::Album: return TQString::fromLatin1("GCmusics");
+ case Data::Collection::Coin: return TQString::fromLatin1("GCcoins");
+ case Data::Collection::Wine: return TQString::fromLatin1("GCwines");
+ case Data::Collection::BoardGame: return TQString::fromLatin1("GCboardgames");
default: break;
}
return TQString();
@@ -213,7 +213,7 @@ void GCstarPluginFetcher::search(FetchKey key_, const TQString& value_) {
return;
}
- TQString gcstar = KStandardDirs::findExe(TQString::tqfromLatin1("gcstar"));
+ TQString gcstar = KStandardDirs::findExe(TQString::fromLatin1("gcstar"));
if(gcstar.isEmpty()) {
myWarning() << "GCstarPluginFetcher::search() - gcstar not found!" << endl;
stop();
@@ -233,11 +233,11 @@ void GCstarPluginFetcher::search(FetchKey key_, const TQString& value_) {
connect(m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(slotError(KProcess*, char*, int)));
connect(m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
TQStringList args;
- args << gcstar << TQString::tqfromLatin1("-x")
- << TQString::tqfromLatin1("--collection") << gcstarCollection
- << TQString::tqfromLatin1("--export") << TQString::tqfromLatin1("Tellico")
- << TQString::tqfromLatin1("--website") << m_plugin
- << TQString::tqfromLatin1("--download") << KProcess::quote(value_);
+ args << gcstar << TQString::fromLatin1("-x")
+ << TQString::fromLatin1("--collection") << gcstarCollection
+ << TQString::fromLatin1("--export") << TQString::fromLatin1("Tellico")
+ << TQString::fromLatin1("--website") << m_plugin
+ << TQString::fromLatin1("--download") << KProcess::quote(value_);
myLog() << "GCstarPluginFetcher::search() - " << args.join(TQChar(' ')) << endl;
*m_process << args;
if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) {
@@ -268,7 +268,7 @@ void GCstarPluginFetcher::slotData(KProcess*, char* buffer_, int len_) {
void GCstarPluginFetcher::slotError(KProcess*, char* buffer_, int len_) {
TQString msg = TQString::fromLocal8Bit(buffer_, len_);
- msg.prepend(source() + TQString::tqfromLatin1(": "));
+ msg.prepend(source() + TQString::fromLatin1(": "));
myDebug() << "GCstarPluginFetcher::slotError() - " << msg << endl;
m_errors << msg;
}
@@ -298,7 +298,7 @@ void GCstarPluginFetcher::slotProcessExited(KProcess*) {
Data::CollPtr coll = imp.collection();
if(!coll) {
if(!imp.statusMessage().isEmpty()) {
- message(imp.statusMessage(), MessageHandler::tqStatus);
+ message(imp.statusMessage(), MessageHandler::Status);
}
myDebug() << "GCstarPluginFetcher::slotProcessExited() - "<< source() << ": no collection pointer" << endl;
stop();
@@ -311,56 +311,56 @@ void GCstarPluginFetcher::slotProcessExited(KProcess*) {
switch(coll->type()) {
case Data::Collection::Book:
case Data::Collection::Bibtex:
- desc = entry->field(TQString::tqfromLatin1("author"))
+ desc = entry->field(TQString::fromLatin1("author"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
break;
case Data::Collection::Video:
- desc = entry->field(TQString::tqfromLatin1("studio"))
+ desc = entry->field(TQString::fromLatin1("studio"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("director"))
+ + entry->field(TQString::fromLatin1("director"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"))
+ + entry->field(TQString::fromLatin1("year"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("medium"));
+ + entry->field(TQString::fromLatin1("medium"));
break;
case Data::Collection::Album:
- desc = entry->field(TQString::tqfromLatin1("artist"))
+ desc = entry->field(TQString::fromLatin1("artist"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("label"))
+ + entry->field(TQString::fromLatin1("label"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
case Data::Collection::Game:
- desc = entry->field(TQString::tqfromLatin1("platform"));
+ desc = entry->field(TQString::fromLatin1("platform"));
break;
case Data::Collection::ComicBook:
- desc = entry->field(TQString::tqfromLatin1("publisher"))
+ desc = entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("pub_year"));
break;
case Data::Collection::BoardGame:
- desc = entry->field(TQString::tqfromLatin1("designer"))
+ desc = entry->field(TQString::fromLatin1("designer"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"))
+ + entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
default:
break;
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, entry);
emit signalResultFound(r);
}
@@ -373,7 +373,7 @@ Tellico::Data::EntryPtr GCstarPluginFetcher::fetchEntry(uint uid_) {
void GCstarPluginFetcher::updateEntry(Data::EntryPtr entry_) {
// ry searching for title and rely on Collection::sameEntry() to figure things out
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
if(!t.isEmpty()) {
search(Fetch::Title, t);
return;
@@ -449,7 +449,7 @@ void GCstarPluginFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) {
}
TQString GCstarPluginFetcher::ConfigWidget::preferredName() const {
- return TQString::tqfromLatin1("GCstar - ") + m_pluginCombo->currentText();
+ return TQString::fromLatin1("GCstar - ") + m_pluginCombo->currentText();
}
void GCstarPluginFetcher::ConfigWidget::slotTypeChanged() {
@@ -458,7 +458,7 @@ void GCstarPluginFetcher::ConfigWidget::slotTypeChanged() {
TQStringList pluginNames;
GCstarPluginFetcher::PluginList list = GCstarPluginFetcher::plugins(collType);
for(GCstarPluginFetcher::PluginList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- pluginNames << (*it)[TQString::tqfromLatin1("name")].toString();
+ pluginNames << (*it)[TQString::fromLatin1("name")].toString();
m_pluginCombo->insertItem(pluginNames.last(), *it);
}
slotPluginChanged();
@@ -467,8 +467,8 @@ void GCstarPluginFetcher::ConfigWidget::slotTypeChanged() {
void GCstarPluginFetcher::ConfigWidget::slotPluginChanged() {
PluginInfo info = m_pluginCombo->currentData().toMap();
- m_authorLabel->setText(info[TQString::tqfromLatin1("author")].toString());
-// m_langLabel->setText(info[TQString::tqfromLatin1("lang")].toString());
+ m_authorLabel->setText(info[TQString::fromLatin1("author")].toString());
+// m_langLabel->setText(info[TQString::fromLatin1("lang")].toString());
emit signalName(preferredName());
}
diff --git a/src/fetch/googlescholarfetcher.cpp b/src/fetch/googlescholarfetcher.cpp
index e93c7cd..bb5e372 100644
--- a/src/fetch/googlescholarfetcher.cpp
+++ b/src/fetch/googlescholarfetcher.cpp
@@ -25,7 +25,7 @@
#include
#include
-#include
+#include
namespace {
static const int GOOGLE_MAX_RETURNS_TOTAL = 20;
@@ -38,7 +38,7 @@ GoogleScholarFetcher::GoogleScholarFetcher(TQObject* parent_, const char* name_)
: Fetcher(parent_, name_),
m_limit(GOOGLE_MAX_RETURNS_TOTAL), m_start(0), m_job(0), m_started(false),
m_cookieIsSet(false) {
- m_bibtexRx = TQRegExp(TQString::tqfromLatin1("]*scholar\\.bib[^>]*)\""));
+ m_bibtexRx = TQRegExp(TQString::fromLatin1("]*scholar\\.bib[^>]*)\""));
m_bibtexRx.setMinimal(true);
}
@@ -47,7 +47,7 @@ GoogleScholarFetcher::~GoogleScholarFetcher() {
TQString GoogleScholarFetcher::defaultName() {
// no i18n
- return TQString::tqfromLatin1("Google Scholar");
+ return TQString::fromLatin1("Google Scholar");
}
TQString GoogleScholarFetcher::source() const {
@@ -65,7 +65,7 @@ void GoogleScholarFetcher::readConfigHook(const KConfigGroup& config_) {
void GoogleScholarFetcher::search(FetchKey key_, const TQString& value_) {
if(!m_cookieIsSet) {
// have to set preferences to have bibtex output
- FileHandler::readTextFile(TQString::tqfromLatin1("http://scholar.google.com/scholar_setprefs?num=100&scis=yes&scisf=4&submit=Save+Preferences"), true);
+ FileHandler::readTextFile(TQString::fromLatin1("http://scholar.google.com/scholar_setprefs?num=100&scis=yes&scisf=4&submit=Save+Preferences"), true);
m_cookieIsSet = true;
}
m_key = key_;
@@ -85,25 +85,25 @@ void GoogleScholarFetcher::doSearch() {
// myDebug() << "GoogleScholarFetcher::search() - value = " << value_ << endl;
if(!canFetch(Kernel::self()->collectionType())) {
- message(i18n("%1 does not allow searching for this collection type.").tqarg(source()), MessageHandler::Warning);
+ message(i18n("%1 does not allow searching for this collection type.").arg(source()), MessageHandler::Warning);
stop();
return;
}
- KURL u(TQString::tqfromLatin1(SCHOLAR_BASE_URL));
- u.addQueryItem(TQString::tqfromLatin1("start"), TQString::number(m_start));
+ KURL u(TQString::fromLatin1(SCHOLAR_BASE_URL));
+ u.addQueryItem(TQString::fromLatin1("start"), TQString::number(m_start));
switch(m_key) {
case Title:
- u.addQueryItem(TQString::tqfromLatin1("q"), TQString::tqfromLatin1("allintitle:%1").tqarg(m_value));
+ u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("allintitle:%1").arg(m_value));
break;
case Keyword:
- u.addQueryItem(TQString::tqfromLatin1("q"), m_value);
+ u.addQueryItem(TQString::fromLatin1("q"), m_value);
break;
case Person:
- u.addQueryItem(TQString::tqfromLatin1("q"), TQString::tqfromLatin1("author:%1").tqarg(m_value));
+ u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("author:%1").arg(m_value));
break;
default:
@@ -159,7 +159,7 @@ void GoogleScholarFetcher::slotComplete(KIO::Job* job_) {
TQString bibtex;
int count = 0;
for(int pos = text.find(m_bibtexRx); count < m_limit && pos > -1; pos = text.find(m_bibtexRx, pos+m_bibtexRx.matchedLength()), ++count) {
- KURL bibtexUrl(TQString::tqfromLatin1(SCHOLAR_BASE_URL), m_bibtexRx.cap(1));
+ KURL bibtexUrl(TQString::fromLatin1(SCHOLAR_BASE_URL), m_bibtexRx.cap(1));
// myDebug() << bibtexUrl << endl;
bibtex += FileHandler::readTextFile(bibtexUrl, true);
}
@@ -179,13 +179,13 @@ void GoogleScholarFetcher::slotComplete(KIO::Job* job_) {
// might get aborted
break;
}
- TQString desc = entry->field(TQString::tqfromLatin1("author"))
- + TQChar('/') + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("year"));
+ TQString desc = entry->field(TQString::fromLatin1("author"))
+ + TQChar('/') + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("year"));
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, Data::EntryPtr(entry));
emit signalResultFound(r);
}
@@ -205,7 +205,7 @@ void GoogleScholarFetcher::updateEntry(Data::EntryPtr entry_) {
// limit to top 5 results
m_limit = 5;
- TQString title = entry_->field(TQString::tqfromLatin1("title"));
+ TQString title = entry_->field(TQString::fromLatin1("title"));
if(!title.isEmpty()) {
search(Title, title);
return;
diff --git a/src/fetch/ibsfetcher.cpp b/src/fetch/ibsfetcher.cpp
index 4c86ef3..0872056 100644
--- a/src/fetch/ibsfetcher.cpp
+++ b/src/fetch/ibsfetcher.cpp
@@ -27,7 +27,7 @@
#include
#include
-#include
+#include
#include
#include
@@ -64,25 +64,25 @@ void IBSFetcher::search(FetchKey key_, const TQString& value_) {
m_matches.clear();
#ifdef IBS_TEST
- KURL u = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/ibs.html"));
+ KURL u = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/ibs.html"));
#else
- KURL u(TQString::tqfromLatin1(IBS_BASE_URL));
+ KURL u(TQString::fromLatin1(IBS_BASE_URL));
if(!canFetch(Kernel::self()->collectionType())) {
- message(i18n("%1 does not allow searching for this collection type.").tqarg(source()), MessageHandler::Warning);
+ message(i18n("%1 does not allow searching for this collection type.").arg(source()), MessageHandler::Warning);
stop();
return;
}
switch(key_) {
case Title:
- u.addQueryItem(TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("keyword"));
- u.addQueryItem(TQString::tqfromLatin1("T"), value_);
+ u.addQueryItem(TQString::fromLatin1("Type"), TQString::fromLatin1("keyword"));
+ u.addQueryItem(TQString::fromLatin1("T"), value_);
break;
case Person:
- u.addQueryItem(TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("keyword"));
- u.addQueryItem(TQString::tqfromLatin1("A"), value_);
+ u.addQueryItem(TQString::fromLatin1("Type"), TQString::fromLatin1("keyword"));
+ u.addQueryItem(TQString::fromLatin1("A"), value_);
break;
case ISBN:
@@ -91,14 +91,14 @@ void IBSFetcher::search(FetchKey key_, const TQString& value_) {
s.remove('-');
// limit to first isbn
s = s.section(';', 0, 0);
- u.setFileName(TQString::tqfromLatin1("serdsp.asp"));
- u.addQueryItem(TQString::tqfromLatin1("isbn"), s);
+ u.setFileName(TQString::fromLatin1("serdsp.asp"));
+ u.addQueryItem(TQString::fromLatin1("isbn"), s);
}
break;
case Keyword:
- u.addQueryItem(TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("keyword"));
- u.addQueryItem(TQString::tqfromLatin1("S"), value_);
+ u.addQueryItem(TQString::fromLatin1("Type"), TQString::fromLatin1("keyword"));
+ u.addQueryItem(TQString::fromLatin1("S"), value_);
break;
default:
@@ -156,12 +156,12 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
TQString s = Tellico::decodeHTML(TQString(m_data));
// really specific regexp
- TQString pat = TQString::tqfromLatin1("http://www.internetbookshop.it/code/");
- TQRegExp anchorRx(TQString::tqfromLatin1("]*href\\s*=\\s*[\"'](") +
+ TQString pat = TQString::fromLatin1("http://www.internetbookshop.it/code/");
+ TQRegExp anchorRx(TQString::fromLatin1("]*href\\s*=\\s*[\"'](") +
TQRegExp::escape(pat) +
- TQString::tqfromLatin1("[^\"]*)\"[^>]*>([^<]+)<"), false);
+ TQString::fromLatin1("[^\"]*)\"[^>]*>([^<]+)<"), false);
anchorRx.setMinimal(true);
- TQRegExp tagRx(TQString::tqfromLatin1("<.*>"));
+ TQRegExp tagRx(TQString::fromLatin1("<.*>"));
tagRx.setMinimal(true);
TQString u, t, d;
@@ -172,10 +172,10 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
emit signalResultFound(r);
#ifdef IBS_TEST
- KURL url = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/ibs2.html"));
+ KURL url = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/ibs2.html"));
#else
// the url probable contains & so be careful
- KURL url = u.replace(TQString::tqfromLatin1("&"), TQChar('&'));
+ KURL url = u.replace(TQString::fromLatin1("&"), TQChar('&'));
#endif
m_matches.insert(r->uid, url);
@@ -185,9 +185,9 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
}
u = anchorRx.cap(1);
t = anchorRx.cap(2);
- pos2 = s.find(TQString::tqfromLatin1("
"), pos, false);
+ pos2 = s.find(TQString::fromLatin1("
"), pos, false);
if(pos2 > -1) {
- int pos3 = s.find(TQString::tqfromLatin1("
"), pos2+1, false);
+ int pos3 = s.find(TQString::fromLatin1("
"), pos2+1, false);
if(pos3 > -1) {
d = s.mid(pos2, pos3-pos2).remove(tagRx).simplifyWhiteSpace();
}
@@ -197,7 +197,7 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
if(!u.isEmpty()) {
SearchResult* r = new SearchResult(this, t, d, TQString());
emit signalResultFound(r);
- m_matches.insert(r->uid, u.replace(TQString::tqfromLatin1("&"), TQChar('&')));
+ m_matches.insert(r->uid, u.replace(TQString::fromLatin1("&"), TQChar('&')));
}
#endif
@@ -221,15 +221,15 @@ void IBSFetcher::slotCompleteISBN(KIO::Job* job_) {
}
TQString str = Tellico::decodeHTML(TQString(m_data));
- if(str.find(TQString::tqfromLatin1("Libro non presente"), 0, false /* cas-sensitive */) > -1) {
+ if(str.find(TQString::fromLatin1("Libro non presente"), 0, false /* cas-sensitive */) > -1) {
stop();
return;
}
Data::EntryPtr entry = parseEntry(str);
if(entry) {
- TQString desc = entry->field(TQString::tqfromLatin1("author"))
- + '/' + entry->field(TQString::tqfromLatin1("publisher"));
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ TQString desc = entry->field(TQString::fromLatin1("author"))
+ + '/' + entry->field(TQString::fromLatin1("publisher"));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
emit signalResultFound(r);
m_matches.insert(r->uid, static_cast(job_)->url().url());
}
@@ -259,7 +259,7 @@ Tellico::Data::EntryPtr IBSFetcher::fetchEntry(uint uid_) {
// myDebug() << url.url() << endl;
#if 0
kdWarning() << "Remove debug from ibsfetcher.cpp" << endl;
- TQFile f(TQString::tqfromLatin1("/tmp/test.html"));
+ TQFile f(TQString::fromLatin1("/tmp/test.html"));
if(f.open(IO_WriteOnly)) {
TQTextStream t(&f);
t.setEncoding(TQTextStream::UnicodeUTF8);
@@ -280,9 +280,9 @@ Tellico::Data::EntryPtr IBSFetcher::fetchEntry(uint uid_) {
Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
// myDebug() << "IBSFetcher::parseEntry()" << endl;
// class might be anime_info_top
- TQString pat = TQString::tqfromLatin1("%1(?:<[^>]+>)+([^<>\\s][^<>]+)");
+ TQString pat = TQString::fromLatin1("%1(?:<[^>]+>)+([^<>\\s][^<>]+)");
- TQRegExp isbnRx(TQString::tqfromLatin1("isbn=([\\dxX]{13})"), false);
+ TQRegExp isbnRx(TQString::fromLatin1("isbn=([\\dxX]{13})"), false);
TQString isbn;
int pos = isbnRx.search(str_);
if(pos > -1) {
@@ -293,25 +293,25 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
// map captions in HTML to field names
TQMap fieldMap;
- fieldMap.insert(TQString::tqfromLatin1("Titolo"), TQString::tqfromLatin1("title"));
- fieldMap.insert(TQString::tqfromLatin1("Autore"), TQString::tqfromLatin1("author"));
- fieldMap.insert(TQString::tqfromLatin1("Anno"), TQString::tqfromLatin1("pub_year"));
- fieldMap.insert(TQString::tqfromLatin1("Categoria"), TQString::tqfromLatin1("genre"));
- fieldMap.insert(TQString::tqfromLatin1("Rilegatura"), TQString::tqfromLatin1("binding"));
- fieldMap.insert(TQString::tqfromLatin1("Editore"), TQString::tqfromLatin1("publisher"));
- fieldMap.insert(TQString::tqfromLatin1("Dati"), TQString::tqfromLatin1("edition"));
-
- TQRegExp pagesRx(TQString::tqfromLatin1("(\\d+) p\\.(\\s*,\\s*)?"));
+ fieldMap.insert(TQString::fromLatin1("Titolo"), TQString::fromLatin1("title"));
+ fieldMap.insert(TQString::fromLatin1("Autore"), TQString::fromLatin1("author"));
+ fieldMap.insert(TQString::fromLatin1("Anno"), TQString::fromLatin1("pub_year"));
+ fieldMap.insert(TQString::fromLatin1("Categoria"), TQString::fromLatin1("genre"));
+ fieldMap.insert(TQString::fromLatin1("Rilegatura"), TQString::fromLatin1("binding"));
+ fieldMap.insert(TQString::fromLatin1("Editore"), TQString::fromLatin1("publisher"));
+ fieldMap.insert(TQString::fromLatin1("Dati"), TQString::fromLatin1("edition"));
+
+ TQRegExp pagesRx(TQString::fromLatin1("(\\d+) p\\.(\\s*,\\s*)?"));
Data::EntryPtr entry = new Data::Entry(coll);
for(TQMap::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it) {
- TQRegExp infoRx(pat.tqarg(it.key()));
+ TQRegExp infoRx(pat.arg(it.key()));
pos = infoRx.search(str_);
if(pos > -1) {
if(it.data() == Latin1Literal("edition")) {
int pos2 = pagesRx.search(infoRx.cap(1));
if(pos2 > -1) {
- entry->setField(TQString::tqfromLatin1("pages"), pagesRx.cap(1));
+ entry->setField(TQString::fromLatin1("pages"), pagesRx.cap(1));
entry->setField(it.data(), infoRx.cap(1).remove(pagesRx));
} else {
entry->setField(it.data(), infoRx.cap(1));
@@ -324,44 +324,44 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
// image
if(!isbn.isEmpty()) {
- entry->setField(TQString::tqfromLatin1("isbn"), isbn);
+ entry->setField(TQString::fromLatin1("isbn"), isbn);
#if 1
- TQString imgURL = TQString::tqfromLatin1("http://giotto.ibs.it/cop/copt13.asp?f=%1").tqarg(isbn);
+ TQString imgURL = TQString::fromLatin1("http://giotto.ibs.it/cop/copt13.asp?f=%1").arg(isbn);
myLog() << "IBSFetcher() - cover = " << imgURL << endl;
- TQString id = ImageFactory::addImage(imgURL, true, TQString::tqfromLatin1("http://internetbookshop.it"));
+ TQString id = ImageFactory::addImage(imgURL, true, TQString::fromLatin1("http://internetbookshop.it"));
if(!id.isEmpty()) {
- entry->setField(TQString::tqfromLatin1("cover"), id);
+ entry->setField(TQString::fromLatin1("cover"), id);
}
#else
- TQRegExp imgRx(TQString::tqfromLatin1("]*\\s*src\\s*=\\s*\"(http://[^/]*\\.ibs\\.it/[^\"]+e=%1)").tqarg(isbn));
+ TQRegExp imgRx(TQString::fromLatin1("]*\\s*src\\s*=\\s*\"(http://[^/]*\\.ibs\\.it/[^\"]+e=%1)").arg(isbn));
imgRx.setMinimal(true);
pos = imgRx.search(str_);
if(pos > -1) {
myLog() << "IBSFetcher() - cover = " << imgRx.cap(1) << endl;
- TQString id = ImageFactory::addImage(imgRx.cap(1), true, TQString::tqfromLatin1("http://internetbookshop.it"));
+ TQString id = ImageFactory::addImage(imgRx.cap(1), true, TQString::fromLatin1("http://internetbookshop.it"));
if(!id.isEmpty()) {
- entry->setField(TQString::tqfromLatin1("cover"), id);
+ entry->setField(TQString::fromLatin1("cover"), id);
}
}
#endif
}
// now look for description
- TQRegExp descRx(TQString::tqfromLatin1("Descrizione(?:<[^>]+>)+([^<>\\s].+)"), false);
+ TQRegExp descRx(TQString::fromLatin1("Descrizione(?:<[^>]+>)+([^<>\\s].+)"), false);
descRx.setMinimal(true);
pos = descRx.search(str_);
if(pos == -1) {
- descRx.setPattern(TQString::tqfromLatin1("In sintesi(?:<[^>]+>)+([^<>\\s].+)"));
+ descRx.setPattern(TQString::fromLatin1("In sintesi(?:<[^>]+>)+([^<>\\s].+)"));
pos = descRx.search(str_);
}
if(pos > -1) {
- Data::FieldPtr f = new Data::Field(TQString::tqfromLatin1("plot"), i18n("Plot Summary"), Data::Field::Para);
+ Data::FieldPtr f = new Data::Field(TQString::fromLatin1("plot"), i18n("Plot Summary"), Data::Field::Para);
coll->addField(f);
entry->setField(f, descRx.cap(1).simplifyWhiteSpace());
}
// IBS switches the surname and family name of the author
- TQStringList names = entry->fields(TQString::tqfromLatin1("author"), false);
+ TQStringList names = entry->fields(TQString::fromLatin1("author"), false);
if(!names.isEmpty() && !names[0].isEmpty()) {
for(TQStringList::Iterator it = names.begin(); it != names.end(); ++it) {
if((*it).find(',') > -1) {
@@ -376,18 +376,18 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
words.pop_front();
*it = words.join(TQChar(' '));
}
- entry->setField(TQString::tqfromLatin1("author"), names.join(TQString::tqfromLatin1("; ")));
+ entry->setField(TQString::fromLatin1("author"), names.join(TQString::fromLatin1("; ")));
}
return entry;
}
void IBSFetcher::updateEntry(Data::EntryPtr entry_) {
- TQString isbn = entry_->field(TQString::tqfromLatin1("isbn"));
+ TQString isbn = entry_->field(TQString::fromLatin1("isbn"));
if(!isbn.isEmpty()) {
search(Fetch::ISBN, isbn);
return;
}
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
if(!t.isEmpty()) {
search(Fetch::Title, t);
return;
diff --git a/src/fetch/imdbfetcher.cpp b/src/fetch/imdbfetcher.cpp
index 682ae1f..2ddbc10 100644
--- a/src/fetch/imdbfetcher.cpp
+++ b/src/fetch/imdbfetcher.cpp
@@ -36,7 +36,7 @@
#include
#include
#include
-#include
+#include
#include
#include
@@ -45,7 +45,7 @@
namespace {
static const char* IMDB_SERVER = "akas.imdb.com";
static const uint IMDB_MAX_RESULTS = 20;
- static const TQString sep = TQString::tqfromLatin1("; ");
+ static const TQString sep = TQString::fromLatin1("; ");
}
using Tellico::Fetch::IMDBFetcher;
@@ -58,24 +58,24 @@ TQRegExp* IMDBFetcher::s_titleRx = 0;
// static
void IMDBFetcher::initRegExps() {
- s_tagRx = new TQRegExp(TQString::tqfromLatin1("<.*>"));
+ s_tagRx = new TQRegExp(TQString::fromLatin1("<.*>"));
s_tagRx->setMinimal(true);
- s_anchorRx = new TQRegExp(TQString::tqfromLatin1("]*href\\s*=\\s*\"([^\"]*)\"[^<]*>([^<]*)"), false);
+ s_anchorRx = new TQRegExp(TQString::fromLatin1("]*href\\s*=\\s*\"([^\"]*)\"[^<]*>([^<]*)"), false);
s_anchorRx->setMinimal(true);
- s_anchorTitleRx = new TQRegExp(TQString::tqfromLatin1("]*href\\s*=\\s*\"([^\"]*/title/[^\"]*)\"[^<]*>([^<]*)"), false);
+ s_anchorTitleRx = new TQRegExp(TQString::fromLatin1("]*href\\s*=\\s*\"([^\"]*/title/[^\"]*)\"[^<]*>([^<]*)"), false);
s_anchorTitleRx->setMinimal(true);
- s_anchorNameRx = new TQRegExp(TQString::tqfromLatin1("]*href\\s*=\\s*\"([^\"]*/name/[^\"]*)\"[^<]*>([^<]*)"), false);
+ s_anchorNameRx = new TQRegExp(TQString::fromLatin1("]*href\\s*=\\s*\"([^\"]*/name/[^\"]*)\"[^<]*>([^<]*)"), false);
s_anchorNameRx->setMinimal(true);
- s_titleRx = new TQRegExp(TQString::tqfromLatin1("(.*)"), false);
+ s_titleRx = new TQRegExp(TQString::fromLatin1("(.*)"), false);
s_titleRx->setMinimal(true);
}
IMDBFetcher::IMDBFetcher(TQObject* parent_, const char* name_) : Fetcher(parent_, name_),
- m_job(0), m_started(false), m_fetchImages(true), m_host(TQString::tqfromLatin1(IMDB_SERVER)),
+ m_job(0), m_started(false), m_fetchImages(true), m_host(TQString::fromLatin1(IMDB_SERVER)),
m_limit(IMDB_MAX_RESULTS), m_countOffset(0) {
if(!s_tagRx) {
initRegExps();
@@ -130,25 +130,25 @@ void IMDBFetcher::search(FetchKey key_, const TQString& value_) {
#ifdef IMDB_TEST
if(m_key == Title) {
- m_url = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/imdb-title.html"));
+ m_url = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/imdb-title.html"));
m_redirected = false;
} else {
- m_url = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/imdb-name.html"));
+ m_url = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/imdb-name.html"));
m_redirected = true;
}
#else
m_url = KURL();
- m_url.setProtocol(TQString::tqfromLatin1("http"));
- m_url.setHost(m_host.isEmpty() ? TQString::tqfromLatin1(IMDB_SERVER) : m_host);
- m_url.setPath(TQString::tqfromLatin1("/find"));
+ m_url.setProtocol(TQString::fromLatin1("http"));
+ m_url.setHost(m_host.isEmpty() ? TQString::fromLatin1(IMDB_SERVER) : m_host);
+ m_url.setPath(TQString::fromLatin1("/find"));
switch(key_) {
case Title:
- m_url.addQueryItem(TQString::tqfromLatin1("s"), TQString::tqfromLatin1("tt"));
+ m_url.addQueryItem(TQString::fromLatin1("s"), TQString::fromLatin1("tt"));
break;
case Person:
- m_url.addQueryItem(TQString::tqfromLatin1("s"), TQString::tqfromLatin1("nm"));
+ m_url.addQueryItem(TQString::fromLatin1("s"), TQString::fromLatin1("nm"));
break;
default:
@@ -159,7 +159,7 @@ void IMDBFetcher::search(FetchKey key_, const TQString& value_) {
// as far as I can tell, the url encoding should always be iso-8859-1
// not utf-8
- m_url.addQueryItem(TQString::tqfromLatin1("q"), value_, 4 /* iso-8859-1 */);
+ m_url.addQueryItem(TQString::fromLatin1("q"), value_, 4 /* iso-8859-1 */);
// myDebug() << "IMDBFetcher::search() url = " << m_url << endl;
#endif
@@ -282,9 +282,9 @@ void IMDBFetcher::parseMultipleTitleResults() {
// IMDb can return three title lists, popular, exact, and partial
// the popular titles are in the first table, after the "Popular Results" text
- int pos_popular = output.find(TQString::tqfromLatin1("Popular Titles"), 0, false);
- int pos_exact = output.find(TQString::tqfromLatin1("Exact Matches"), TQMAX(pos_popular, 0), false);
- int pos_partial = output.find(TQString::tqfromLatin1("Partial Matches"), TQMAX(pos_exact, 0), false);
+ int pos_popular = output.find(TQString::fromLatin1("Popular Titles"), 0, false);
+ int pos_exact = output.find(TQString::fromLatin1("Exact Matches"), TQMAX(pos_popular, 0), false);
+ int pos_partial = output.find(TQString::fromLatin1("Partial Matches"), TQMAX(pos_exact, 0), false);
int end_popular = pos_exact; // keep track of where to end
if(end_popular == -1) {
end_popular = pos_partial == -1 ? output.length() : pos_partial;
@@ -336,7 +336,7 @@ void IMDBFetcher::parseTitleBlock(const TQString& str_) {
}
// myDebug() << "IMDBFetcher::parseTitleBlock() - " << m_currentTitleBlock << endl;
- TQRegExp akaRx(TQString::tqfromLatin1("aka (.*)(|
|
-1) {
- int pNewLine = text.find(TQString::tqfromLatin1("
50) {
- desc = desc.left(50) + TQString::tqfromLatin1("...");
+ desc = desc.left(50) + TQString::fromLatin1("...");
}
}
@@ -425,7 +425,7 @@ void IMDBFetcher::parseSingleNameResult() {
return;
}
- TQRegExp tvRegExp(TQString::tqfromLatin1("TV\\sEpisode"), false);
+ TQRegExp tvRegExp(TQString::fromLatin1("TV\\sEpisode"), false);
int len = 0;
int count = 0;
@@ -441,7 +441,7 @@ void IMDBFetcher::parseSingleNameResult() {
desc = cap2.mid(pPos);
} else {
// look until the next -1) {
- int pNewLine = tmp.find(TQString::tqfromLatin1("
hasField(imdb) && m_fields.findIndex(imdb) > -1) {
Data::FieldPtr field = new Data::Field(imdb, i18n("IMDB Link"), Data::Field::URL);
field->setCategory(i18n("General"));
@@ -707,7 +707,7 @@ void IMDBFetcher::doTitle(const TQString& str_, Data::EntryPtr entry_) {
if(title.startsWith(TQChar('"')) && title.endsWith(TQChar('"'))) {
title = title.mid(1, title.length()-2);
}
- entry_->setField(TQString::tqfromLatin1("title"), title);
+ entry_->setField(TQString::fromLatin1("title"), title);
// remove parenthesis
uint pPos2 = pPos+1;
while(pPos2 < cap1.length() && cap1[pPos2].isDigit()) {
@@ -715,62 +715,62 @@ void IMDBFetcher::doTitle(const TQString& str_, Data::EntryPtr entry_) {
}
TQString year = cap1.mid(pPos+1, pPos2-pPos-1);
if(!year.isEmpty()) {
- entry_->setField(TQString::tqfromLatin1("year"), year);
+ entry_->setField(TQString::fromLatin1("year"), year);
}
}
}
void IMDBFetcher::doRunningTime(const TQString& str_, Data::EntryPtr entry_) {
// running time
- TQRegExp runtimeRx(TQString::tqfromLatin1("runtime:.*(\\d+)\\s+min"), false);
+ TQRegExp runtimeRx(TQString::fromLatin1("runtime:.*(\\d+)\\s+min"), false);
runtimeRx.setMinimal(true);
if(runtimeRx.search(str_) > -1) {
// myDebug() << "running-time = " << runtimeRx.cap(1) << endl;
- entry_->setField(TQString::tqfromLatin1("running-time"), runtimeRx.cap(1));
+ entry_->setField(TQString::fromLatin1("running-time"), runtimeRx.cap(1));
}
}
void IMDBFetcher::doAspectRatio(const TQString& str_, Data::EntryPtr entry_) {
- TQRegExp rx(TQString::tqfromLatin1("aspect ratio:.*([\\d\\.]+\\s*:\\s*[\\d\\.]+)"), false);
+ TQRegExp rx(TQString::fromLatin1("aspect ratio:.*([\\d\\.]+\\s*:\\s*[\\d\\.]+)"), false);
rx.setMinimal(true);
if(rx.search(str_) > -1) {
// myDebug() << "aspect ratio = " << rx.cap(1) << endl;
- entry_->setField(TQString::tqfromLatin1("aspect-ratio"), rx.cap(1).stripWhiteSpace());
+ entry_->setField(TQString::fromLatin1("aspect-ratio"), rx.cap(1).stripWhiteSpace());
}
}
void IMDBFetcher::doAlsoKnownAs(const TQString& str_, Data::EntryPtr entry_) {
- if(m_fields.findIndex(TQString::tqfromLatin1("alttitle")) == -1) {
+ if(m_fields.findIndex(TQString::fromLatin1("alttitle")) == -1) {
return;
}
// match until next b tag
-// TQRegExp akaRx(TQString::tqfromLatin1("also known as(.*)"));
- TQRegExp akaRx(TQString::tqfromLatin1("also known as(.*)<(b[>\\s/]|div)"), false);
+// TQRegExp akaRx(TQString::fromLatin1("also known as(.*)"));
+ TQRegExp akaRx(TQString::fromLatin1("also known as(.*)<(b[>\\s/]|div)"), false);
akaRx.setMinimal(true);
if(akaRx.search(str_) > -1 && !akaRx.cap(1).isEmpty()) {
- Data::FieldPtr f = entry_->collection()->fieldByName(TQString::tqfromLatin1("alttitle"));
+ Data::FieldPtr f = entry_->collection()->fieldByName(TQString::fromLatin1("alttitle"));
if(!f) {
- f = new Data::Field(TQString::tqfromLatin1("alttitle"), i18n("Alternative Titles"), Data::Field::Table);
+ f = new Data::Field(TQString::fromLatin1("alttitle"), i18n("Alternative Titles"), Data::Field::Table);
f->setFormatFlag(Data::Field::FormatTitle);
entry_->collection()->addField(f);
}
// split by
, remembering it could become valid xhtml!
- TQRegExp brRx(TQString::tqfromLatin1("
"), false);
+ TQRegExp brRx(TQString::fromLatin1("
"), false);
brRx.setMinimal(true);
TQStringList list = TQStringList::split(brRx, akaRx.cap(1));
// lang could be included with [fr]
-// const TQRegExp parRx(TQString::tqfromLatin1("\\(.+\\)"));
- const TQRegExp brackRx(TQString::tqfromLatin1("\\[\\w+\\]"));
+// const TQRegExp parRx(TQString::fromLatin1("\\(.+\\)"));
+ const TQRegExp brackRx(TQString::fromLatin1("\\[\\w+\\]"));
TQStringList values;
for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) {
TQString s = *it;
// sometimes, the word "more" gets linked to the releaseinfo page, check that
- if(s.find(TQString::tqfromLatin1("releaseinfo")) > -1) {
+ if(s.find(TQString::fromLatin1("releaseinfo")) > -1) {
continue;
}
s.remove(*s_tagRx);
@@ -786,7 +786,7 @@ void IMDBFetcher::doAlsoKnownAs(const TQString& str_, Data::EntryPtr entry_) {
}
}
if(!values.isEmpty()) {
- entry_->setField(TQString::tqfromLatin1("alttitle"), values.join(sep));
+ entry_->setField(TQString::fromLatin1("alttitle"), values.join(sep));
}
}
}
@@ -799,36 +799,36 @@ void IMDBFetcher::doPlot(const TQString& str_, Data::EntryPtr entry_, const KURL
TQString thisPlot;
// match until next opening tag
- TQRegExp plotRx(TQString::tqfromLatin1("plot (?:outline|summary):(.*)<[^/].*"), false);
+ TQRegExp plotRx(TQString::fromLatin1("plot (?:outline|summary):(.*)<[^/].*"), false);
plotRx.setMinimal(true);
- TQRegExp plotURLRx(TQString::tqfromLatin1(" -1) {
thisPlot = plotRx.cap(1);
thisPlot.remove(*s_tagRx); // remove HTML tags
- entry_->setField(TQString::tqfromLatin1("plot"), thisPlot);
+ entry_->setField(TQString::fromLatin1("plot"), thisPlot);
// if thisPlot ends with (more) or contains
// a url that ends with plotsummary, then we'll grab it, otherwise not
- if(plotRx.cap(0).endsWith(TQString::tqfromLatin1("(more)")) || plotURLRx.search(plotRx.cap(0)) > -1) {
+ if(plotRx.cap(0).endsWith(TQString::fromLatin1("(more)")) || plotURLRx.search(plotRx.cap(0)) > -1) {
useUserSummary = true;
}
}
if(useUserSummary) {
- TQRegExp idRx(TQString::tqfromLatin1("title/(tt\\d+)"));
+ TQRegExp idRx(TQString::fromLatin1("title/(tt\\d+)"));
idRx.search(baseURL_.path());
KURL plotURL = baseURL_;
- plotURL.setPath(TQString::tqfromLatin1("/title/") + idRx.cap(1) + TQString::tqfromLatin1("/plotsummary"));
+ plotURL.setPath(TQString::fromLatin1("/title/") + idRx.cap(1) + TQString::fromLatin1("/plotsummary"));
// be quiet about failure
TQString plotPage = FileHandler::readTextFile(plotURL, true);
if(!plotPage.isEmpty()) {
- TQRegExp plotRx(TQString::tqfromLatin1("(.*)
(.*)
-1) {
TQString userPlot = plotRx.cap(1);
userPlot.remove(*s_tagRx); // remove HTML tags
- entry_->setField(TQString::tqfromLatin1("plot"), Tellico::decodeHTML(userPlot));
+ entry_->setField(TQString::fromLatin1("plot"), Tellico::decodeHTML(userPlot));
}
}
}
@@ -836,11 +836,11 @@ void IMDBFetcher::doPlot(const TQString& str_, Data::EntryPtr entry_, const KURL
void IMDBFetcher::doPerson(const TQString& str_, Data::EntryPtr entry_,
const TQString& imdbHeader_, const TQString& fieldName_) {
- TQRegExp br2Rx(TQString::tqfromLatin1("
\\s*
"), false);
+ TQRegExp br2Rx(TQString::fromLatin1("
\\s*
"), false);
br2Rx.setMinimal(true);
- TQRegExp divRx(TQString::tqfromLatin1("<[/]*div"), false);
+ TQRegExp divRx(TQString::fromLatin1("<[/]*div"), false);
divRx.setMinimal(true);
- TQString name = TQString::tqfromLatin1("/name/");
+ TQString name = TQString::fromLatin1("/name/");
StringSet people;
for(int pos = str_.find(imdbHeader_); pos > 0; pos = str_.find(imdbHeader_, pos)) {
@@ -866,13 +866,13 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
// that's usually a lot of people
// but since it can be in billing order, the main actors might not
// be in the short list
- TQRegExp idRx(TQString::tqfromLatin1("title/(tt\\d+)"));
+ TQRegExp idRx(TQString::fromLatin1("title/(tt\\d+)"));
idRx.search(baseURL_.path());
#ifdef IMDB_TEST
- KURL castURL = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/imdb-title-fullcredits.html"));
+ KURL castURL = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/imdb-title-fullcredits.html"));
#else
KURL castURL = baseURL_;
- castURL.setPath(TQString::tqfromLatin1("/title/") + idRx.cap(1) + TQString::tqfromLatin1("/fullcredits"));
+ castURL.setPath(TQString::fromLatin1("/title/") + idRx.cap(1) + TQString::fromLatin1("/fullcredits"));
#endif
// be quiet about failure and be sure to translate entities
TQString castPage = Tellico::decodeHTML(FileHandler::readTextFile(castURL, true));
@@ -883,28 +883,28 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
if(castText.isEmpty()) {
// fall back to short list
castText = str_;
- pos = castText.find(TQString::tqfromLatin1("cast overview"), 0, false);
+ pos = castText.find(TQString::fromLatin1("cast overview"), 0, false);
if(pos == -1) {
- pos = castText.find(TQString::tqfromLatin1("credited cast"), 0, false);
+ pos = castText.find(TQString::fromLatin1("credited cast"), 0, false);
}
} else {
// first look for anchor
- TQRegExp castAnchorRx(TQString::tqfromLatin1(" 9) {
// back up 9 places
- if(castText.mid(pos-9, 9).startsWith(TQString::tqfromLatin1("episodes"))) {
+ if(castText.mid(pos-9, 9).startsWith(TQString::fromLatin1("episodes"))) {
// find next cast list
- pos = castText.find(TQString::tqfromLatin1("cast"), pos+6, false);
+ pos = castText.find(TQString::fromLatin1("cast"), pos+6, false);
}
}
}
@@ -915,13 +915,13 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
return;
}
- const TQString name = TQString::tqfromLatin1("/name/");
- TQRegExp tdRx(TQString::tqfromLatin1("]*>(.*) | "), false);
+ const TQString name = TQString::fromLatin1("/name/");
+ TQRegExp tdRx(TQString::fromLatin1("]*>(.*) | "), false);
tdRx.setMinimal(true);
TQStringList cast;
// loop until closing table tag
- const int endPos = castText.find(TQString::tqfromLatin1("search(castText, pos+1);
while(pos > -1 && pos < endPos && static_cast(cast.count()) < m_numCast) {
if(s_anchorRx->cap(1).find(name) > -1) {
@@ -930,7 +930,7 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
const int pos2 = tdRx.search(castText, pos);
if(pos2 > -1 && tdRx.search(castText, pos2+1) > -1) {
cast += s_anchorRx->cap(2).stripWhiteSpace()
- + TQString::tqfromLatin1("::") + tdRx.cap(1).simplifyWhiteSpace().remove(*s_tagRx);
+ + TQString::fromLatin1("::") + tdRx.cap(1).simplifyWhiteSpace().remove(*s_tagRx);
} else {
cast += s_anchorRx->cap(2).stripWhiteSpace();
}
@@ -939,46 +939,46 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
}
if(!cast.isEmpty()) {
- entry_->setField(TQString::tqfromLatin1("cast"), cast.join(sep));
+ entry_->setField(TQString::fromLatin1("cast"), cast.join(sep));
}
}
void IMDBFetcher::doRating(const TQString& str_, Data::EntryPtr entry_) {
- if(m_fields.findIndex(TQString::tqfromLatin1("imdb-rating")) == -1) {
+ if(m_fields.findIndex(TQString::fromLatin1("imdb-rating")) == -1) {
return;
}
// don't add a colon, since there's a
at the end
// some of the imdb images use /10.gif in their path, so check for space or bracket
- TQRegExp rx(TQString::tqfromLatin1("[>\\s](\\d+.?\\d*)/10[/s]"), false);
+ TQRegExp rx(TQString::fromLatin1("[>\\s](\\d+.?\\d*)/10[/s]"), false);
rx.setMinimal(true);
if(rx.search(str_) > -1 && !rx.cap(1).isEmpty()) {
- Data::FieldPtr f = entry_->collection()->fieldByName(TQString::tqfromLatin1("imdb-rating"));
+ Data::FieldPtr f = entry_->collection()->fieldByName(TQString::fromLatin1("imdb-rating"));
if(!f) {
- f = new Data::Field(TQString::tqfromLatin1("imdb-rating"), i18n("IMDB Rating"), Data::Field::Rating);
+ f = new Data::Field(TQString::fromLatin1("imdb-rating"), i18n("IMDB Rating"), Data::Field::Rating);
f->setCategory(i18n("General"));
- f->setProperty(TQString::tqfromLatin1("maximum"), TQString::tqfromLatin1("10"));
+ f->setProperty(TQString::fromLatin1("maximum"), TQString::fromLatin1("10"));
entry_->collection()->addField(f);
}
bool ok;
float value = rx.cap(1).toFloat(&ok);
if(ok) {
- entry_->setField(TQString::tqfromLatin1("imdb-rating"), TQString::number(value));
+ entry_->setField(TQString::fromLatin1("imdb-rating"), TQString::number(value));
}
}
}
void IMDBFetcher::doCover(const TQString& str_, Data::EntryPtr entry_, const KURL& baseURL_) {
// cover is the img with the "cover" alt text
- TQRegExp imgRx(TQString::tqfromLatin1("]*src\\s*=\\s*\"([^\"]*)\"[^>]*>"), false);
+ TQRegExp imgRx(TQString::fromLatin1("]*src\\s*=\\s*\"([^\"]*)\"[^>]*>"), false);
imgRx.setMinimal(true);
- TQRegExp posterRx(TQString::tqfromLatin1("]*name\\s*=\\s*\"poster\"[^>]*>(.*)"), false);
+ TQRegExp posterRx(TQString::fromLatin1("]*name\\s*=\\s*\"poster\"[^>]*>(.*)"), false);
posterRx.setMinimal(true);
- const TQString cover = TQString::tqfromLatin1("cover");
+ const TQString cover = TQString::fromLatin1("cover");
int pos = posterRx.search(str_);
while(pos > -1) {
@@ -1011,14 +1011,14 @@ void IMDBFetcher::doCover(const TQString& str_, Data::EntryPtr entry_, const KUR
// end up reparsing whole string, but it's not really that slow
// loook at every anchor tag in the string
void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
- const TQString genre = TQString::tqfromLatin1("/Genres/");
- const TQString country = TQString::tqfromLatin1("/Countries/");
- const TQString lang = TQString::tqfromLatin1("/Languages/");
- const TQString colorInfo = TQString::tqfromLatin1("color-info");
- const TQString cert = TQString::tqfromLatin1("certificates=");
- const TQString soundMix = TQString::tqfromLatin1("sound-mix=");
- const TQString year = TQString::tqfromLatin1("/Years/");
- const TQString company = TQString::tqfromLatin1("/company/");
+ const TQString genre = TQString::fromLatin1("/Genres/");
+ const TQString country = TQString::fromLatin1("/Countries/");
+ const TQString lang = TQString::fromLatin1("/Languages/");
+ const TQString colorInfo = TQString::fromLatin1("color-info");
+ const TQString cert = TQString::fromLatin1("certificates=");
+ const TQString soundMix = TQString::fromLatin1("sound-mix=");
+ const TQString year = TQString::fromLatin1("/Years/");
+ const TQString company = TQString::fromLatin1("/company/");
// IIMdb also has links with the word "sections" in them, remove that
// for genres and nationalities
@@ -1027,19 +1027,19 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
for(int pos = s_anchorRx->search(str_); pos > -1; pos = s_anchorRx->search(str_, pos+1)) {
const TQString cap1 = s_anchorRx->cap(1);
if(cap1.find(genre) > -1) {
- if(s_anchorRx->cap(2).find(TQString::tqfromLatin1(" section"), 0, false) == -1) {
+ if(s_anchorRx->cap(2).find(TQString::fromLatin1(" section"), 0, false) == -1) {
genres += s_anchorRx->cap(2).stripWhiteSpace();
}
} else if(cap1.find(country) > -1) {
- if(s_anchorRx->cap(2).find(TQString::tqfromLatin1(" section"), 0, false) == -1) {
+ if(s_anchorRx->cap(2).find(TQString::fromLatin1(" section"), 0, false) == -1) {
countries += s_anchorRx->cap(2).stripWhiteSpace();
}
} else if(cap1.find(lang) > -1) {
langs += s_anchorRx->cap(2).stripWhiteSpace();
} else if(cap1.find(colorInfo) > -1) {
// change "black and white" to "black & white"
- entry_->setField(TQString::tqfromLatin1("color"),
- s_anchorRx->cap(2).replace(TQString::tqfromLatin1("and"), TQChar('&')).stripWhiteSpace());
+ entry_->setField(TQString::fromLatin1("color"),
+ s_anchorRx->cap(2).replace(TQString::fromLatin1("and"), TQChar('&')).stripWhiteSpace());
} else if(cap1.find(cert) > -1) {
certs += s_anchorRx->cap(2).stripWhiteSpace();
} else if(cap1.find(soundMix) > -1) {
@@ -1047,34 +1047,34 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
} else if(cap1.find(company) > -1) {
studios += s_anchorRx->cap(2).stripWhiteSpace();
// if year field wasn't set before, do it now
- } else if(entry_->field(TQString::tqfromLatin1("year")).isEmpty() && cap1.find(year) > -1) {
- entry_->setField(TQString::tqfromLatin1("year"), s_anchorRx->cap(2).stripWhiteSpace());
+ } else if(entry_->field(TQString::fromLatin1("year")).isEmpty() && cap1.find(year) > -1) {
+ entry_->setField(TQString::fromLatin1("year"), s_anchorRx->cap(2).stripWhiteSpace());
}
}
- entry_->setField(TQString::tqfromLatin1("genre"), genres.join(sep));
- entry_->setField(TQString::tqfromLatin1("nationality"), countries.join(sep));
- entry_->setField(TQString::tqfromLatin1("language"), langs.join(sep));
- entry_->setField(TQString::tqfromLatin1("audio-track"), tracks.join(sep));
- entry_->setField(TQString::tqfromLatin1("studio"), studios.join(sep));
+ entry_->setField(TQString::fromLatin1("genre"), genres.join(sep));
+ entry_->setField(TQString::fromLatin1("nationality"), countries.join(sep));
+ entry_->setField(TQString::fromLatin1("language"), langs.join(sep));
+ entry_->setField(TQString::fromLatin1("audio-track"), tracks.join(sep));
+ entry_->setField(TQString::fromLatin1("studio"), studios.join(sep));
if(!certs.isEmpty()) {
// first try to set default certification
- const TQStringList& certsAllowed = entry_->collection()->fieldByName(TQString::tqfromLatin1("certification"))->allowed();
+ const TQStringList& certsAllowed = entry_->collection()->fieldByName(TQString::fromLatin1("certification"))->allowed();
for(TQStringList::ConstIterator it = certs.begin(); it != certs.end(); ++it) {
TQString country = (*it).section(':', 0, 0);
TQString cert = (*it).section(':', 1, 1);
if(cert == Latin1Literal("Unrated")) {
cert = TQChar('U');
}
- cert += TQString::tqfromLatin1(" (") + country + ')';
+ cert += TQString::fromLatin1(" (") + country + ')';
if(certsAllowed.findIndex(cert) > -1) {
- entry_->setField(TQString::tqfromLatin1("certification"), cert);
+ entry_->setField(TQString::fromLatin1("certification"), cert);
break;
}
}
// now add new field for all certifications
- const TQString allc = TQString::tqfromLatin1("allcertification");
+ const TQString allc = TQString::fromLatin1("allcertification");
if(m_fields.findIndex(allc) > -1) {
Data::FieldPtr f = entry_->collection()->fieldByName(allc);
if(!f) {
@@ -1082,7 +1082,7 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
f->setFlags(Data::Field::AllowGrouped);
entry_->collection()->addField(f);
}
- entry_->setField(TQString::tqfromLatin1("allcertification"), certs.join(sep));
+ entry_->setField(TQString::fromLatin1("allcertification"), certs.join(sep));
}
}
}
@@ -1091,8 +1091,8 @@ void IMDBFetcher::updateEntry(Data::EntryPtr entry_) {
// myLog() << "IMDBFetcher::updateEntry() - " << entry_->title() << endl;
// only take first 5
m_limit = 5;
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
- KURL link = entry_->field(TQString::tqfromLatin1("imdb"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
+ KURL link = entry_->field(TQString::fromLatin1("imdb"));
if(!link.isEmpty() && link.isValid()) {
// check if we want a different host
if(link.host() != m_host) {
@@ -1173,7 +1173,7 @@ IMDBFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const IMDBFetcher* fe
m_numCast->setValue(fetcher_->m_numCast);
m_fetchImageCheck->setChecked(fetcher_->m_fetchImages);
} else { //defaults
- m_hostEdit->setText(TQString::tqfromLatin1(IMDB_SERVER));
+ m_hostEdit->setText(TQString::fromLatin1(IMDB_SERVER));
m_numCast->setValue(10);
m_fetchImageCheck->setChecked(true);
}
@@ -1198,10 +1198,10 @@ TQString IMDBFetcher::ConfigWidget::preferredName() const {
//static
Tellico::StringMap IMDBFetcher::customFields() {
StringMap map;
- map[TQString::tqfromLatin1("imdb")] = i18n("IMDB Link");
- map[TQString::tqfromLatin1("imdb-rating")] = i18n("IMDB Rating");
- map[TQString::tqfromLatin1("alttitle")] = i18n("Alternative Titles");
- map[TQString::tqfromLatin1("allcertification")] = i18n("Certifications");
+ map[TQString::fromLatin1("imdb")] = i18n("IMDB Link");
+ map[TQString::fromLatin1("imdb-rating")] = i18n("IMDB Rating");
+ map[TQString::fromLatin1("alttitle")] = i18n("Alternative Titles");
+ map[TQString::fromLatin1("allcertification")] = i18n("Certifications");
return map;
}
diff --git a/src/fetch/isbndbfetcher.cpp b/src/fetch/isbndbfetcher.cpp
index 3c6c093..ce3ed08 100644
--- a/src/fetch/isbndbfetcher.cpp
+++ b/src/fetch/isbndbfetcher.cpp
@@ -27,7 +27,7 @@
#include
#include
-#include
+#include
#include
namespace {
@@ -76,7 +76,7 @@ void ISBNdbFetcher::search(FetchKey key_, const TQString& value_) {
m_countOffset = 0;
if(!canFetch(Kernel::self()->collectionType())) {
- message(i18n("%1 does not allow searching for this collection type.").tqarg(source()), MessageHandler::Warning);
+ message(i18n("%1 does not allow searching for this collection type.").arg(source()), MessageHandler::Warning);
stop();
return;
}
@@ -94,35 +94,35 @@ void ISBNdbFetcher::doSearch() {
// myDebug() << "ISBNdbFetcher::search() - value = " << value_ << endl;
- KURL u(TQString::tqfromLatin1(ISBNDB_BASE_URL));
- u.addQueryItem(TQString::tqfromLatin1("access_key"), TQString::tqfromLatin1(ISBNDB_APP_ID));
- u.addQueryItem(TQString::tqfromLatin1("results"), TQString::tqfromLatin1("details,authors,subjects,texts"));
- u.addQueryItem(TQString::tqfromLatin1("page_number"), TQString::number(m_page));
+ KURL u(TQString::fromLatin1(ISBNDB_BASE_URL));
+ u.addQueryItem(TQString::fromLatin1("access_key"), TQString::fromLatin1(ISBNDB_APP_ID));
+ u.addQueryItem(TQString::fromLatin1("results"), TQString::fromLatin1("details,authors,subjects,texts"));
+ u.addQueryItem(TQString::fromLatin1("page_number"), TQString::number(m_page));
switch(m_key) {
case Title:
- u.addQueryItem(TQString::tqfromLatin1("index1"), TQString::tqfromLatin1("title"));
- u.addQueryItem(TQString::tqfromLatin1("value1"), m_value);
+ u.addQueryItem(TQString::fromLatin1("index1"), TQString::fromLatin1("title"));
+ u.addQueryItem(TQString::fromLatin1("value1"), m_value);
break;
case Person:
// yes, this also queries titles, too, it's a limitation of the isbndb api service
- u.addQueryItem(TQString::tqfromLatin1("index1"), TQString::tqfromLatin1("combined"));
- u.addQueryItem(TQString::tqfromLatin1("value1"), m_value);
+ u.addQueryItem(TQString::fromLatin1("index1"), TQString::fromLatin1("combined"));
+ u.addQueryItem(TQString::fromLatin1("value1"), m_value);
break;
case Keyword:
- u.addQueryItem(TQString::tqfromLatin1("index1"), TQString::tqfromLatin1("full"));
- u.addQueryItem(TQString::tqfromLatin1("value1"), m_value);
+ u.addQueryItem(TQString::fromLatin1("index1"), TQString::fromLatin1("full"));
+ u.addQueryItem(TQString::fromLatin1("value1"), m_value);
break;
case ISBN:
- u.addQueryItem(TQString::tqfromLatin1("index1"), TQString::tqfromLatin1("isbn"));
+ u.addQueryItem(TQString::fromLatin1("index1"), TQString::fromLatin1("isbn"));
{
// only grab first value
TQString v = m_value.section(TQChar(';'), 0);
v.remove('-');
- u.addQueryItem(TQString::tqfromLatin1("value1"), v);
+ u.addQueryItem(TQString::fromLatin1("value1"), v);
}
break;
@@ -178,7 +178,7 @@ void ISBNdbFetcher::slotComplete(KIO::Job* job_) {
#if 0
kdWarning() << "Remove debug from isbndbfetcher.cpp" << endl;
- TQFile f(TQString::tqfromLatin1("/tmp/test.xml"));
+ TQFile f(TQString::fromLatin1("/tmp/test.xml"));
if(f.open(IO_WriteOnly)) {
TQTextStream t(&f);
t.setEncoding(TQTextStream::UnicodeUTF8);
@@ -194,10 +194,10 @@ void ISBNdbFetcher::slotComplete(KIO::Job* job_) {
}
if(m_total == -1) {
- TQDomNode n = dom.documentElement().namedItem(TQString::tqfromLatin1("BookList"));
+ TQDomNode n = dom.documentElement().namedItem(TQString::fromLatin1("BookList"));
TQDomElement e = n.toElement();
if(!e.isNull()) {
- m_total = e.attribute(TQString::tqfromLatin1("total_results"), TQString::number(-1)).toInt();
+ m_total = e.attribute(TQString::fromLatin1("total_results"), TQString::number(-1)).toInt();
}
}
@@ -224,15 +224,15 @@ void ISBNdbFetcher::slotComplete(KIO::Job* job_) {
// might get aborted
break;
}
- TQString desc = entry->field(TQString::tqfromLatin1("author"))
- + TQChar('/') + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ TQString desc = entry->field(TQString::fromLatin1("author"))
+ + TQChar('/') + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, Data::EntryPtr(entry));
emit signalResultFound(r);
++m_numResults;
@@ -244,7 +244,7 @@ void ISBNdbFetcher::slotComplete(KIO::Job* job_) {
const int currentTotal = TQMIN(m_total, m_limit);
if(m_page * ISBNDB_RETURNS_PER_REQUEST < currentTotal) {
int foundCount = (m_page-1) * ISBNDB_RETURNS_PER_REQUEST + coll->entryCount();
- message(i18n("Results from %1: %2/%3").tqarg(source()).tqarg(foundCount).tqarg(m_total), MessageHandler::tqStatus);
+ message(i18n("Results from %1: %2/%3").arg(source()).arg(foundCount).arg(m_total), MessageHandler::Status);
++m_page;
m_countOffset = 0;
doSearch();
@@ -265,32 +265,32 @@ Tellico::Data::EntryPtr ISBNdbFetcher::fetchEntry(uint uid_) {
}
// if the publisher id is set, then we need to grab the real publisher name
- const TQString id = entry->field(TQString::tqfromLatin1("pub_id"));
+ const TQString id = entry->field(TQString::fromLatin1("pub_id"));
if(!id.isEmpty()) {
- KURL u(TQString::tqfromLatin1(ISBNDB_BASE_URL));
- u.setFileName(TQString::tqfromLatin1("publishers.xml"));
- u.addQueryItem(TQString::tqfromLatin1("access_key"), TQString::tqfromLatin1(ISBNDB_APP_ID));
- u.addQueryItem(TQString::tqfromLatin1("index1"), TQString::tqfromLatin1("publisher_id"));
- u.addQueryItem(TQString::tqfromLatin1("value1"), id);
+ KURL u(TQString::fromLatin1(ISBNDB_BASE_URL));
+ u.setFileName(TQString::fromLatin1("publishers.xml"));
+ u.addQueryItem(TQString::fromLatin1("access_key"), TQString::fromLatin1(ISBNDB_APP_ID));
+ u.addQueryItem(TQString::fromLatin1("index1"), TQString::fromLatin1("publisher_id"));
+ u.addQueryItem(TQString::fromLatin1("value1"), id);
TQDomDocument dom = FileHandler::readXMLFile(u, true);
if(!dom.isNull()) {
- TQString pub = dom.documentElement().namedItem(TQString::tqfromLatin1("PublisherList"))
- .namedItem(TQString::tqfromLatin1("PublisherData"))
- .namedItem(TQString::tqfromLatin1("Name"))
+ TQString pub = dom.documentElement().namedItem(TQString::fromLatin1("PublisherList"))
+ .namedItem(TQString::fromLatin1("PublisherData"))
+ .namedItem(TQString::fromLatin1("Name"))
.toElement().text();
if(!pub.isEmpty()) {
- entry->setField(TQString::tqfromLatin1("publisher"), pub);
+ entry->setField(TQString::fromLatin1("publisher"), pub);
}
}
- entry->setField(TQString::tqfromLatin1("pub_id"), TQString());
+ entry->setField(TQString::fromLatin1("pub_id"), TQString());
}
return entry;
}
void ISBNdbFetcher::initXSLTHandler() {
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("isbndb2tellico.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("isbndb2tellico.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "ISBNdbFetcher::initXSLTHandler() - can not locate isbndb2tellico.xsl." << endl;
return;
@@ -314,14 +314,14 @@ void ISBNdbFetcher::updateEntry(Data::EntryPtr entry_) {
// limit to top 5 results
m_limit = 5;
- TQString isbn = entry_->field(TQString::tqfromLatin1("isbn"));
+ TQString isbn = entry_->field(TQString::fromLatin1("isbn"));
if(!isbn.isEmpty()) {
search(Fetch::ISBN, isbn);
return;
}
// optimistically try searching for title and rely on Collection::sameEntry() to figure things out
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
if(!t.isEmpty()) {
m_limit = 10; // raise limit so more possibility of match
search(Fetch::Title, t);
diff --git a/src/fetch/messagehandler.cpp b/src/fetch/messagehandler.cpp
index 5510480..287d689 100644
--- a/src/fetch/messagehandler.cpp
+++ b/src/fetch/messagehandler.cpp
@@ -21,7 +21,7 @@ using Tellico::Fetch::ManagerMessage;
// all messages go to manager
void ManagerMessage::send(const TQString& message_, Type type_) {
- Fetch::Manager::self()->updatetqStatus(message_);
+ Fetch::Manager::self()->updateStatus(message_);
// plus errors get a message box
if(type_ == Error) {
KMessageBox::sorry(Kernel::self()->widget(), message_);
diff --git a/src/fetch/messagehandler.h b/src/fetch/messagehandler.h
index 804d574..7cf525a 100644
--- a/src/fetch/messagehandler.h
+++ b/src/fetch/messagehandler.h
@@ -25,7 +25,7 @@ namespace Tellico {
*/
class MessageHandler {
public:
- enum Type { tqStatus, Warning, Error, ListError };
+ enum Type { Status, Warning, Error, ListError };
MessageHandler() {}
virtual ~MessageHandler() {}
diff --git a/src/fetch/scripts/dark_horse_comics.py b/src/fetch/scripts/dark_horse_comics.py
index 513127c..4f3b651 100644
--- a/src/fetch/scripts/dark_horse_comics.py
+++ b/src/fetch/scripts/dark_horse_comics.py
@@ -86,7 +86,7 @@ class BasicTellicoDOM:
entryNode.setAttribute('id', str(self.__currentId))
titleNode = self.__doc.createElement('title')
- titleNode.appendChild(self.__doc.createTextNode(tqunicode(d['title'], 'latin-1').encode('utf-8')))
+ titleNode.appendChild(self.__doc.createTextNode(unicode(d['title'], 'latin-1').encode('utf-8')))
yearNode = self.__doc.createElement('pub_year')
yearNode.appendChild(self.__doc.createTextNode(d['pub_year']))
@@ -101,25 +101,25 @@ class BasicTellicoDOM:
writersNode = self.__doc.createElement('writers')
for g in d['writer']:
writerNode = self.__doc.createElement('writer')
- writerNode.appendChild(self.__doc.createTextNode(tqunicode(g, 'latin-1').encode('utf-8')))
+ writerNode.appendChild(self.__doc.createTextNode(unicode(g, 'latin-1').encode('utf-8')))
writersNode.appendChild(writerNode)
genresNode = self.__doc.createElement('genres')
for g in d['genre']:
genreNode = self.__doc.createElement('genre')
- genreNode.appendChild(self.__doc.createTextNode(tqunicode(g, 'latin-1').encode('utf-8')))
+ genreNode.appendChild(self.__doc.createTextNode(unicode(g, 'latin-1').encode('utf-8')))
genresNode.appendChild(genreNode)
commentsNode = self.__doc.createElement('comments')
#for g in d['comments']:
- # commentsNode.appendChild(self.__doc.createTextNode(tqunicode("%s\n\n" % g, 'latin-1').encode('utf-8')))
+ # commentsNode.appendChild(self.__doc.createTextNode(unicode("%s\n\n" % g, 'latin-1').encode('utf-8')))
commentsData = string.join(d['comments'], '\n\n')
- commentsNode.appendChild(self.__doc.createTextNode(tqunicode(commentsData, 'latin-1').encode('utf-8')))
+ commentsNode.appendChild(self.__doc.createTextNode(unicode(commentsData, 'latin-1').encode('utf-8')))
artistsNode = self.__doc.createElement('artists')
for k, v in d['artist'].iteritems():
artistNode = self.__doc.createElement('artist')
- artistNode.appendChild(self.__doc.createTextNode(tqunicode(v, 'latin-1').encode('utf-8')))
+ artistNode.appendChild(self.__doc.createTextNode(unicode(v, 'latin-1').encode('utf-8')))
artistsNode.appendChild(artistNode)
pagesNode = self.__doc.createElement('pages')
@@ -132,7 +132,7 @@ class BasicTellicoDOM:
imageNode = self.__doc.createElement('image')
imageNode.setAttribute('format', 'JPEG')
imageNode.setAttribute('id', d['image'][0])
- imageNode.appendChild(self.__doc.createTextNode(tqunicode(d['image'][1], 'latin-1').encode('utf-8')))
+ imageNode.appendChild(self.__doc.createTextNode(unicode(d['image'][1], 'latin-1').encode('utf-8')))
coverNode = self.__doc.createElement('cover')
coverNode.appendChild(self.__doc.createTextNode(d['image'][0]))
diff --git a/src/fetch/scripts/fr.allocine.py b/src/fetch/scripts/fr.allocine.py
index 6412ecf..97a2247 100755
--- a/src/fetch/scripts/fr.allocine.py
+++ b/src/fetch/scripts/fr.allocine.py
@@ -90,23 +90,23 @@ class BasicTellicoDOM:
entryNode.setAttribute('id', str(self.__currentId))
titleNode = self.__doc.createElement('title')
- titleNode.appendChild(self.__doc.createTextNode(tqunicode(d['title'], 'latin-1').encode('utf-8')))
+ titleNode.appendChild(self.__doc.createTextNode(unicode(d['title'], 'latin-1').encode('utf-8')))
otitleNode = self.__doc.createElement('titre-original')
- otitleNode.appendChild(self.__doc.createTextNode(tqunicode(d['otitle'], 'latin-1').encode('utf-8')))
+ otitleNode.appendChild(self.__doc.createTextNode(unicode(d['otitle'], 'latin-1').encode('utf-8')))
yearNode = self.__doc.createElement('year')
- yearNode.appendChild(self.__doc.createTextNode(tqunicode(d['year'], 'latin-1').encode('utf-8')))
+ yearNode.appendChild(self.__doc.createTextNode(unicode(d['year'], 'latin-1').encode('utf-8')))
genresNode = self.__doc.createElement('genres')
for g in d['genres']:
genreNode = self.__doc.createElement('genre')
- genreNode.appendChild(self.__doc.createTextNode(tqunicode(g, 'latin-1').encode('utf-8')))
+ genreNode.appendChild(self.__doc.createTextNode(unicode(g, 'latin-1').encode('utf-8')))
genresNode.appendChild(genreNode)
natsNode = self.__doc.createElement('nationalitys')
natNode = self.__doc.createElement('nat')
- natNode.appendChild(self.__doc.createTextNode(tqunicode(d['nat'], 'latin-1').encode('utf-8')))
+ natNode.appendChild(self.__doc.createTextNode(unicode(d['nat'], 'latin-1').encode('utf-8')))
natsNode.appendChild(natNode)
castsNode = self.__doc.createElement('casts')
@@ -114,7 +114,7 @@ class BasicTellicoDOM:
castNode = self.__doc.createElement('cast')
col1Node = self.__doc.createElement('column')
col2Node = self.__doc.createElement('column')
- col1Node.appendChild(self.__doc.createTextNode(tqunicode(g, 'latin-1').encode('utf-8')))
+ col1Node.appendChild(self.__doc.createTextNode(unicode(g, 'latin-1').encode('utf-8')))
castNode.appendChild(col1Node)
castNode.appendChild(col2Node)
castsNode.appendChild(castNode)
@@ -122,17 +122,17 @@ class BasicTellicoDOM:
dirsNode = self.__doc.createElement('directors')
for g in d['dirs']:
dirNode = self.__doc.createElement('director')
- dirNode.appendChild(self.__doc.createTextNode(tqunicode(g, 'latin-1').encode('utf-8')))
+ dirNode.appendChild(self.__doc.createTextNode(unicode(g, 'latin-1').encode('utf-8')))
dirsNode.appendChild(dirNode)
timeNode = self.__doc.createElement('running-time')
- timeNode.appendChild(self.__doc.createTextNode(tqunicode(d['time'], 'latin-1').encode('utf-8')))
+ timeNode.appendChild(self.__doc.createTextNode(unicode(d['time'], 'latin-1').encode('utf-8')))
- allocineNode = self.__doc.createElement(tqunicode('allociné-link', 'latin-1').encode('utf-8'))
- allocineNode.appendChild(self.__doc.createTextNode(tqunicode(d['allocine'], 'latin-1').encode('utf-8')))
+ allocineNode = self.__doc.createElement(unicode('allociné-link', 'latin-1').encode('utf-8'))
+ allocineNode.appendChild(self.__doc.createTextNode(unicode(d['allocine'], 'latin-1').encode('utf-8')))
plotNode = self.__doc.createElement('plot')
- plotNode.appendChild(self.__doc.createTextNode(tqunicode(d['plot'], 'latin-1').encode('utf-8')))
+ plotNode.appendChild(self.__doc.createTextNode(unicode(d['plot'], 'latin-1').encode('utf-8')))
if d['image']:
imageNode = self.__doc.createElement('image')
@@ -140,7 +140,7 @@ class BasicTellicoDOM:
imageNode.setAttribute('id', d['image'][0])
imageNode.setAttribute('width', '120')
imageNode.setAttribute('height', '160')
- imageNode.appendChild(self.__doc.createTextNode(tqunicode(d['image'][1], 'latin-1').encode('utf-8')))
+ imageNode.appendChild(self.__doc.createTextNode(unicode(d['image'][1], 'latin-1').encode('utf-8')))
coverNode = self.__doc.createElement('cover')
coverNode.appendChild(self.__doc.createTextNode(d['image'][0]))
diff --git a/src/fetch/scripts/ministerio_de_cultura.py b/src/fetch/scripts/ministerio_de_cultura.py
index 7f949ba..8a768f9 100644
--- a/src/fetch/scripts/ministerio_de_cultura.py
+++ b/src/fetch/scripts/ministerio_de_cultura.py
@@ -155,9 +155,9 @@ class BasicTellicoDOM:
# Convert all strings to UTF-8
for i in d.keys():
if type(d[i]) == types.ListType:
- d[i] = [tqunicode(d[i][j], 'latin-1').encode('utf-8') for j in range(len(d[i]))]
+ d[i] = [unicode(d[i][j], 'latin-1').encode('utf-8') for j in range(len(d[i]))]
elif type(d[i]) == types.StringType:
- d[i] = tqunicode(d[i], 'latin-1').encode('utf-8')
+ d[i] = unicode(d[i], 'latin-1').encode('utf-8')
entryNode = self.__doc.createElement('entry')
entryNode.setAttribute('id', str(self.__currentId))
diff --git a/src/fetch/srufetcher.cpp b/src/fetch/srufetcher.cpp
index 99529c3..3410c0c 100644
--- a/src/fetch/srufetcher.cpp
+++ b/src/fetch/srufetcher.cpp
@@ -36,7 +36,7 @@
#include
#include
-#include
+#include
#include
//#define SRU_DEBUG
@@ -95,7 +95,7 @@ void SRUFetcher::readConfigHook(const KConfigGroup& config_) {
if(!m_path.startsWith(TQChar('/'))) {
m_path.prepend('/');
}
- m_format = config_.readEntry("Format", TQString::tqfromLatin1("mods"));
+ m_format = config_.readEntry("Format", TQString::fromLatin1("mods"));
m_fields = config_.readListEntry("Custom Fields");
}
@@ -109,35 +109,35 @@ void SRUFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true;
#ifdef SRU_DEBUG
- KURL u = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/sru.xml"));
+ KURL u = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/sru.xml"));
#else
KURL u;
- u.setProtocol(TQString::tqfromLatin1("http"));
+ u.setProtocol(TQString::fromLatin1("http"));
u.setHost(m_host);
u.setPort(m_port);
u.setPath(m_path);
- u.addQueryItem(TQString::tqfromLatin1("operation"), TQString::tqfromLatin1("searchRetrieve"));
- u.addQueryItem(TQString::tqfromLatin1("version"), TQString::tqfromLatin1("1.1"));
- u.addQueryItem(TQString::tqfromLatin1("maximumRecords"), TQString::number(SRU_MAX_RECORDS));
- u.addQueryItem(TQString::tqfromLatin1("recordSchema"), m_format);
+ u.addQueryItem(TQString::fromLatin1("operation"), TQString::fromLatin1("searchRetrieve"));
+ u.addQueryItem(TQString::fromLatin1("version"), TQString::fromLatin1("1.1"));
+ u.addQueryItem(TQString::fromLatin1("maximumRecords"), TQString::number(SRU_MAX_RECORDS));
+ u.addQueryItem(TQString::fromLatin1("recordSchema"), m_format);
const int type = Kernel::self()->collectionType();
TQString str = TQChar('"') + value_ + TQChar('"');
switch(key_) {
case Title:
- u.addQueryItem(TQString::tqfromLatin1("query"), TQString::tqfromLatin1("dc.title=") + str);
+ u.addQueryItem(TQString::fromLatin1("query"), TQString::fromLatin1("dc.title=") + str);
break;
case Person:
{
TQString s;
if(type == Data::Collection::Book || type == Data::Collection::Bibtex) {
- s = TQString::tqfromLatin1("author=") + str + TQString::tqfromLatin1(" or dc.author=") + str;
+ s = TQString::fromLatin1("author=") + str + TQString::fromLatin1(" or dc.author=") + str;
} else {
- s = TQString::tqfromLatin1("dc.creator=") + str + TQString::tqfromLatin1(" or dc.editor=") + str;
+ s = TQString::fromLatin1("dc.creator=") + str + TQString::fromLatin1(" or dc.editor=") + str;
}
- u.addQueryItem(TQString::tqfromLatin1("query"), s);
+ u.addQueryItem(TQString::fromLatin1("query"), s);
}
break;
@@ -146,7 +146,7 @@ void SRUFetcher::search(FetchKey key_, const TQString& value_) {
str.remove('-');
// limit to first isbn
str = str.section(';', 0, 0);
- u.addQueryItem(TQString::tqfromLatin1("query"), TQString::tqfromLatin1("bath.isbn=") + str);
+ u.addQueryItem(TQString::fromLatin1("query"), TQString::fromLatin1("bath.isbn=") + str);
break;
case LCCN:
@@ -156,15 +156,15 @@ void SRUFetcher::search(FetchKey key_, const TQString& value_) {
str = str.section(';', 0, 0);
// also try formalized lccn
TQString lccn = LCCNValidator::formalize(str);
- u.addQueryItem(TQString::tqfromLatin1("query"),
- TQString::tqfromLatin1("bath.lccn=") + str +
- TQString::tqfromLatin1(" or bath.lccn=") + lccn
+ u.addQueryItem(TQString::fromLatin1("query"),
+ TQString::fromLatin1("bath.lccn=") + str +
+ TQString::fromLatin1(" or bath.lccn=") + lccn
);
}
break;
case Keyword:
- u.addQueryItem(TQString::tqfromLatin1("query"), str);
+ u.addQueryItem(TQString::fromLatin1("query"), str);
break;
case Raw:
@@ -233,11 +233,11 @@ void SRUFetcher::slotComplete(KIO::Job* job_) {
Import::XMLImporter xmlImporter(result);
TQDomDocument dom = xmlImporter.domDocument();
- TQDomNodeList diagList = dom.elementsByTagNameNS(diag, TQString::tqfromLatin1("diagnostic"));
+ TQDomNodeList diagList = dom.elementsByTagNameNS(diag, TQString::fromLatin1("diagnostic"));
for(uint i = 0; i < diagList.count(); ++i) {
TQDomElement elem = diagList.item(i).toElement();
- TQDomNodeList nodeList1 = elem.elementsByTagNameNS(diag, TQString::tqfromLatin1("message"));
- TQDomNodeList nodeList2 = elem.elementsByTagNameNS(diag, TQString::tqfromLatin1("details"));
+ TQDomNodeList nodeList1 = elem.elementsByTagNameNS(diag, TQString::fromLatin1("message"));
+ TQDomNodeList nodeList2 = elem.elementsByTagNameNS(diag, TQString::fromLatin1("details"));
for(uint j = 0; j < nodeList1.count(); ++j) {
TQString d = nodeList1.item(j).toElement().text();
if(!d.isEmpty()) {
@@ -275,7 +275,7 @@ void SRUFetcher::slotComplete(KIO::Job* job_) {
}
if(coll && !msg.isEmpty()) {
- message(msg, coll->entryCount() == 0 ? MessageHandler::Warning : MessageHandler::tqStatus);
+ message(msg, coll->entryCount() == 0 ? MessageHandler::Warning : MessageHandler::Status);
}
if(!coll) {
@@ -299,36 +299,36 @@ void SRUFetcher::slotComplete(KIO::Job* job_) {
TQString desc;
switch(coll->type()) {
case Data::Collection::Book:
- desc = entry->field(TQString::tqfromLatin1("author"))
+ desc = entry->field(TQString::fromLatin1("author"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
break;
case Data::Collection::Video:
- desc = entry->field(TQString::tqfromLatin1("studio"))
+ desc = entry->field(TQString::fromLatin1("studio"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("director"))
+ + entry->field(TQString::fromLatin1("director"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
case Data::Collection::Album:
- desc = entry->field(TQString::tqfromLatin1("artist"))
+ desc = entry->field(TQString::fromLatin1("artist"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("label"))
+ + entry->field(TQString::fromLatin1("label"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
default:
break;
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, entry);
emit signalResultFound(r);
}
@@ -341,20 +341,20 @@ Tellico::Data::EntryPtr SRUFetcher::fetchEntry(uint uid_) {
void SRUFetcher::updateEntry(Data::EntryPtr entry_) {
// myDebug() << "SRUFetcher::updateEntry() - " << source() << ": " << entry_->title() << endl;
- TQString isbn = entry_->field(TQString::tqfromLatin1("isbn"));
+ TQString isbn = entry_->field(TQString::fromLatin1("isbn"));
if(!isbn.isEmpty()) {
search(Fetch::ISBN, isbn);
return;
}
- TQString lccn = entry_->field(TQString::tqfromLatin1("lccn"));
+ TQString lccn = entry_->field(TQString::fromLatin1("lccn"));
if(!lccn.isEmpty()) {
search(Fetch::LCCN, lccn);
return;
}
// optimistically try searching for title and rely on Collection::sameEntry() to figure things out
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
if(!t.isEmpty()) {
search(Fetch::Title, t);
return;
@@ -369,7 +369,7 @@ bool SRUFetcher::initMARCXMLHandler() {
return true;
}
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("MARC21slim2MODS3.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("MARC21slim2MODS3.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "SRUFetcher::initHandlers() - can not locate MARC21slim2MODS3.xsl." << endl;
return false;
@@ -393,7 +393,7 @@ bool SRUFetcher::initMODSHandler() {
return true;
}
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("mods2tellico.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("mods2tellico.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "SRUFetcher::initHandlers() - can not locate mods2tellico.xsl." << endl;
return false;
@@ -413,15 +413,15 @@ bool SRUFetcher::initMODSHandler() {
}
Tellico::Fetch::Fetcher::Ptr SRUFetcher::libraryOfCongress(TQObject* parent_) {
- return new SRUFetcher(i18n("Library of Congress (US)"), TQString::tqfromLatin1("z3950.loc.gov"), 7090,
- TQString::tqfromLatin1("voyager"), parent_);
+ return new SRUFetcher(i18n("Library of Congress (US)"), TQString::fromLatin1("z3950.loc.gov"), 7090,
+ TQString::fromLatin1("voyager"), parent_);
}
// static
Tellico::StringMap SRUFetcher::customFields() {
StringMap map;
- map[TQString::tqfromLatin1("address")] = i18n("Address");
- map[TQString::tqfromLatin1("abstract")] = i18n("Abstract");
+ map[TQString::fromLatin1("address")] = i18n("Address");
+ map[TQString::fromLatin1("abstract")] = i18n("Abstract");
return map;
}
@@ -453,7 +453,7 @@ SRUConfigWidget::SRUConfigWidget(TQWidget* parent_, const SRUFetcher* fetcher_ /
m_portSpinBox = new KIntSpinBox(0, 999999, 1, SRU_DEFAULT_PORT, 10, optionsWidget());
connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified()));
l->addWidget(m_portSpinBox, row, 1);
- w = i18n("Enter the port number of the server. The default is %1.").tqarg(SRU_DEFAULT_PORT);
+ w = i18n("Enter the port number of the server. The default is %1.").arg(SRU_DEFAULT_PORT);
TQWhatsThis::add(label, w);
TQWhatsThis::add(m_portSpinBox, w);
label->setBuddy(m_portSpinBox);
@@ -471,9 +471,9 @@ SRUConfigWidget::SRUConfigWidget(TQWidget* parent_, const SRUFetcher* fetcher_ /
label = new TQLabel(i18n("Format: "), optionsWidget());
l->addWidget(label, ++row, 0);
m_formatCombo = new GUI::ComboBox(optionsWidget());
- m_formatCombo->insertItem(TQString::tqfromLatin1("MODS"), TQString::tqfromLatin1("mods"));
- m_formatCombo->insertItem(TQString::tqfromLatin1("MARCXML"), TQString::tqfromLatin1("marcxml"));
- m_formatCombo->insertItem(TQString::tqfromLatin1("Dublin Core"), TQString::tqfromLatin1("dc"));
+ m_formatCombo->insertItem(TQString::fromLatin1("MODS"), TQString::fromLatin1("mods"));
+ m_formatCombo->insertItem(TQString::fromLatin1("MARCXML"), TQString::fromLatin1("marcxml"));
+ m_formatCombo->insertItem(TQString::fromLatin1("Dublin Core"), TQString::fromLatin1("dc"));
connect(m_formatCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetModified()));
l->addWidget(m_formatCombo, row, 1);
w = i18n("Enter the result format used by the server.");
diff --git a/src/fetch/yahoofetcher.cpp b/src/fetch/yahoofetcher.cpp
index dcd1823..b3ddf77 100644
--- a/src/fetch/yahoofetcher.cpp
+++ b/src/fetch/yahoofetcher.cpp
@@ -29,7 +29,7 @@
#include
#include
-#include
+#include
#include
namespace {
@@ -83,32 +83,32 @@ void YahooFetcher::continueSearch() {
void YahooFetcher::doSearch() {
// myDebug() << "YahooFetcher::search() - value = " << value_ << endl;
- KURL u(TQString::tqfromLatin1(YAHOO_BASE_URL));
- u.addQueryItem(TQString::tqfromLatin1("appid"), TQString::tqfromLatin1(YAHOO_APP_ID));
- u.addQueryItem(TQString::tqfromLatin1("type"), TQString::tqfromLatin1("all"));
- u.addQueryItem(TQString::tqfromLatin1("output"), TQString::tqfromLatin1("xml"));
- u.addQueryItem(TQString::tqfromLatin1("start"), TQString::number(m_start));
- u.addQueryItem(TQString::tqfromLatin1("results"), TQString::number(YAHOO_MAX_RETURNS_TOTAL));
+ KURL u(TQString::fromLatin1(YAHOO_BASE_URL));
+ u.addQueryItem(TQString::fromLatin1("appid"), TQString::fromLatin1(YAHOO_APP_ID));
+ u.addQueryItem(TQString::fromLatin1("type"), TQString::fromLatin1("all"));
+ u.addQueryItem(TQString::fromLatin1("output"), TQString::fromLatin1("xml"));
+ u.addQueryItem(TQString::fromLatin1("start"), TQString::number(m_start));
+ u.addQueryItem(TQString::fromLatin1("results"), TQString::number(YAHOO_MAX_RETURNS_TOTAL));
if(!canFetch(Kernel::self()->collectionType())) {
- message(i18n("%1 does not allow searching for this collection type.").tqarg(source()), MessageHandler::Warning);
+ message(i18n("%1 does not allow searching for this collection type.").arg(source()), MessageHandler::Warning);
stop();
return;
}
switch(m_key) {
case Title:
- u.addQueryItem(TQString::tqfromLatin1("album"), m_value);
+ u.addQueryItem(TQString::fromLatin1("album"), m_value);
break;
case Person:
- u.addQueryItem(TQString::tqfromLatin1("artist"), m_value);
+ u.addQueryItem(TQString::fromLatin1("artist"), m_value);
break;
// raw is used for the entry updates
case Raw:
-// u.removeQueryItem(TQString::tqfromLatin1("type"));
-// u.addQueryItem(TQString::tqfromLatin1("type"), TQString::tqfromLatin1("phrase"));
+// u.removeQueryItem(TQString::fromLatin1("type"));
+// u.addQueryItem(TQString::fromLatin1("type"), TQString::fromLatin1("phrase"));
u.setQuery(u.query() + '&' + m_value);
break;
@@ -163,7 +163,7 @@ void YahooFetcher::slotComplete(KIO::Job* job_) {
#if 0
kdWarning() << "Remove debug from yahoofetcher.cpp" << endl;
- TQFile f(TQString::tqfromLatin1("/tmp/test.xml"));
+ TQFile f(TQString::fromLatin1("/tmp/test.xml"));
if(f.open(IO_WriteOnly)) {
TQTextStream t(&f);
t.setEncoding(TQTextStream::UnicodeUTF8);
@@ -189,7 +189,7 @@ void YahooFetcher::slotComplete(KIO::Job* job_) {
// total is top level element, with attribute totalResultsAvailable
TQDomElement e = dom.documentElement();
if(!e.isNull()) {
- m_total = e.attribute(TQString::tqfromLatin1("totalResultsAvailable")).toInt();
+ m_total = e.attribute(TQString::fromLatin1("totalResultsAvailable")).toInt();
}
}
@@ -210,13 +210,13 @@ void YahooFetcher::slotComplete(KIO::Job* job_) {
// might get aborted
break;
}
- TQString desc = entry->field(TQString::tqfromLatin1("artist"))
+ TQString desc = entry->field(TQString::fromLatin1("artist"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("label"))
+ + entry->field(TQString::fromLatin1("label"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, Data::EntryPtr(entry));
emit signalResultFound(r);
}
@@ -232,30 +232,30 @@ Tellico::Data::EntryPtr YahooFetcher::fetchEntry(uint uid_) {
return 0;
}
- KURL imageURL = entry->field(TQString::tqfromLatin1("image"));
+ KURL imageURL = entry->field(TQString::fromLatin1("image"));
if(!imageURL.isEmpty()) {
TQString id = ImageFactory::addImage(imageURL, true);
if(id.isEmpty()) {
- // rich text causes tqlayout issues
-// emit signaltqStatus(i18n("The cover image for %1 could not be loaded.").tqarg(
-// entry->field(TQString::tqfromLatin1("title"))));
+ // rich text causes layout issues
+// emit signalStatus(i18n("The cover image for %1 could not be loaded.").arg(
+// entry->field(TQString::fromLatin1("title"))));
message(i18n("The cover image could not be loaded."), MessageHandler::Warning);
} else {
- entry->setField(TQString::tqfromLatin1("cover"), id);
+ entry->setField(TQString::fromLatin1("cover"), id);
}
}
getTracks(entry);
// don't want to show image urls in the fetch dialog
- entry->setField(TQString::tqfromLatin1("image"), TQString());
+ entry->setField(TQString::fromLatin1("image"), TQString());
// no need for album id now ?
- entry->setField(TQString::tqfromLatin1("yahoo"), TQString());
+ entry->setField(TQString::fromLatin1("yahoo"), TQString());
return entry;
}
void YahooFetcher::initXSLTHandler() {
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("yahoo2tellico.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("yahoo2tellico.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "YahooFetcher::initXSLTHandler() - can not locate yahoo2tellico.xsl." << endl;
return;
@@ -276,20 +276,20 @@ void YahooFetcher::initXSLTHandler() {
void YahooFetcher::getTracks(Data::EntryPtr entry_) {
// get album id
- if(!entry_ || entry_->field(TQString::tqfromLatin1("yahoo")).isEmpty()) {
+ if(!entry_ || entry_->field(TQString::fromLatin1("yahoo")).isEmpty()) {
return;
}
- const TQString albumid = entry_->field(TQString::tqfromLatin1("yahoo"));
+ const TQString albumid = entry_->field(TQString::fromLatin1("yahoo"));
- KURL u(TQString::tqfromLatin1(YAHOO_BASE_URL));
- u.setFileName(TQString::tqfromLatin1("songSearch"));
- u.addQueryItem(TQString::tqfromLatin1("appid"), TQString::tqfromLatin1(YAHOO_APP_ID));
- u.addQueryItem(TQString::tqfromLatin1("type"), TQString::tqfromLatin1("all"));
- u.addQueryItem(TQString::tqfromLatin1("output"), TQString::tqfromLatin1("xml"));
+ KURL u(TQString::fromLatin1(YAHOO_BASE_URL));
+ u.setFileName(TQString::fromLatin1("songSearch"));
+ u.addQueryItem(TQString::fromLatin1("appid"), TQString::fromLatin1(YAHOO_APP_ID));
+ u.addQueryItem(TQString::fromLatin1("type"), TQString::fromLatin1("all"));
+ u.addQueryItem(TQString::fromLatin1("output"), TQString::fromLatin1("xml"));
// go ahesad and ask for all results, since there might well be more than 10 songs on the CD
- u.addQueryItem(TQString::tqfromLatin1("results"), TQString::number(50));
- u.addQueryItem(TQString::tqfromLatin1("albumid"), albumid);
+ u.addQueryItem(TQString::fromLatin1("results"), TQString::number(50));
+ u.addQueryItem(TQString::fromLatin1("albumid"), albumid);
// myDebug() << "YahooFetcher::getTracks() - url: " << u.url() << endl;
TQDomDocument dom = FileHandler::readXMLFile(u, false /*no namespace*/, true /*quiet*/);
@@ -300,7 +300,7 @@ void YahooFetcher::getTracks(Data::EntryPtr entry_) {
#if 0
kdWarning() << "Remove debug from yahoofetcher.cpp" << endl;
- TQFile f(TQString::tqfromLatin1("/tmp/test.xml"));
+ TQFile f(TQString::fromLatin1("/tmp/test.xml"));
if(f.open(IO_WriteOnly)) {
TQTextStream t(&f);
t.setEncoding(TQTextStream::UnicodeUTF8);
@@ -309,7 +309,7 @@ void YahooFetcher::getTracks(Data::EntryPtr entry_) {
f.close();
#endif
- const TQString track = TQString::tqfromLatin1("track");
+ const TQString track = TQString::fromLatin1("track");
TQDomNodeList nodes = dom.documentElement().childNodes();
for(uint i = 0; i < nodes.count(); ++i) {
@@ -317,16 +317,16 @@ void YahooFetcher::getTracks(Data::EntryPtr entry_) {
if(e.isNull()) {
continue;
}
- TQString t = e.namedItem(TQString::tqfromLatin1("Title")).toElement().text();
- TQString n = e.namedItem(TQString::tqfromLatin1("Track")).toElement().text();
+ TQString t = e.namedItem(TQString::fromLatin1("Title")).toElement().text();
+ TQString n = e.namedItem(TQString::fromLatin1("Track")).toElement().text();
bool ok;
int trackNum = Tellico::toUInt(n, &ok);
// trackNum might be 0
if(t.isEmpty() || !ok || trackNum < 1) {
continue;
}
- TQString a = e.namedItem(TQString::tqfromLatin1("Artist")).toElement().text();
- TQString l = e.namedItem(TQString::tqfromLatin1("Length")).toElement().text();
+ TQString a = e.namedItem(TQString::fromLatin1("Artist")).toElement().text();
+ TQString l = e.namedItem(TQString::fromLatin1("Length")).toElement().text();
int len = Tellico::toUInt(l, &ok);
TQString value = t + "::" + a;
@@ -346,14 +346,14 @@ TQString YahooFetcher::insertValue(const TQString& str_, const TQString& value_,
bool write = true;
if(!list[pos_-1].isNull()) {
// for some reason, some songs are repeated from yahoo, with 0 length, don't overwrite that
- if(value_.contains(TQString::tqfromLatin1("::")) < 2) { // means no length value
+ if(value_.contains(TQString::fromLatin1("::")) < 2) { // means no length value
write = false;
}
}
if(!value_.isEmpty() && write) {
list[pos_-1] = value_;
}
- return list.join(TQString::tqfromLatin1("; "));
+ return list.join(TQString::fromLatin1("; "));
}
void YahooFetcher::updateEntry(Data::EntryPtr entry_) {
@@ -362,16 +362,16 @@ void YahooFetcher::updateEntry(Data::EntryPtr entry_) {
m_limit = 5;
TQString value;
- TQString title = entry_->field(TQString::tqfromLatin1("title"));
+ TQString title = entry_->field(TQString::fromLatin1("title"));
if(!title.isEmpty()) {
- value += TQString::tqfromLatin1("album=") + title;
+ value += TQString::fromLatin1("album=") + title;
}
- TQString artist = entry_->field(TQString::tqfromLatin1("artist"));
+ TQString artist = entry_->field(TQString::fromLatin1("artist"));
if(!artist.isEmpty()) {
if(!value.isEmpty()) {
value += '&';
}
- value += TQString::tqfromLatin1("artist=") + artist;
+ value += TQString::fromLatin1("artist=") + artist;
}
if(!value.isEmpty()) {
search(Fetch::Raw, value);
diff --git a/src/fetch/z3950connection.cpp b/src/fetch/z3950connection.cpp
index 5bf77ac..7817762 100644
--- a/src/fetch/z3950connection.cpp
+++ b/src/fetch/z3950connection.cpp
@@ -149,7 +149,7 @@ void Z3950Connection::run() {
// if syntax is mods, set esn to mods too
TQCString type = "raw";
if(m_syntax == Latin1Literal("mods")) {
- m_syntax = TQString::tqfromLatin1("xml");
+ m_syntax = TQString::fromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
type = "xml";
} else {
@@ -170,7 +170,7 @@ void Z3950Connection::run() {
ZOOM_query_destroy(query);
m_connected = false;
- TQString s = i18n("Connection search error %1: %2").tqarg(errcode).tqarg(toString(errmsg));
+ TQString s = i18n("Connection search error %1: %2").arg(errcode).arg(toString(errmsg));
if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")";
}
@@ -190,10 +190,10 @@ void Z3950Connection::run() {
// want raw unless it's mods
ZOOM_record_get(rec, type, &len);
if(len > 0 && m_syntax.isEmpty()) {
- newSyntax = TQString::tqfromLatin1(ZOOM_record_get(rec, "syntax", &len)).lower();
+ newSyntax = TQString::fromLatin1(ZOOM_record_get(rec, "syntax", &len)).lower();
myLog() << "Z3950Connection::run() - syntax guess is " << newSyntax << endl;
if(newSyntax == Latin1Literal("mods") || newSyntax == Latin1Literal("xml")) {
- m_syntax = TQString::tqfromLatin1("xml");
+ m_syntax = TQString::fromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
} else if(newSyntax == Latin1Literal("grs-1")) {
// if it's defaulting to grs-1, go ahead and change it to try to get a marc
@@ -208,7 +208,7 @@ void Z3950Connection::run() {
newSyntax != Latin1Literal("unimarc") &&
newSyntax != Latin1Literal("grs-1")) {
myLog() << "Z3950Connection::run() - changing z39.50 syntax to MODS" << endl;
- newSyntax = TQString::tqfromLatin1("xml");
+ newSyntax = TQString::fromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
@@ -216,28 +216,28 @@ void Z3950Connection::run() {
if(len == 0) {
// change set name back
ZOOM_resultset_option_set(resultSet, "elementSetName", m_esn.latin1());
- newSyntax = TQString::tqfromLatin1("usmarc"); // try usmarc
+ newSyntax = TQString::fromLatin1("usmarc"); // try usmarc
myLog() << "Z3950Connection::run() - changing z39.50 syntax to USMARC" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::tqfromLatin1("marc21"); // try marc21
+ newSyntax = TQString::fromLatin1("marc21"); // try marc21
myLog() << "Z3950Connection::run() - changing z39.50 syntax to MARC21" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::tqfromLatin1("unimarc"); // try unimarc
+ newSyntax = TQString::fromLatin1("unimarc"); // try unimarc
myLog() << "Z3950Connection::run() - changing z39.50 syntax to UNIMARC" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::tqfromLatin1("grs-1"); // try grs-1
+ newSyntax = TQString::fromLatin1("grs-1"); // try grs-1
myLog() << "Z3950Connection::run() - changing z39.50 syntax to GRS-1" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
@@ -256,10 +256,10 @@ void Z3950Connection::run() {
// go back to fooling ourselves and calling it mods
if(m_syntax == Latin1Literal("xml")) {
- m_syntax = TQString::tqfromLatin1("mods");
+ m_syntax = TQString::fromLatin1("mods");
}
if(newSyntax == Latin1Literal("xml")) {
- newSyntax = TQString::tqfromLatin1("mods");
+ newSyntax = TQString::fromLatin1("mods");
}
// save syntax change for next time
if(m_syntax != newSyntax) {
@@ -268,7 +268,7 @@ void Z3950Connection::run() {
}
if(m_sourceCharSet.isEmpty()) {
- m_sourceCharSet = TQString::tqfromLatin1("marc-8");
+ m_sourceCharSet = TQString::fromLatin1("marc-8");
}
const size_t realLimit = TQMIN(numResults, m_limit);
@@ -291,7 +291,7 @@ void Z3950Connection::run() {
#if 0
kdWarning() << "Remove debug from z3950connection.cpp" << endl;
{
- TQFile f1(TQString::tqfromLatin1("/tmp/z3950.raw"));
+ TQFile f1(TQString::fromLatin1("/tmp/z3950.raw"));
if(f1.open(IO_WriteOnly)) {
TQDataStream t(&f1);
t << ZOOM_record_get(rec, "raw", &len);
@@ -342,7 +342,7 @@ bool Z3950Connection::makeConnection() {
ZOOM_connection_destroy(d->conn);
m_connected = false;
- TQString s = i18n("Connection error %1: %2").tqarg(errcode).tqarg(toString(errmsg));
+ TQString s = i18n("Connection error %1: %2").arg(errcode).arg(toString(errmsg));
if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")";
}
@@ -378,12 +378,12 @@ void Z3950Connection::checkPendingEvents() {
inline
TQCString Z3950Connection::toCString(const TQString& text_) {
- return iconvRun(text_.utf8(), TQString::tqfromLatin1("utf-8"), m_sourceCharSet);
+ return iconvRun(text_.utf8(), TQString::fromLatin1("utf-8"), m_sourceCharSet);
}
inline
TQString Z3950Connection::toString(const TQCString& text_) {
- return TQString::fromUtf8(iconvRun(text_, m_sourceCharSet, TQString::tqfromLatin1("utf-8")));
+ return TQString::fromUtf8(iconvRun(text_, m_sourceCharSet, TQString::fromLatin1("utf-8")));
}
// static
@@ -403,9 +403,9 @@ TQCString Z3950Connection::iconvRun(const TQCString& text_, const TQString& from
TQString charSetLower = fromCharSet_.lower();
charSetLower.remove('-').remove(' ');
if(charSetLower == Latin1Literal("iso5426")) {
- return iconvRun(Iso5426Converter::toUtf8(text_).utf8(), TQString::tqfromLatin1("utf-8"), toCharSet_);
+ return iconvRun(Iso5426Converter::toUtf8(text_).utf8(), TQString::fromLatin1("utf-8"), toCharSet_);
} else if(charSetLower == Latin1Literal("iso6937")) {
- return iconvRun(Iso6937Converter::toUtf8(text_).utf8(), TQString::tqfromLatin1("utf-8"), toCharSet_);
+ return iconvRun(Iso6937Converter::toUtf8(text_).utf8(), TQString::fromLatin1("utf-8"), toCharSet_);
}
kdWarning() << "Z3950Connection::iconvRun() - conversion from " << fromCharSet_
<< " to " << toCharSet_ << " is unsupported" << endl;
@@ -453,9 +453,9 @@ TQString Z3950Connection::toXML(const TQCString& marc_, const TQString& charSet_
TQString charSetLower = charSet_.lower();
charSetLower.remove('-').remove(' ');
if(charSetLower == Latin1Literal("iso5426")) {
- return toXML(Iso5426Converter::toUtf8(marc_).utf8(), TQString::tqfromLatin1("utf-8"));
+ return toXML(Iso5426Converter::toUtf8(marc_).utf8(), TQString::fromLatin1("utf-8"));
} else if(charSetLower == Latin1Literal("iso6937")) {
- return toXML(Iso6937Converter::toUtf8(marc_).utf8(), TQString::tqfromLatin1("utf-8"));
+ return toXML(Iso6937Converter::toUtf8(marc_).utf8(), TQString::fromLatin1("utf-8"));
}
kdWarning() << "Z3950Connection::toXML() - conversion from " << charSet_ << " is unsupported" << endl;
return TQString();
@@ -488,7 +488,7 @@ TQString Z3950Connection::toXML(const TQCString& marc_, const TQString& charSet_
return TQString();
}
- TQString output = TQString::tqfromLatin1("\n");
+ TQString output = TQString::fromLatin1("\n");
output += TQString::fromUtf8(TQCString(result, len+1), len+1);
// myDebug() << TQCString(result) << endl;
// myDebug() << "-------------------------------------------" << endl;
diff --git a/src/fetch/z3950fetcher.cpp b/src/fetch/z3950fetcher.cpp
index 2496b5b..f24b030 100644
--- a/src/fetch/z3950fetcher.cpp
+++ b/src/fetch/z3950fetcher.cpp
@@ -47,14 +47,14 @@
#include
#include
-#include
+#include
#include
#include
#include
namespace {
static const int Z3950_DEFAULT_PORT = 210;
- static const TQString Z3950_DEFAULT_ESN = TQString::tqfromLatin1("F");
+ static const TQString Z3950_DEFAULT_ESN = TQString::fromLatin1("F");
}
using Tellico::Fetch::Z3950Fetcher;
@@ -103,7 +103,7 @@ void Z3950Fetcher::readConfigHook(const KConfigGroup& config_) {
m_password = config_.readEntry("Password");
} else {
m_preset = preset;
- TQString serverFile = locate("appdata", TQString::tqfromLatin1("z3950-servers.cfg"));
+ TQString serverFile = locate("appdata", TQString::fromLatin1("z3950-servers.cfg"));
if(!serverFile.isEmpty()) {
KConfig cfg(serverFile, true /* read-only */, false /* read KDE */);
const TQStringList servers = cfg.groupList();
@@ -147,29 +147,29 @@ void Z3950Fetcher::search(FetchKey key_, const TQString& value_) {
m_started = true;
TQString svalue = m_value;
- TQRegExp rx1(TQString::tqfromLatin1("['\"].*\\1"));
+ TQRegExp rx1(TQString::fromLatin1("['\"].*\\1"));
if(!rx1.exactMatch(svalue)) {
svalue.prepend('"').append('"');
}
switch(key_) {
case Title:
- m_pqn = TQString::tqfromLatin1("@attr 1=4 ") + svalue;
+ m_pqn = TQString::fromLatin1("@attr 1=4 ") + svalue;
break;
case Person:
-// m_pqn = TQString::tqfromLatin1("@or ");
-// m_pqn += TQString::tqfromLatin1("@attr 1=1 \"") + m_value + '"';
- m_pqn = TQString::tqfromLatin1(" @attr 1=1003 ") + svalue;
+// m_pqn = TQString::fromLatin1("@or ");
+// m_pqn += TQString::fromLatin1("@attr 1=1 \"") + m_value + '"';
+ m_pqn = TQString::fromLatin1(" @attr 1=1003 ") + svalue;
break;
case ISBN:
{
m_pqn.truncate(0);
TQString s = m_value;
s.remove('-');
- TQStringList isbnList = TQStringList::split(TQString::tqfromLatin1("; "), s);
+ TQStringList isbnList = TQStringList::split(TQString::fromLatin1("; "), s);
// also going to search for isbn10 values
for(TQStringList::Iterator it = isbnList.begin(); it != isbnList.end(); ++it) {
- if((*it).startsWith(TQString::tqfromLatin1("978"))) {
+ if((*it).startsWith(TQString::fromLatin1("978"))) {
TQString isbn10 = ISBNValidator::isbn10(*it);
isbn10.remove('-');
isbnList.insert(it, isbn10);
@@ -177,12 +177,12 @@ void Z3950Fetcher::search(FetchKey key_, const TQString& value_) {
}
const int count = isbnList.count();
if(count > 1) {
- m_pqn = TQString::tqfromLatin1("@or ");
+ m_pqn = TQString::fromLatin1("@or ");
}
for(int i = 0; i < count; ++i) {
- m_pqn += TQString::tqfromLatin1(" @attr 1=7 ") + isbnList[i];
+ m_pqn += TQString::fromLatin1(" @attr 1=7 ") + isbnList[i];
if(i < count-2) {
- m_pqn += TQString::tqfromLatin1(" @or");
+ m_pqn += TQString::fromLatin1(" @or");
}
}
}
@@ -192,19 +192,19 @@ void Z3950Fetcher::search(FetchKey key_, const TQString& value_) {
m_pqn.truncate(0);
TQString s = m_value;
s.remove('-');
- TQStringList lccnList = TQStringList::split(TQString::tqfromLatin1("; "), s);
+ TQStringList lccnList = TQStringList::split(TQString::fromLatin1("; "), s);
while(!lccnList.isEmpty()) {
- m_pqn += TQString::tqfromLatin1(" @or @attr 1=9 ") + lccnList.front();
+ m_pqn += TQString::fromLatin1(" @or @attr 1=9 ") + lccnList.front();
if(lccnList.count() > 1) {
- m_pqn += TQString::tqfromLatin1(" @or");
+ m_pqn += TQString::fromLatin1(" @or");
}
- m_pqn += TQString::tqfromLatin1(" @attr 1=9 ") + LCCNValidator::formalize(lccnList.front());
+ m_pqn += TQString::fromLatin1(" @attr 1=9 ") + LCCNValidator::formalize(lccnList.front());
lccnList.pop_front();
}
}
break;
case Keyword:
- m_pqn = TQString::tqfromLatin1("@attr 1=1016 ") + svalue;
+ m_pqn = TQString::fromLatin1("@attr 1=1016 ") + svalue;
break;
case Raw:
m_pqn = m_value;
@@ -214,7 +214,7 @@ void Z3950Fetcher::search(FetchKey key_, const TQString& value_) {
stop();
return;
}
-// m_pqn = TQString::tqfromLatin1("@attr 1=7 0253333490");
+// m_pqn = TQString::fromLatin1("@attr 1=7 0253333490");
myLog() << "Z3950Fetcher::search() - PQN query = " << m_pqn << endl;
if(m_conn) {
@@ -256,7 +256,7 @@ bool Z3950Fetcher::initMARC21Handler() {
return true;
}
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("MARC21slim2MODS3.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("MARC21slim2MODS3.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "Z3950Fetcher::initHandlers() - can not locate MARC21slim2MODS3.xsl." << endl;
return false;
@@ -280,7 +280,7 @@ bool Z3950Fetcher::initUNIMARCHandler() {
return true;
}
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("UNIMARC2MODS3.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("UNIMARC2MODS3.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "Z3950Fetcher::initHandlers() - can not locate UNIMARC2MODS3.xsl." << endl;
return false;
@@ -304,7 +304,7 @@ bool Z3950Fetcher::initMODSHandler() {
return true;
}
- TQString xsltfile = locate("appdata", TQString::tqfromLatin1("mods2tellico.xsl"));
+ TQString xsltfile = locate("appdata", TQString::fromLatin1("mods2tellico.xsl"));
if(xsltfile.isEmpty()) {
kdWarning() << "Z3950Fetcher::initHandlers() - can not locate mods2tellico.xsl." << endl;
return false;
@@ -351,7 +351,7 @@ void Z3950Fetcher::handleResult(const TQString& result_) {
#if 0
kdWarning() << "Remove debug from z3950fetcher.cpp" << endl;
{
- TQFile f1(TQString::tqfromLatin1("/tmp/marc.xml"));
+ TQFile f1(TQString::fromLatin1("/tmp/marc.xml"));
if(f1.open(IO_WriteOnly)) {
// if(f1.open(IO_WriteOnly | IO_Append)) {
TQTextStream t(&f1);
@@ -385,7 +385,7 @@ void Z3950Fetcher::handleResult(const TQString& result_) {
#if 0
kdWarning() << "Remove debug from z3950fetcher.cpp" << endl;
{
- TQFile f2(TQString::tqfromLatin1("/tmp/mods.xml"));
+ TQFile f2(TQString::fromLatin1("/tmp/mods.xml"));
// if(f2.open(IO_WriteOnly)) {
if(f2.open(IO_WriteOnly | IO_Append)) {
TQTextStream t(&f2);
@@ -423,14 +423,14 @@ void Z3950Fetcher::handleResult(const TQString& result_) {
Data::EntryVec entries = coll->entries();
for(Data::EntryVec::Iterator entry = entries.begin(); entry != entries.end(); ++entry) {
- TQString desc = entry->field(TQString::tqfromLatin1("author")) + '/'
- + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ TQString desc = entry->field(TQString::fromLatin1("author")) + '/'
+ + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn")));
m_entries.insert(r->uid, entry);
emit signalResultFound(r);
}
@@ -480,20 +480,20 @@ void Z3950Fetcher::customEvent(TQCustomEvent* event_) {
void Z3950Fetcher::updateEntry(Data::EntryPtr entry_) {
// myDebug() << "Z3950Fetcher::updateEntry() - " << source() << ": " << entry_->title() << endl;
- TQString isbn = entry_->field(TQString::tqfromLatin1("isbn"));
+ TQString isbn = entry_->field(TQString::fromLatin1("isbn"));
if(!isbn.isEmpty()) {
search(Fetch::ISBN, isbn);
return;
}
- TQString lccn = entry_->field(TQString::tqfromLatin1("lccn"));
+ TQString lccn = entry_->field(TQString::fromLatin1("lccn"));
if(!lccn.isEmpty()) {
search(Fetch::LCCN, lccn);
return;
}
// optimistically try searching for title and rely on Collection::sameEntry() to figure things out
- TQString t = entry_->field(TQString::tqfromLatin1("title"));
+ TQString t = entry_->field(TQString::fromLatin1("title"));
if(!t.isEmpty()) {
search(Fetch::Title, t);
return;
@@ -541,7 +541,7 @@ Z3950Fetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const Z3950Fetcher*
m_portSpinBox = new KIntSpinBox(0, 999999, 1, Z3950_DEFAULT_PORT, 10, optionsWidget());
connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified()));
l->addWidget(m_portSpinBox, row, 1);
- w = i18n("Enter the port number of the server. The default is %1.").tqarg(Z3950_DEFAULT_PORT);
+ w = i18n("Enter the port number of the server. The default is %1.").arg(Z3950_DEFAULT_PORT);
TQWhatsThis::add(label, w);
TQWhatsThis::add(m_portSpinBox, w);
label->setBuddy(m_portSpinBox);
@@ -560,9 +560,9 @@ Z3950Fetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const Z3950Fetcher*
l->addWidget(label, ++row, 0);
m_charSetCombo = new KComboBox(true, optionsWidget());
m_charSetCombo->insertItem(TQString());
- m_charSetCombo->insertItem(TQString::tqfromLatin1("marc8"));
- m_charSetCombo->insertItem(TQString::tqfromLatin1("iso-8859-1"));
- m_charSetCombo->insertItem(TQString::tqfromLatin1("utf-8"));
+ m_charSetCombo->insertItem(TQString::fromLatin1("marc8"));
+ m_charSetCombo->insertItem(TQString::fromLatin1("iso-8859-1"));
+ m_charSetCombo->insertItem(TQString::fromLatin1("utf-8"));
connect(m_charSetCombo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotSetModified()));
l->addWidget(m_charSetCombo, row, 1);
w = i18n("Enter the character set encoding used by the z39.50 server. The most likely choice "
@@ -575,11 +575,11 @@ Z3950Fetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const Z3950Fetcher*
l->addWidget(label, ++row, 0);
m_syntaxCombo = new GUI::ComboBox(optionsWidget());
m_syntaxCombo->insertItem(i18n("Auto-detect"), TQString());
- m_syntaxCombo->insertItem(TQString::tqfromLatin1("MODS"), TQString::tqfromLatin1("mods"));
- m_syntaxCombo->insertItem(TQString::tqfromLatin1("MARC21"), TQString::tqfromLatin1("marc21"));
- m_syntaxCombo->insertItem(TQString::tqfromLatin1("UNIMARC"), TQString::tqfromLatin1("unimarc"));
- m_syntaxCombo->insertItem(TQString::tqfromLatin1("USMARC"), TQString::tqfromLatin1("usmarc"));
- m_syntaxCombo->insertItem(TQString::tqfromLatin1("GRS-1"), TQString::tqfromLatin1("grs-1"));
+ m_syntaxCombo->insertItem(TQString::fromLatin1("MODS"), TQString::fromLatin1("mods"));
+ m_syntaxCombo->insertItem(TQString::fromLatin1("MARC21"), TQString::fromLatin1("marc21"));
+ m_syntaxCombo->insertItem(TQString::fromLatin1("UNIMARC"), TQString::fromLatin1("unimarc"));
+ m_syntaxCombo->insertItem(TQString::fromLatin1("USMARC"), TQString::fromLatin1("usmarc"));
+ m_syntaxCombo->insertItem(TQString::fromLatin1("GRS-1"), TQString::fromLatin1("grs-1"));
connect(m_syntaxCombo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotSetModified()));
l->addWidget(m_syntaxCombo, row, 1);
w = i18n("Enter the data format used by the z39.50 server. Tellico will attempt to "
@@ -689,9 +689,9 @@ void Z3950Fetcher::ConfigWidget::saveConfig(KConfigGroup& config_) {
// static
Tellico::StringMap Z3950Fetcher::customFields() {
StringMap map;
- map[TQString::tqfromLatin1("address")] = i18n("Address");
- map[TQString::tqfromLatin1("abstract")] = i18n("Abstract");
- map[TQString::tqfromLatin1("illustrator")] = i18n("Illustrator");
+ map[TQString::fromLatin1("address")] = i18n("Address");
+ map[TQString::fromLatin1("abstract")] = i18n("Abstract");
+ map[TQString::fromLatin1("illustrator")] = i18n("Illustrator");
return map;
}
@@ -727,7 +727,7 @@ void Z3950Fetcher::ConfigWidget::loadPresets(const TQString& current_) {
KGlobal::locale()->splitLocale(lang, lang2A, dummy, dummy);
}
- TQString serverFile = locate("appdata", TQString::tqfromLatin1("z3950-servers.cfg"));
+ TQString serverFile = locate("appdata", TQString::fromLatin1("z3950-servers.cfg"));
if(serverFile.isEmpty()) {
kdWarning() << "Z3950Fetcher::loadPresets() - no z3950 servers file found" << endl;
return;
diff --git a/src/fetchdialog.cpp b/src/fetchdialog.cpp
index 11a719d..77f04d5 100644
--- a/src/fetchdialog.cpp
+++ b/src/fetchdialog.cpp
@@ -41,7 +41,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -112,19 +112,19 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
m_searchButton = new KPushButton(box1);
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP),
- SmallIconSet(TQString::tqfromLatin1("cancel"))));
+ SmallIconSet(TQString::fromLatin1("cancel"))));
connect(m_searchButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSearchClicked()));
TQWhatsThis::add(m_searchButton, i18n("Click to start or stop the search"));
// the search button's text changes from search to stop
// I don't want it resizing, so figure out the maximum size and set that
m_searchButton->polish();
- int maxWidth = m_searchButton->tqsizeHint().width();
- int maxHeight = m_searchButton->tqsizeHint().height();
+ int maxWidth = m_searchButton->sizeHint().width();
+ int maxHeight = m_searchButton->sizeHint().height();
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH),
- SmallIconSet(TQString::tqfromLatin1("find"))));
- maxWidth = TQMAX(maxWidth, m_searchButton->tqsizeHint().width());
- maxHeight = TQMAX(maxHeight, m_searchButton->tqsizeHint().height());
+ SmallIconSet(TQString::fromLatin1("find"))));
+ maxWidth = TQMAX(maxWidth, m_searchButton->sizeHint().width());
+ maxHeight = TQMAX(maxHeight, m_searchButton->sizeHint().height());
m_searchButton->setMinimumWidth(maxWidth);
m_searchButton->setMinimumHeight(maxHeight);
@@ -135,7 +135,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
TQWhatsThis::add(m_multipleISBN, i18n("Check this box to search for multiple ISBN or UPC values."));
connect(m_multipleISBN, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotMultipleISBN(bool)));
- m_editISBN = new KPushButton(KGuiItem(i18n("Edit List..."), TQString::tqfromLatin1("text_block")), box2);
+ m_editISBN = new KPushButton(KGuiItem(i18n("Edit List..."), TQString::fromLatin1("text_block")), box2);
m_editISBN->setEnabled(false);
TQWhatsThis::add(m_editISBN, i18n("Click to open a text edit box for entering or editing multiple ISBN values."));
connect(m_editISBN, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditMultipleISBN()));
@@ -181,7 +181,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
// don't bother creating funky gradient images for compact view
m_entryView->setUseGradientImages(false);
// set the xslt file AFTER setting the gradient image option
- m_entryView->setXSLTFile(TQString::tqfromLatin1("Compact.xsl"));
+ m_entryView->setXSLTFile(TQString::fromLatin1("Compact.xsl"));
TQWhatsThis::add(m_entryView->view(), i18n("An entry may be shown here before adding it to the "
"current collection by selecting it in the list above"));
@@ -195,7 +195,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
connect(m_addButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEntry()));
TQWhatsThis::add(m_addButton, i18n("Add the selected entry to the current collection"));
- m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::tqfromLatin1("find"))), box3);
+ m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::fromLatin1("find"))), box3);
m_moreButton->setEnabled(false);
connect(m_moreButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoreClicked()));
TQWhatsThis::add(m_moreButton, i18n("Fetch more results from the current data source"));
@@ -223,9 +223,9 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMoveProgress()));
setMinimumWidth(TQMAX(minimumWidth(), FETCH_MIN_WIDTH));
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
- resize(configDialogSize(TQString::tqfromLatin1("Fetch Dialog Options")));
+ resize(configDialogSize(TQString::fromLatin1("Fetch Dialog Options")));
KConfigGroup config(kapp->config(), "Fetch Dialog Options");
TQValueList splitList = config.readIntListEntry("Splitter Sizes");
@@ -235,8 +235,8 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
connect(Fetch::Manager::self(), TQT_SIGNAL(signalResultFound(Tellico::Fetch::SearchResult*)),
TQT_SLOT(slotResultFound(Tellico::Fetch::SearchResult*)));
- connect(Fetch::Manager::self(), TQT_SIGNAL(signaltqStatus(const TQString&)),
- TQT_SLOT(slottqStatus(const TQString&)));
+ connect(Fetch::Manager::self(), TQT_SIGNAL(signalStatus(const TQString&)),
+ TQT_SLOT(slotStatus(const TQString&)));
connect(Fetch::Manager::self(), TQT_SIGNAL(signalDone()),
TQT_SLOT(slotFetchDone()));
@@ -285,7 +285,7 @@ FetchDialog::~FetchDialog() {
// no additional entries to check images to keep though
Data::Document::self()->removeImagesNotInCollection(entriesToCheck, Data::EntryVec());
- saveDialogSize(TQString::tqfromLatin1("Fetch Dialog Options"));
+ saveDialogSize(TQString::fromLatin1("Fetch Dialog Options"));
KConfigGroup config(kapp->config(), "Fetch Dialog Options");
config.writeEntry("Splitter Sizes", static_cast(m_listView->parentWidget())->sizes());
@@ -296,7 +296,7 @@ FetchDialog::~FetchDialog() {
void FetchDialog::slotSearchClicked() {
m_valueLineEdit->selectAll();
if(m_started) {
- settqStatus(i18n("Cancelling the search..."));
+ setStatus(i18n("Cancelling the search..."));
Fetch::Manager::self()->stop();
slotFetchDone();
} else {
@@ -309,9 +309,9 @@ void FetchDialog::slotSearchClicked() {
m_oldSearch = value;
m_started = true;
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP),
- SmallIconSet(TQString::tqfromLatin1("cancel"))));
+ SmallIconSet(TQString::fromLatin1("cancel"))));
startProgress();
- settqStatus(i18n("Searching..."));
+ setStatus(i18n("Searching..."));
kapp->processEvents();
Fetch::Manager::self()->startSearch(m_sourceCombo->currentText(),
static_cast(m_keyCombo->currentData().toInt()),
@@ -331,31 +331,31 @@ void FetchDialog::slotClearClicked() {
m_moreButton->setEnabled(false);
m_isbnList.clear();
m_statusMessages.clear();
- settqStatus(i18n("Ready.")); // because slotFetchDone() writes text
+ setStatus(i18n("Ready.")); // because slotFetchDone() writes text
}
-void FetchDialog::slottqStatus(const TQString& status_) {
+void FetchDialog::slotStatus(const TQString& status_) {
m_statusMessages.push_back(status_);
// if the queue was empty, start the timer
if(m_statusMessages.count() == 1) {
// wait 2 seconds
- TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdatetqStatus()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdateStatus()));
}
}
-void FetchDialog::slotUpdatetqStatus() {
+void FetchDialog::slotUpdateStatus() {
if(m_statusMessages.isEmpty()) {
return;
}
- settqStatus(m_statusMessages.front());
+ setStatus(m_statusMessages.front());
m_statusMessages.pop_front();
if(!m_statusMessages.isEmpty()) {
// wait 2 seconds
- TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdatetqStatus()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdateStatus()));
}
}
-void FetchDialog::settqStatus(const TQString& text_) {
+void FetchDialog::setStatus(const TQString& text_) {
m_statusBar->changeItem(TQChar(' ') + text_, FETCH_STATUS_ID);
}
@@ -363,13 +363,13 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) {
// myDebug() << "FetchDialog::slotFetchDone()" << endl;
m_started = false;
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH),
- SmallIconSet(TQString::tqfromLatin1("find"))));
+ SmallIconSet(TQString::fromLatin1("find"))));
stopProgress();
if(m_resultCount == 0) {
- slottqStatus(i18n("The search returned no items."));
+ slotStatus(i18n("The search returned no items."));
} else {
/* TRANSLATORS: This is a plural form, you need to translate both lines (except "_n: ") */
- slottqStatus(i18n("The search returned 1 item.",
+ slotStatus(i18n("The search returned 1 item.",
"The search returned %n items.",
m_resultCount));
}
@@ -385,7 +385,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) {
if(m_collType & (Data::Collection::Book | Data::Collection::Bibtex) &&
m_multipleISBN->isChecked() &&
(key == Fetch::ISBN || key == Fetch::UPC)) {
- TQStringList values = TQStringList::split(TQString::tqfromLatin1("; "),
+ TQStringList values = TQStringList::split(TQString::fromLatin1("; "),
m_oldSearch.simplifyWhiteSpace());
for(TQStringList::Iterator it = values.begin(); it != values.end(); ++it) {
*it = ISBNValidator::cleanValue(*it);
@@ -393,7 +393,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) {
for(TQListViewItemIterator it(m_listView); it.current(); ++it) {
TQString i = ISBNValidator::cleanValue(static_cast(it.current())->m_result->isbn);
values.remove(i);
- if(i.length() > 10 && i.startsWith(TQString::tqfromLatin1("978"))) {
+ if(i.length() > 10 && i.startsWith(TQString::fromLatin1("978"))) {
values.remove(ISBNValidator::cleanValue(ISBNValidator::isbn10(i)));
}
}
@@ -407,7 +407,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) {
TQVBoxLayout* lay = new TQVBoxLayout(box, KDialog::marginHint(), KDialog::spacingHint()*2);
TQHBoxLayout* lay2 = new TQHBoxLayout(lay);
TQLabel* lab = new TQLabel(box);
- lab->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::tqfromLatin1("messagebox_info"),
+ lab->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::fromLatin1("messagebox_info"),
KIcon::NoGroup,
KIcon::SizeMedium));
lay2->addWidget(lab);
@@ -442,7 +442,7 @@ void FetchDialog::slotAddEntry() {
Fetch::SearchResult* r = item->m_result;
Data::EntryPtr entry = m_entries[r->uid];
if(!entry) {
- settqStatus(i18n("Fetching %1...").tqarg(r->title));
+ setStatus(i18n("Fetching %1...").arg(r->title));
startProgress();
entry = r->fetchEntry();
if(!entry) {
@@ -450,11 +450,11 @@ void FetchDialog::slotAddEntry() {
}
m_entries.insert(r->uid, entry);
stopProgress();
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
}
// add a copy, intentionally allowing multiple copies to be added
vec.append(new Data::Entry(*entry));
- item->setPixmap(0, UserIcon(TQString::tqfromLatin1("checkmark")));
+ item->setPixmap(0, UserIcon(TQString::fromLatin1("checkmark")));
}
if(!vec.isEmpty()) {
Kernel::self()->addEntries(vec, true);
@@ -469,9 +469,9 @@ void FetchDialog::slotMoreClicked() {
m_started = true;
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP),
- SmallIconSet(TQString::tqfromLatin1("cancel"))));
+ SmallIconSet(TQString::fromLatin1("cancel"))));
startProgress();
- settqStatus(i18n("Searching..."));
+ setStatus(i18n("Searching..."));
kapp->processEvents();
Fetch::Manager::self()->continueSearch();
}
@@ -494,7 +494,7 @@ void FetchDialog::slotShowEntry() {
SearchResultItem* item = static_cast(items.getFirst());
Fetch::SearchResult* r = item->m_result;
- settqStatus(i18n("Fetching %1...").tqarg(r->title));
+ setStatus(i18n("Fetching %1...").arg(r->title));
Data::EntryPtr entry = m_entries[r->uid];
if(!entry) {
GUI::CursorSaver cs;
@@ -505,7 +505,7 @@ void FetchDialog::slotShowEntry() {
}
stopProgress();
}
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
m_entryView->showEntry(entry);
}
@@ -603,7 +603,7 @@ void FetchDialog::slotEditMultipleISBN() {
m_isbnTextEdit = new KTextEdit(box, "isbn text edit");
m_isbnTextEdit->setText(m_isbnList.join(TQChar('\n')));
TQWhatsThis::add(m_isbnTextEdit, s);
- KPushButton* fromFileBtn = new KPushButton(SmallIconSet(TQString::tqfromLatin1("fileopen")),
+ KPushButton* fromFileBtn = new KPushButton(SmallIconSet(TQString::fromLatin1("fileopen")),
i18n("&Load From File..."), box);
TQWhatsThis::add(fromFileBtn, i18n("Load the list from a text file."));
connect(fromFileBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotLoadISBNList()));
@@ -630,7 +630,7 @@ void FetchDialog::slotEditMultipleISBN() {
while(m_isbnList.count() > 100) {
m_isbnList.pop_back();
}
- m_valueLineEdit->setText(m_isbnList.join(TQString::tqfromLatin1("; ")));
+ m_valueLineEdit->setText(m_isbnList.join(TQString::fromLatin1("; ")));
}
m_isbnTextEdit = 0; // gets auto-deleted
}
diff --git a/src/fetchdialog.h b/src/fetchdialog.h
index 40f77c8..65e602a 100644
--- a/src/fetchdialog.h
+++ b/src/fetchdialog.h
@@ -76,8 +76,8 @@ private slots:
void slotShowEntry();
void slotMoveProgress();
- void slottqStatus(const TQString& status);
- void slotUpdatetqStatus();
+ void slotStatus(const TQString& status);
+ void slotUpdateStatus();
void slotFetchDone(bool checkISBN = true);
void slotResultFound(Tellico::Fetch::SearchResult* result);
@@ -94,7 +94,7 @@ private slots:
private:
void startProgress();
void stopProgress();
- void settqStatus(const TQString& text);
+ void setStatus(const TQString& text);
void adjustColumnWidth();
void customEvent( TQCustomEvent *e );
diff --git a/src/fetcherconfigdialog.cpp b/src/fetcherconfigdialog.cpp
index 9d9b22a..45bf831 100644
--- a/src/fetcherconfigdialog.cpp
+++ b/src/fetcherconfigdialog.cpp
@@ -21,7 +21,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -58,7 +58,7 @@ FetcherConfigDialog::FetcherConfigDialog(const TQString& sourceName_, Fetch::Typ
void FetcherConfigDialog::init(Fetch::Type type_) {
setMinimumWidth(FETCHER_CONFIG_MIN_WIDTH);
- setHelp(TQString::tqfromLatin1("data-sources-options"));
+ setHelp(TQString::fromLatin1("data-sources-options"));
TQWidget* widget = new TQWidget(this);
TQBoxLayout* topLayout = new TQHBoxLayout(widget, KDialog::spacingHint());
@@ -66,7 +66,7 @@ void FetcherConfigDialog::init(Fetch::Type type_) {
TQBoxLayout* vlay1 = new TQVBoxLayout(topLayout, KDialog::spacingHint());
m_iconLabel = new TQLabel(widget);
if(type_ == Fetch::Unknown) {
- m_iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::tqfromLatin1("network"), KIcon::Panel, 64));
+ m_iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::fromLatin1("network"), KIcon::Panel, 64));
} else {
m_iconLabel->setPixmap(Fetch::Manager::self()->fetcherIcon(type_, KIcon::Panel, 64));
}
diff --git a/src/field.cpp b/src/field.cpp
index c260e9a..0e9b809 100644
--- a/src/field.cpp
+++ b/src/field.cpp
@@ -26,14 +26,14 @@
#include
namespace {
- static const TQRegExp comma_split = TQRegExp(TQString::tqfromLatin1("\\s*,\\s*"));
+ static const TQRegExp comma_split = TQRegExp(TQString::fromLatin1("\\s*,\\s*"));
}
using Tellico::Data::Field;
//these get overwritten, but are here since they're static
TQStringList Field::s_articlesApos;
-TQRegExp Field::s_delimiter = TQRegExp(TQString::tqfromLatin1("\\s*;\\s*"));
+TQRegExp Field::s_delimiter = TQRegExp(TQString::fromLatin1("\\s*;\\s*"));
// this constructor is for anything but Choice type
Field::Field(const TQString& name_, const TQString& title_, Type type_/*=Line*/)
@@ -54,15 +54,15 @@ Field::Field(const TQString& name_, const TQString& title_, Type type_/*=Line*/)
m_flags = AllowMultiple;
if(m_type == Table2) {
m_type = Table;
- setProperty(TQString::tqfromLatin1("columns"), TQChar('2'));
+ setProperty(TQString::fromLatin1("columns"), TQChar('2'));
} else {
- setProperty(TQString::tqfromLatin1("columns"), TQChar('1'));
+ setProperty(TQString::fromLatin1("columns"), TQChar('1'));
}
} else if(m_type == Date) { // hidden from user
m_formatFlag = FormatDate;
} else if(m_type == Rating) {
- setProperty(TQString::tqfromLatin1("minimum"), TQChar('1'));
- setProperty(TQString::tqfromLatin1("maximum"), TQChar('5'));
+ setProperty(TQString::fromLatin1("minimum"), TQChar('1'));
+ setProperty(TQString::fromLatin1("maximum"), TQChar('5'));
}
m_id = getID();
}
@@ -83,7 +83,7 @@ Field::Field(const Field& field_)
m_allowed = field_.allowed();
} else if(m_type == Table2) {
m_type = Table;
- setProperty(TQString::tqfromLatin1("columns"), TQChar('2'));
+ setProperty(TQString::fromLatin1("columns"), TQChar('2'));
}
m_id = getID();
}
@@ -101,7 +101,7 @@ Field& Field::operator=(const Field& field_) {
m_allowed = field_.allowed();
} else if(m_type == Table2) {
m_type = Table;
- setProperty(TQString::tqfromLatin1("columns"), TQChar('2'));
+ setProperty(TQString::fromLatin1("columns"), TQChar('2'));
}
m_flags = field_.flags();
m_formatFlag = field_.formatFlag();
@@ -129,10 +129,10 @@ void Field::setType(Field::Type type_) {
m_flags |= AllowMultiple;
if(m_type == Table2) {
m_type = Table;
- setProperty(TQString::tqfromLatin1("columns"), TQChar('2'));
+ setProperty(TQString::fromLatin1("columns"), TQChar('2'));
}
- if(property(TQString::tqfromLatin1("columns")).isEmpty()) {
- setProperty(TQString::tqfromLatin1("columns"), TQChar('1'));
+ if(property(TQString::fromLatin1("columns")).isEmpty()) {
+ setProperty(TQString::fromLatin1("columns"), TQChar('1'));
}
}
if(isSingleCategory()) {
@@ -167,12 +167,12 @@ void Field::setFormatFlag(FormatFlag flag_) {
}
const TQString& Field::defaultValue() const {
- return property(TQString::tqfromLatin1("default"));
+ return property(TQString::fromLatin1("default"));
}
void Field::setDefaultValue(const TQString& value_) {
if(m_type != Choice || m_allowed.findIndex(value_) > -1) {
- setProperty(TQString::tqfromLatin1("default"), value_);
+ setProperty(TQString::fromLatin1("default"), value_);
}
}
@@ -208,7 +208,7 @@ TQStringList Field::dependsOn() const {
return list;
}
- TQRegExp rx(TQString::tqfromLatin1("%\\{(.+)\\}"));
+ TQRegExp rx(TQString::fromLatin1("%\\{(.+)\\}"));
rx.setMinimal(true);
// do NOT call recursively!
for(int pos = m_desc.find(rx); pos > -1; pos = m_desc.find(rx, pos+3)) {
@@ -246,7 +246,7 @@ TQString Field::format(const TQString& value_, FormatFlag flag_) {
TQString Field::formatTitle(const TQString& title_) {
TQString newTitle = title_;
// special case for multi-column tables, assume user never has '::' in a value
- const TQString colonColon = TQString::tqfromLatin1("::");
+ const TQString colonColon = TQString::fromLatin1("::");
TQString tail;
if(newTitle.find(colonColon) > -1) {
tail = colonColon + newTitle.section(colonColon, 1);
@@ -265,11 +265,11 @@ TQString Field::formatTitle(const TQString& title_) {
// assume white space is already stripped
// the articles are already in lower-case
if(lower.startsWith(*it + TQChar(' '))) {
- TQRegExp regexp(TQChar('^') + TQRegExp::escape(*it) + TQString::tqfromLatin1("\\s*"), false);
+ TQRegExp regexp(TQChar('^') + TQRegExp::escape(*it) + TQString::fromLatin1("\\s*"), false);
// can't just use *it since it's in lower-case
TQString article = newTitle.left((*it).length());
newTitle = newTitle.replace(regexp, TQString())
- .append(TQString::tqfromLatin1(", "))
+ .append(TQString::fromLatin1(", "))
.append(article);
break;
}
@@ -277,15 +277,15 @@ TQString Field::formatTitle(const TQString& title_) {
}
// also, arbitrarily impose rule that a space must follow every comma
- newTitle.replace(comma_split, TQString::tqfromLatin1(", "));
+ newTitle.replace(comma_split, TQString::fromLatin1(", "));
return newTitle + tail;
}
TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
- static const TQRegExp spaceComma(TQString::tqfromLatin1("[\\s,]"));
- static const TQString colonColon = TQString::tqfromLatin1("::");
+ static const TQRegExp spaceComma(TQString::fromLatin1("[\\s,]"));
+ static const TQString colonColon = TQString::fromLatin1("::");
// the ending look-ahead is so that a space is not added at the end
- static const TQRegExp periodSpace(TQString::tqfromLatin1("\\.\\s*(?=.)"));
+ static const TQRegExp periodSpace(TQString::fromLatin1("\\.\\s*(?=.)"));
TQStringList entries;
if(multiple_) {
@@ -307,7 +307,7 @@ TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
tail = colonColon + name.section(colonColon, 1);
name = name.section(colonColon, 0, 0);
}
- name.replace(periodSpace, TQString::tqfromLatin1(". "));
+ name.replace(periodSpace, TQString::fromLatin1(". "));
if(Config::autoCapitalization()) {
name = capitalize(name);
}
@@ -320,7 +320,7 @@ TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
if(!Config::autoFormat() || (name.find(',') > -1 && Config::nameSuffixList().grep(lastWord).isEmpty())) {
// arbitrarily impose rule that no spaces before a comma and
// a single space after every comma
- name.replace(comma_split, TQString::tqfromLatin1(", "));
+ name.replace(comma_split, TQString::fromLatin1(", "));
names << name + tail;
continue;
}
@@ -354,7 +354,7 @@ TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
}
}
- return names.join(TQString::tqfromLatin1("; "));
+ return names.join(TQString::fromLatin1("; "));
}
TQString Field::formatDate(const TQString& date_) {
@@ -366,11 +366,11 @@ TQString Field::formatDate(const TQString& date_) {
// for empty month or date, use 1
TQStringList s = TQStringList::split('-', date_, true);
bool ok = true;
- int y = s.count() > 0 ? s[0].toInt(&ok) : TQDate::tqcurrentDate().year();
+ int y = s.count() > 0 ? s[0].toInt(&ok) : TQDate::currentDate().year();
if(ok) {
empty = false;
} else {
- y = TQDate::tqcurrentDate().year();
+ y = TQDate::currentDate().year();
}
int m = s.count() > 1 ? s[1].toInt(&ok) : 1;
if(ok) {
@@ -392,13 +392,13 @@ TQString Field::formatDate(const TQString& date_) {
TQString Field::capitalize(TQString str_) {
// regexp to split words
- static const TQRegExp rx(TQString::tqfromLatin1("[-\\s,.;]"));
+ static const TQRegExp rx(TQString::fromLatin1("[-\\s,.;]"));
if(str_.isEmpty()) {
return str_;
}
// first letter is always capitalized
- str_.replace(0, 1, str_.tqat(0).upper());
+ str_.replace(0, 1, str_.at(0).upper());
// special case for french words like l'espace
@@ -418,7 +418,7 @@ TQString Field::capitalize(TQString str_) {
for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) {
uint l = (*it).length();
- str_.replace(l, 1, str_.tqat(l).upper());
+ str_.replace(l, 1, str_.at(l).upper());
break;
}
}
@@ -435,7 +435,7 @@ TQString Field::capitalize(TQString str_) {
for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) {
uint l = (*it).length();
- str_.replace(pos+l+1, 1, str_.tqat(pos+l+1).upper());
+ str_.replace(pos+l+1, 1, str_.at(pos+l+1).upper());
aposMatch = true;
break;
}
@@ -444,7 +444,7 @@ TQString Field::capitalize(TQString str_) {
if(!aposMatch) {
wordRx.setPattern(TQChar('^') + TQRegExp::escape(word) + TQChar('$'));
if(notCap.grep(wordRx).isEmpty() && nextPos-pos > 1) {
- str_.replace(pos+1, 1, str_.tqat(pos+1).upper());
+ str_.replace(pos+1, 1, str_.at(pos+1).upper());
}
}
@@ -547,7 +547,7 @@ void Field::convertOldRating(Data::FieldPtr field_) {
}
if(field_->name() != Latin1Literal("rating")
- && field_->property(TQString::tqfromLatin1("rating")) != Latin1Literal("true")) {
+ && field_->property(TQString::fromLatin1("rating")) != Latin1Literal("true")) {
return; // nothing to do
}
@@ -568,9 +568,9 @@ void Field::convertOldRating(Data::FieldPtr field_) {
min = 1;
max = 5;
}
- field_->setProperty(TQString::tqfromLatin1("minimum"), TQString::number(min));
- field_->setProperty(TQString::tqfromLatin1("maximum"), TQString::number(max));
- field_->setProperty(TQString::tqfromLatin1("rating"), TQString());
+ field_->setProperty(TQString::fromLatin1("minimum"), TQString::number(min));
+ field_->setProperty(TQString::fromLatin1("maximum"), TQString::number(max));
+ field_->setProperty(TQString::fromLatin1("rating"), TQString());
field_->setType(Rating);
}
@@ -586,9 +586,9 @@ void Field::stripArticles(TQString& value) {
return;
}
for(TQStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it) {
- TQRegExp rx(TQString::tqfromLatin1("\\b") + *it + TQString::tqfromLatin1("\\b"));
+ TQRegExp rx(TQString::fromLatin1("\\b") + *it + TQString::fromLatin1("\\b"));
value.remove(rx);
}
value = value.stripWhiteSpace();
- value.remove(TQRegExp(TQString::tqfromLatin1(",$")));
+ value.remove(TQRegExp(TQString::fromLatin1(",$")));
}
diff --git a/src/filehandler.cpp b/src/filehandler.cpp
index 900257a..10c5405 100644
--- a/src/filehandler.cpp
+++ b/src/filehandler.cpp
@@ -65,7 +65,7 @@ FileHandler::FileRef::FileRef(const KURL& url_, bool quiet_, bool allowCompresse
myDebug() << s << endl;
}
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
}
return;
}
@@ -107,7 +107,7 @@ bool FileHandler::FileRef::open(bool quiet_) {
if(!quiet_) {
KURL u;
u.setPath(fileName());
- Kernel::self()->sorry(i18n(errorLoad).tqarg(u.fileName()));
+ Kernel::self()->sorry(i18n(errorLoad).arg(u.fileName()));
}
delete m_device;
m_device = 0;
@@ -151,12 +151,12 @@ TQDomDocument FileHandler::readXMLFile(const KURL& url_, bool processNamespace_,
}
if(!doc.setContent(f.file(), processNamespace_, &errorMsg, &errorLine, &errorColumn)) {
if(!quiet_) {
- TQString details = i18n("There is an XML parsing error in line %1, column %2.").tqarg(errorLine).tqarg(errorColumn);
- details += TQString::tqfromLatin1("\n");
+ TQString details = i18n("There is an XML parsing error in line %1, column %2.").arg(errorLine).arg(errorColumn);
+ details += TQString::fromLatin1("\n");
details += i18n("The error message from TQt is:");
- details += TQString::tqfromLatin1("\n\t") + errorMsg;
+ details += TQString::fromLatin1("\n\t") + errorMsg;
GUI::CursorSaver cs(TQt::arrowCursor);
- KMessageBox::detailedSorry(Kernel::self()->widget(), i18n(errorLoad).tqarg(url_.fileName()), details);
+ KMessageBox::detailedSorry(Kernel::self()->widget(), i18n(errorLoad).arg(url_.fileName()), details);
}
return TQDomDocument();
}
@@ -184,11 +184,11 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_,
tmpFile.setAutoDelete(true);
KIO::Job* job = KIO::file_copy(url_, tmpURL, -1, true /* overwrite */);
- job->addMetaData(TQString::tqfromLatin1("referrer"), referrer_.url());
+ job->addMetaData(TQString::fromLatin1("referrer"), referrer_.url());
if(!KIO::NetAccess::synchronousRun(job, Kernel::self()->widget())) {
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
}
return 0;
}
@@ -203,7 +203,7 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_)
Data::Image* img = new Data::Image(f.fileName());
if(img->isNull() && !quiet_) {
- TQString str = i18n("Tellico is unable to load the image - %1.").tqarg(url_.fileName());
+ TQString str = i18n("Tellico is unable to load the image - %1.").arg(url_.fileName());
Kernel::self()->sorry(str);
}
return img;
@@ -218,7 +218,7 @@ bool FileHandler::queryExists(const KURL& url_) {
if(url_ != Kernel::self()->URL()) {
GUI::CursorSaver cs(TQt::arrowCursor);
TQString str = i18n("A file named \"%1\" already exists. "
- "Are you sure you want to overwrite it?").tqarg(url_.fileName());
+ "Are you sure you want to overwrite it?").arg(url_.fileName());
int want_continue = KMessageBox::warningContinueCancel(Kernel::self()->widget(), str,
i18n("Overwrite File?"),
i18n("Overwrite"));
@@ -229,7 +229,7 @@ bool FileHandler::queryExists(const KURL& url_) {
}
KURL backup(url_);
- backup.setPath(backup.path() + TQString::tqfromLatin1("~"));
+ backup.setPath(backup.path() + TQString::fromLatin1("~"));
bool success = true;
if(url_.isLocalFile()) {
@@ -259,7 +259,7 @@ bool FileHandler::queryExists(const KURL& url_) {
false /* resume */, Kernel::self()->widget());
}
if(!success) {
- Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName() + '~'));
+ Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName() + '~'));
}
return success;
}
@@ -288,7 +288,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
KSaveFile f(url_.path());
if(f.status() != 0) {
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
}
return false;
}
@@ -307,7 +307,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
if(f.status() != 0) {
tempfile.unlink();
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
}
return false;
}
@@ -318,7 +318,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
if(!uploaded) {
tempfile.unlink();
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorUpload).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorUpload).arg(url_.fileName()));
}
success = false;
}
@@ -369,7 +369,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
KSaveFile f(url_.path());
if(f.status() != 0) {
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
}
return false;
}
@@ -387,7 +387,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
KSaveFile f(tempfile.name());
if(f.status() != 0) {
if(!quiet_) {
- Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
}
return false;
}
@@ -396,7 +396,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
if(success) {
success = KIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget());
if(!success && !quiet_) {
- Kernel::self()->sorry(i18n(errorUpload).tqarg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorUpload).arg(url_.fileName()));
}
}
tempfile.unlink();
diff --git a/src/filterdialog.cpp b/src/filterdialog.cpp
index 0754a44..fdf36d5 100644
--- a/src/filterdialog.cpp
+++ b/src/filterdialog.cpp
@@ -11,7 +11,7 @@
* *
***************************************************************************/
-// The tqlayout borrows heavily from kmsearchpatternedit.cpp in kmail
+// The layout borrows heavily from kmsearchpatternedit.cpp in kmail
// which is authored by Marc Mutz under the GPL
#include "filterdialog.h"
@@ -29,7 +29,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -86,7 +86,7 @@ void FilterRuleWidget::initWidget() {
m_ruleValue = new KLineEdit(this);
connect(m_ruleValue, TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(signalModified()));
- if(!KTrader::self()->query(TQString::tqfromLatin1("KRegExpEditor/KRegExpEditor")).isEmpty()) {
+ if(!KTrader::self()->query(TQString::fromLatin1("KRegExpEditor/KRegExpEditor")).isEmpty()) {
m_editRegExp = new KPushButton(i18n("Edit..."), this);
connect(m_editRegExp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRegExp()));
connect(m_ruleFunc, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotRuleFunctionChanged(int)));
@@ -109,11 +109,11 @@ void FilterRuleWidget::initWidget() {
void FilterRuleWidget::slotEditRegExp() {
if(m_editRegExpDialog == 0) {
- m_editRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery(TQString::tqfromLatin1("KRegExpEditor/KRegExpEditor"),
+ m_editRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery(TQString::fromLatin1("KRegExpEditor/KRegExpEditor"),
TQString(), TQT_TQOBJECT(this));
}
- KRegExpEditorInterface* iface = static_cast(m_editRegExpDialog->qt_cast(TQString::tqfromLatin1("KRegExpEditorInterface")));
+ KRegExpEditorInterface* iface = static_cast(m_editRegExpDialog->qt_cast(TQString::fromLatin1("KRegExpEditorInterface")));
if(iface) {
iface->setRegExp(m_ruleValue->text());
if(m_editRegExpDialog->exec() == TQDialog::Accepted) {
@@ -316,7 +316,7 @@ void FilterDialog::init() {
// only when creating a new filter can it be saved
if(m_mode == CreateFilter) {
- m_saveFilter = new KPushButton(SmallIconSet(TQString::tqfromLatin1("filter")), i18n("&Save Filter"), page);
+ m_saveFilter = new KPushButton(SmallIconSet(TQString::fromLatin1("filter")), i18n("&Save Filter"), page);
blay->addWidget(m_saveFilter);
m_saveFilter->setEnabled(false);
connect(m_saveFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotSaveFilter()));
@@ -326,7 +326,7 @@ void FilterDialog::init() {
actionButton(Help)->setDefault(false); // Help automatically becomes default when OK is disabled
actionButton(Cancel)->setDefault(true); // Help automatically becomes default when OK is disabled
setMinimumWidth(TQMAX(minimumWidth(), FILTER_MIN_WIDTH));
- setHelp(TQString::tqfromLatin1("filter-dialog"));
+ setHelp(TQString::fromLatin1("filter-dialog"));
}
Tellico::FilterPtr FilterDialog::currentFilter() {
@@ -391,7 +391,7 @@ void FilterDialog::slotClear() {
void FilterDialog::slotShrink() {
updateGeometry();
TQApplication::sendPostedEvents();
- resize(width(), tqsizeHint().height());
+ resize(width(), sizeHint().height());
}
void FilterDialog::slotFilterChanged() {
diff --git a/src/filteritem.cpp b/src/filteritem.cpp
index 655e889..9c57d3f 100644
--- a/src/filteritem.cpp
+++ b/src/filteritem.cpp
@@ -23,7 +23,7 @@ using Tellico::FilterItem;
FilterItem::FilterItem(GUI::ListView* parent_, Filter::Ptr filter_)
: GUI::CountedItem(parent_), m_filter(filter_) {
setText(0, filter_->name());
- setPixmap(0, SmallIcon(TQString::tqfromLatin1("filter")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("filter")));
}
void FilterItem::updateFilter(Filter::Ptr filter_) {
diff --git a/src/filterview.cpp b/src/filterview.cpp
index ac96699..57061a2 100644
--- a/src/filterview.cpp
+++ b/src/filterview.cpp
@@ -64,9 +64,9 @@ void FilterView::contextMenuRequested(TQListViewItem* item_, const TQPoint& poin
GUI::ListViewItem* item = static_cast(item_);
if(item->isFilterItem()) {
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("filter")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("filter")),
i18n("Modify Filter"), this, TQT_SLOT(slotModifyFilter()));
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("editdelete")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("editdelete")),
i18n("Delete Filter"), this, TQT_SLOT(slotDeleteFilter()));
menu.exec(point_);
}
@@ -95,7 +95,7 @@ void FilterView::addCollection(Data::CollPtr coll_) {
for(FilterVec::Iterator it = filters.begin(); it != filters.end(); ++it) {
addFilter(it);
}
- Data::FieldPtr f = coll_->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = coll_->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
@@ -122,7 +122,7 @@ void FilterView::modifyEntry(Data::EntryPtr entry_) {
for(TQListViewItem* item = firstChild(); item; item = item->nextSibling()) {
bool hasEntry = false;
TQListViewItem* entryItem = 0;
- // iterate over all tqchildren and find item with matching entry pointers
+ // iterate over all children and find item with matching entry pointers
for(TQListViewItem* i = item->firstChild(); i; i = i->nextSibling()) {
if(static_cast(i)->entry() == entry_) {
i->setText(0, entry_->title());
@@ -146,7 +146,7 @@ void FilterView::modifyEntry(Data::EntryPtr entry_) {
void FilterView::removeEntries(Data::EntryVec entries_) {
// the group modified signal gets handles separately, this is just for filters
for(TQListViewItem* item = firstChild(); item; item = item->nextSibling()) {
- // iterate over all tqchildren and delete items with matching entry pointers
+ // iterate over all children and delete items with matching entry pointers
TQListViewItem* c1 = item->firstChild();
while(c1) {
if(entries_.contains(static_cast(c1)->entry())) {
@@ -257,7 +257,7 @@ void FilterView::resetComparisons() {
if(!coll) {
return;
}
- Data::FieldPtr f = coll->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = coll->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
diff --git a/src/groupiterator.cpp b/src/groupiterator.cpp
index 209de52..ebfc5e7 100644
--- a/src/groupiterator.cpp
+++ b/src/groupiterator.cpp
@@ -17,7 +17,7 @@
using Tellico::GroupIterator;
GroupIterator::GroupIterator(const TQListView* view_) {
- // groups are the first tqchildren in the group view
+ // groups are the first children in the group view
m_item = static_cast(view_->firstChild());
}
diff --git a/src/groupview.cpp b/src/groupview.cpp
index a392eca..24e945c 100644
--- a/src/groupview.cpp
+++ b/src/groupview.cpp
@@ -57,8 +57,8 @@ GroupView::GroupView(TQWidget* parent_, const char* name_/*=0*/)
connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)),
TQT_SLOT(slotCollapsed(TQListViewItem*)));
- m_groupOpenPixmap = SmallIcon(TQString::tqfromLatin1("folder_open"));
- m_groupClosedPixmap = SmallIcon(TQString::tqfromLatin1("folder"));
+ m_groupOpenPixmap = SmallIcon(TQString::fromLatin1("folder_open"));
+ m_groupClosedPixmap = SmallIcon(TQString::fromLatin1("folder"));
}
Tellico::EntryGroupItem* GroupView::addGroup(Data::EntryGroup* group_) {
@@ -71,7 +71,7 @@ Tellico::EntryGroupItem* GroupView::addGroup(Data::EntryGroup* group_) {
}
EntryGroupItem* item = new EntryGroupItem(this, group_, type);
if(group_->groupName() == i18n(Data::Collection::s_emptyGroupTitle)) {
- item->setPixmap(0, SmallIcon(TQString::tqfromLatin1("folder_red")));
+ item->setPixmap(0, SmallIcon(TQString::fromLatin1("folder_red")));
item->setSortWeight(10);
} else {
item->setPixmap(0, m_groupClosedPixmap);
@@ -248,11 +248,11 @@ void GroupView::contextMenuRequested(TQListViewItem* item_, const TQPoint& point
KPopupMenu menu(this);
GUI::ListViewItem* item = static_cast(item_);
if(item->isEntryGroupItem()) {
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("2downarrow")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("2downarrow")),
i18n("Expand All Groups"), this, TQT_SLOT(slotExpandAll()));
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("2uparrow")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("2uparrow")),
i18n("Collapse All Groups"), this, TQT_SLOT(slotCollapseAll()));
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("filter")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("filter")),
i18n("Filter by Group"), this, TQT_SLOT(slotFilterGroup()));
} else if(item->isEntryItem()) {
Controller::self()->plugEntryActions(&menu);
@@ -264,7 +264,7 @@ void GroupView::slotCollapsed(TQListViewItem* item_) {
// only change icon for group items
if(static_cast(item_)->isEntryGroupItem()) {
if(item_->text(0) == i18n(Data::Collection::s_emptyGroupTitle)) {
- item_->setPixmap(0, SmallIcon(TQString::tqfromLatin1("folder_red")));
+ item_->setPixmap(0, SmallIcon(TQString::fromLatin1("folder_red")));
} else {
item_->setPixmap(0, m_groupClosedPixmap);
}
@@ -281,7 +281,7 @@ void GroupView::slotExpanded(TQListViewItem* item_) {
setUpdatesEnabled(false);
if(item->text(0) == i18n(Data::Collection::s_emptyGroupTitle)) {
- item->setPixmap(0, SmallIcon(TQString::tqfromLatin1("folder_red_open")));
+ item->setPixmap(0, SmallIcon(TQString::fromLatin1("folder_red_open")));
} else {
item->setPixmap(0, m_groupOpenPixmap);
}
@@ -316,11 +316,11 @@ void GroupView::addCollection(Data::CollPtr coll_) {
// when the coll gets set for the first time, the pixmaps need to be updated
if((m_coll->hasField(m_groupBy) && m_coll->fieldByName(m_groupBy)->formatFlag() == Data::Field::FormatName)
|| m_groupBy == Data::Collection::s_peopleGroupName) {
- m_groupOpenPixmap = UserIcon(TQString::tqfromLatin1("person-open"));
- m_groupClosedPixmap = UserIcon(TQString::tqfromLatin1("person"));
+ m_groupOpenPixmap = UserIcon(TQString::fromLatin1("person-open"));
+ m_groupClosedPixmap = UserIcon(TQString::fromLatin1("person"));
}
- Data::FieldPtr f = coll_->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = coll_->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
@@ -344,11 +344,11 @@ void GroupView::setGroupField(const TQString& groupField_) {
}
if((m_coll->hasField(groupField_) && m_coll->fieldByName(groupField_)->formatFlag() == Data::Field::FormatName)
|| groupField_ == Data::Collection::s_peopleGroupName) {
- m_groupOpenPixmap = UserIcon(TQString::tqfromLatin1("person-open"));
- m_groupClosedPixmap = UserIcon(TQString::tqfromLatin1("person"));
+ m_groupOpenPixmap = UserIcon(TQString::fromLatin1("person-open"));
+ m_groupClosedPixmap = UserIcon(TQString::fromLatin1("person"));
} else {
- m_groupOpenPixmap = SmallIcon(TQString::tqfromLatin1("folder_open"));
- m_groupClosedPixmap = SmallIcon(TQString::tqfromLatin1("folder"));
+ m_groupOpenPixmap = SmallIcon(TQString::fromLatin1("folder_open"));
+ m_groupClosedPixmap = SmallIcon(TQString::fromLatin1("folder"));
}
updateHeader();
populateCollection();
@@ -463,7 +463,7 @@ void GroupView::updateHeader(Data::FieldPtr field_/*=0*/) {
if(sortStyle() == ListView::SortByText) {
setColumnText(0, t);
} else {
- setColumnText(0, i18n("%1 (Sort by Count)").tqarg(t));
+ setColumnText(0, i18n("%1 (Sort by Count)").arg(t));
}
}
@@ -486,7 +486,7 @@ void GroupView::resetComparisons() {
if(!m_coll) {
return;
}
- Data::FieldPtr f = m_coll->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = m_coll->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
diff --git a/src/groupview.h b/src/groupview.h
index 78a1909..a340241 100644
--- a/src/groupview.h
+++ b/src/groupview.h
@@ -73,7 +73,7 @@ public:
*/
void addCollection(Data::CollPtr coll);
/**
- * Removes a root collection item, and all of its tqchildren.
+ * Removes a root collection item, and all of its children.
*
* @param coll A pointer to the collection
*/
diff --git a/src/gui/boolfieldwidget.cpp b/src/gui/boolfieldwidget.cpp
index a3a9649..cb8eff1 100644
--- a/src/gui/boolfieldwidget.cpp
+++ b/src/gui/boolfieldwidget.cpp
@@ -17,7 +17,7 @@
#include
#include
-#include
+#include
using Tellico::GUI::BoolFieldWidget;
@@ -31,7 +31,7 @@ BoolFieldWidget::BoolFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
TQString BoolFieldWidget::text() const {
if(m_checkBox->isChecked()) {
- return TQString::tqfromLatin1("true");
+ return TQString::fromLatin1("true");
}
return TQString();
diff --git a/src/gui/choicefieldwidget.cpp b/src/gui/choicefieldwidget.cpp
index 83e31f9..a8f0044 100644
--- a/src/gui/choicefieldwidget.cpp
+++ b/src/gui/choicefieldwidget.cpp
@@ -17,7 +17,7 @@
#include
#include
-#include
+#include
using Tellico::GUI::ChoiceFieldWidget;
diff --git a/src/gui/counteditem.cpp b/src/gui/counteditem.cpp
index 1be5bcd..536d08e 100644
--- a/src/gui/counteditem.cpp
+++ b/src/gui/counteditem.cpp
@@ -73,7 +73,7 @@ void CountedItem::paintCell(TQPainter* p_, const TQColorGroup& cg_,
}
TQFontMetrics fm = p_->fontMetrics();
- TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(count());
+ TQString numText = TQString::fromLatin1(" (%1)").arg(count());
// don't call CountedListViewItem::width() because that includes the count already
int w = ListViewItem::width(fm, listView(), column_);
int countWidth = fm.width(numText);
@@ -106,7 +106,7 @@ int CountedItem::width(const TQFontMetrics& fm_, const TQListView* lv_, int colu
// show count is only for first column
if(column_ == 0) {
- TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(count());
+ TQString numText = TQString::fromLatin1(" (%1)").arg(count());
w += fm_.width(numText) + 2; // add a little pad
}
return w;
diff --git a/src/gui/datewidget.cpp b/src/gui/datewidget.cpp
index c43ca26..31de509 100644
--- a/src/gui/datewidget.cpp
+++ b/src/gui/datewidget.cpp
@@ -27,14 +27,14 @@
#include
#include
-#include
+#include
using Tellico::GUI::SpinBox;
using Tellico::GUI::DateWidget;
SpinBox::SpinBox(int min, int max, TQWidget *parent) : TQSpinBox(min, max, 1, parent)
{
- editor()->tqsetAlignment(AlignRight);
+ editor()->setAlignment(AlignRight);
// I want to be able to omit the day
// an empty string just removes the special value, so set white space
setSpecialValueText(TQChar(' '));
@@ -71,7 +71,7 @@ DateWidget::DateWidget(TQWidget* parent_, const char* name_) : TQWidget(parent_,
connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDateChanged()));
m_dateButton = new KPushButton(this);
- m_dateButton->setIconSet(SmallIconSet(TQString::tqfromLatin1("date")));
+ m_dateButton->setIconSet(SmallIconSet(TQString::fromLatin1("date")));
connect(m_dateButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowPicker()));
l->addWidget(m_dateButton, 0);
@@ -221,7 +221,7 @@ void DateWidget::clear() {
m_daySpin->setValue(m_daySpin->minValue());
m_monthCombo->setCurrentItem(0);
m_yearSpin->setValue(m_yearSpin->minValue());
- m_picker->setDate(TQDate::tqcurrentDate());
+ m_picker->setDate(TQDate::currentDate());
m_daySpin->blockSignals(false);
m_monthCombo->blockSignals(false);
@@ -233,13 +233,13 @@ void DateWidget::slotShowPicker() {
TQRect desk = KGlobalSettings::desktopGeometry(this);
TQPoint popupPoint = mapToGlobal(TQPoint(0, 0));
- int dateFrameHeight = m_frame->tqsizeHint().height();
+ int dateFrameHeight = m_frame->sizeHint().height();
if(popupPoint.y() + height() + dateFrameHeight > desk.bottom()) {
popupPoint.setY(popupPoint.y() - dateFrameHeight);
} else {
popupPoint.setY(popupPoint.y() + height());
}
- int dateFrameWidth = m_frame->tqsizeHint().width();
+ int dateFrameWidth = m_frame->sizeHint().width();
if(popupPoint.x() + dateFrameWidth > desk.right()) {
popupPoint.setX(desk.right() - dateFrameWidth);
}
diff --git a/src/gui/fieldwidget.cpp b/src/gui/fieldwidget.cpp
index 3940fc4..653db95 100644
--- a/src/gui/fieldwidget.cpp
+++ b/src/gui/fieldwidget.cpp
@@ -28,7 +28,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -43,7 +43,7 @@ namespace {
using Tellico::GUI::FieldWidget;
-const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::tqfromLatin1("\\s*;\\s*"));
+const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::fromLatin1("\\s*;\\s*"));
FieldWidget* FieldWidget::create(Data::FieldPtr field_, TQWidget* parent_, const char* name_) {
switch (field_->type()) {
@@ -98,14 +98,14 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n
}
Data::Field::Type type = field_->type();
- TQString s = i18n("Edit Label", "%1:").tqarg(field_->title());
+ TQString s = i18n("Edit Label", "%1:").arg(field_->title());
if(type == Data::Field::URL) {
// set URL to null for now
m_label = new KURLLabel(TQString(), s, this);
} else {
m_label = new TQLabel(s, this);
}
- m_label->setFixedWidth(m_label->tqsizeHint().width());
+ m_label->setFixedWidth(m_label->sizeHint().width());
l->addWidget(m_label);
// expands indicates if the edit widget should expand to full width of widget
@@ -120,7 +120,7 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n
m_editMultiple = new TQCheckBox(this);
m_editMultiple->setChecked(true);
- m_editMultiple->setFixedWidth(m_editMultiple->tqsizeHint().width()); // don't let it have any extra space
+ m_editMultiple->setFixedWidth(m_editMultiple->sizeHint().width()); // don't let it have any extra space
connect(m_editMultiple, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setEnabled(bool)));
l->addWidget(m_editMultiple);
@@ -147,7 +147,7 @@ void FieldWidget::setEnabled(bool enabled_) {
}
int FieldWidget::labelWidth() const {
- return m_label->tqsizeHint().width();
+ return m_label->sizeHint().width();
}
void FieldWidget::setLabelWidth(int width_) {
@@ -182,7 +182,7 @@ void FieldWidget::registerWidget() {
setFocusProxy(w);
}
- TQHBoxLayout* l = static_cast(tqlayout());
+ TQHBoxLayout* l = static_cast(layout());
l->insertWidget(FIELD_EDIT_WIDGET_INDEX, w, m_expands ? 1 : 0 /*stretch*/);
if(!m_expands) {
l->insertStretch(FIELD_EDIT_WIDGET_INDEX+1, 1 /*stretch*/);
@@ -192,7 +192,7 @@ void FieldWidget::registerWidget() {
void FieldWidget::updateField(Data::FieldPtr oldField_, Data::FieldPtr newField_) {
m_field = newField_;
- m_label->setText(i18n("Edit Label", "%1:").tqarg(newField_->title()));
+ m_label->setText(i18n("Edit Label", "%1:").arg(newField_->title()));
updateGeometry();
TQWhatsThis::add(this, newField_->description());
updateFieldHook(oldField_, newField_);
diff --git a/src/gui/imagefieldwidget.cpp b/src/gui/imagefieldwidget.cpp
index 9acc732..77f67b9 100644
--- a/src/gui/imagefieldwidget.cpp
+++ b/src/gui/imagefieldwidget.cpp
@@ -22,7 +22,7 @@ ImageFieldWidget::ImageFieldWidget(Data::FieldPtr field_, TQWidget* parent_, con
: FieldWidget(field_, parent_, name_) {
m_widget = new ImageWidget(this);
- m_widget->setLinkOnlyChecked(field_->property(TQString::tqfromLatin1("link")) == Latin1Literal("true"));
+ m_widget->setLinkOnlyChecked(field_->property(TQString::fromLatin1("link")) == Latin1Literal("true"));
connect(m_widget, TQT_SIGNAL(signalModified()), TQT_SIGNAL(modified()));
registerWidget();
diff --git a/src/gui/imagewidget.cpp b/src/gui/imagewidget.cpp
index 69e0560..e4e3d57 100644
--- a/src/gui/imagewidget.cpp
+++ b/src/gui/imagewidget.cpp
@@ -25,7 +25,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -44,9 +44,9 @@ ImageWidget::ImageWidget(TQWidget* parent_, const char* name_) : TQWidget(parent
TQHBoxLayout* l = new TQHBoxLayout(this);
l->setMargin(IMAGE_WIDGET_BUTTON_MARGIN);
m_label = new TQLabel(this);
- m_label->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
+ m_label->setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
- m_label->tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ m_label->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
l->addWidget(m_label, 1);
l->addSpacing(IMAGE_WIDGET_BUTTON_MARGIN);
@@ -56,7 +56,7 @@ ImageWidget::ImageWidget(TQWidget* parent_, const char* name_) : TQWidget(parent
KButtonBox* box = new KButtonBox(this,Qt::Vertical);
box->addButton(i18n("Select Image..."), TQT_TQOBJECT(this), TQT_SLOT(slotGetImage()));
box->addButton(i18n("Clear"), TQT_TQOBJECT(this), TQT_SLOT(slotClear()));
- box->tqlayout();
+ box->layout();
boxLayout->addWidget(box);
boxLayout->addSpacing(8);
@@ -179,7 +179,7 @@ void ImageWidget::mousePressEvent(TQMouseEvent* event_) {
if(event_->button() == Qt::LeftButton) {
// Store the position of the mouse press.
// check if position is inside the label
- if(m_label->tqgeometry().contains(event_->pos())) {
+ if(m_label->geometry().contains(event_->pos())) {
m_dragStart = event_->pos();
} else {
m_dragStart = TQPoint();
@@ -214,7 +214,7 @@ void ImageWidget::dropEvent(TQDropEvent* event_) {
GUI::CursorSaver cs(TQt::busyCursor);
if(TQImageDrag::decode(event_, image)) {
// TQt reads PNG data by default
- const TQString& id = ImageFactory::addImage(image, TQString::tqfromLatin1("PNG"));
+ const TQString& id = ImageFactory::addImage(image, TQString::fromLatin1("PNG"));
if(!id.isEmpty() && id != m_imageID) {
setImage(id);
emit signalModified();
diff --git a/src/gui/kwidgetlister.cpp b/src/gui/kwidgetlister.cpp
index 8574d28..896955c 100644
--- a/src/gui/kwidgetlister.cpp
+++ b/src/gui/kwidgetlister.cpp
@@ -36,7 +36,7 @@
#include
#include
-#include
+#include
#include
#include
@@ -56,18 +56,18 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, TQWidget *parent,
mLayout->addWidget( mButtonBox );
mBtnMore = new KPushButton( i18n("more widgets","More"), mButtonBox );
- mBtnMore->setIconSet(SmallIconSet(TQString::tqfromLatin1("down")));
+ mBtnMore->setIconSet(SmallIconSet(TQString::fromLatin1("down")));
mButtonBox->setStretchFactor( mBtnMore, 0 );
mBtnFewer = new KPushButton( i18n("fewer widgets","Fewer"), mButtonBox );
- mBtnFewer->setIconSet(SmallIconSet(TQString::tqfromLatin1("up")));
+ mBtnFewer->setIconSet(SmallIconSet(TQString::fromLatin1("up")));
mButtonBox->setStretchFactor( mBtnFewer, 0 );
TQWidget *spacer = new TQWidget( mButtonBox );
mButtonBox->setStretchFactor( spacer, 1 );
mBtnClear = new KPushButton( i18n("clear widgets","Clear"), mButtonBox );
- mBtnClear->setIconSet(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")));
+ mBtnClear->setIconSet(SmallIconSet(TQString::fromLatin1("locationbar_erase")));
mButtonBox->setStretchFactor( mBtnClear, 0 );
//---------- connect everything
@@ -135,7 +135,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w)
void KWidgetLister::removeLastWidget()
{
- // The tqlayout will take care that the
+ // The layout will take care that the
// widget is removed from screen, too.
mWidgetList.removeLast();
enableControls();
diff --git a/src/gui/kwidgetlister.h b/src/gui/kwidgetlister.h
index 0124b65..262500c 100644
--- a/src/gui/kwidgetlister.h
+++ b/src/gui/kwidgetlister.h
@@ -71,19 +71,19 @@ protected slots:
/** Called whenever the user clicks on the 'more' button.
Reimplementations should call this method, because this
implementation does all the dirty work with adding the widgets
- to the tqlayout (through @ref addWidgetAtEnd) and enabling/disabling
+ to the layout (through @ref addWidgetAtEnd) and enabling/disabling
the control buttons. */
virtual void slotMore();
/** Called whenever the user clicks on the 'fewer' button.
Reimplementations should call this method, because this
implementation does all the dirty work with removing the widgets
- from the tqlayout (through @ref removelastWidget) and
+ from the layout (through @ref removelastWidget) and
enabling/disabling the control buttons. */
virtual void slotFewer();
/** Called whenever the user clicks on the 'clear' button.
Reimplementations should call this method, because this
implementation does all the dirty work with removing all but
- @ref mMinWidets widgets from the tqlayout and enabling/disabling
+ @ref mMinWidets widgets from the layout and enabling/disabling
the control buttons. */
virtual void slotClear();
diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp
index cca7f7d..1936795 100644
--- a/src/gui/lineedit.cpp
+++ b/src/gui/lineedit.cpp
@@ -34,25 +34,25 @@ LineEdit::LineEdit(TQWidget* parent_, const char* name_) : KLineEdit(parent_, na
void LineEdit::clear() {
KLineEdit::clear();
m_drawHint = true;
- tqrepaint();
+ repaint();
}
void LineEdit::setText(const TQString& text_) {
m_drawHint = text_.isEmpty();
- tqrepaint();
+ repaint();
KLineEdit::setText(text_);
}
void LineEdit::setHint(const TQString& hint_) {
m_hint = hint_;
m_drawHint = text().isEmpty();
- tqrepaint();
+ repaint();
}
void LineEdit::focusInEvent(TQFocusEvent* event_) {
if(m_drawHint) {
m_drawHint = false;
- tqrepaint();
+ repaint();
}
KLineEdit::focusInEvent(event_);
}
@@ -60,7 +60,7 @@ void LineEdit::focusInEvent(TQFocusEvent* event_) {
void LineEdit::focusOutEvent(TQFocusEvent* event_) {
if(text().isEmpty()) {
m_drawHint = true;
- tqrepaint();
+ repaint();
}
KLineEdit::focusOutEvent(event_);
}
diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp
index cce1ade..3f3da1d 100644
--- a/src/gui/linefieldwidget.cpp
+++ b/src/gui/linefieldwidget.cpp
@@ -47,7 +47,7 @@ LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
TQString LineFieldWidget::text() const {
TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.replace(s_semiColon, TQString::tqfromLatin1("; "));
+ text.replace(s_semiColon, TQString::fromLatin1("; "));
}
return text.stripWhiteSpace();
}
diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp
index f5595ea..4b8c250 100644
--- a/src/gui/listview.cpp
+++ b/src/gui/listview.cpp
@@ -147,14 +147,14 @@ int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem
void ListView::setShadeSortColumn(bool shade_) {
if(m_shadeSortColumn != shade_) {
m_shadeSortColumn = shade_;
- tqrepaint();
+ repaint();
}
}
#endif
void ListView::slotUpdateColors() {
#if !KDE_IS_VERSION(3,3,90)
- m_backColor2 = viewport()->tqcolorGroup().base();
+ m_backColor2 = viewport()->colorGroup().base();
if(m_backColor2 == TQt::black) {
m_backColor2 = TQColor(50, 50, 50); // dark gray
} else {
@@ -180,8 +180,8 @@ void ListView::slotUpdateColors() {
}
}
#endif
- Tellico::updateContrastColor(viewport()->tqcolorGroup());
- tqrepaint();
+ Tellico::updateContrastColor(viewport()->colorGroup());
+ repaint();
}
void ListView::slotSelectionChanged() {
@@ -196,7 +196,7 @@ void ListView::slotSelectionChanged() {
m_isClear = false;
Data::EntryVec entries;
- // now just find all the tqchildren or grandtqchildren that are entry items
+ // now just find all the children or grandchildren that are entry items
for(GUI::ListViewItemListIt it(m_selectedItems); it.current(); ++it) {
Data::EntryVec more = it.current()->entries();
for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) {
@@ -214,8 +214,8 @@ void ListView::slotDoubleClicked(TQListViewItem* item_) {
return;
}
- // if it has tqchildren, just open it
- // but some items delay tqchildren creation
+ // if it has children, just open it
+ // but some items delay children creation
if(static_cast(item_)->realChildCount() > 0) {
item_->setOpen(!item_->isOpen());
}
@@ -234,8 +234,8 @@ void ListView::drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy,
/* ****************** ListViewItem ********************* */
ListViewItem::~ListViewItem() {
- // I think there's a bug in qt where the tqchildren of this item are deleted after the item itself
- // as a result, there is no listView() pointer for the tqchildren, that obvious causes
+ // I think there's a bug in qt where the children of this item are deleted after the item itself
+ // as a result, there is no listView() pointer for the children, that obvious causes
// a problem with updating the selection. So we MUST call clear() here ourselves!
clear();
// be sure to remove from selected list when it's deleted
@@ -300,7 +300,7 @@ TQColor ListViewItem::backgroundColor(int column_) {
if(view->columns() > 1 && view->shadeSortColumn() && column_ == view->sortColumn()) {
return isAlternate() ? view->alternateBackground2() : view->background2();
}
- return isAlternate() ? view->alternateBackground() : view->viewport()->tqcolorGroup().base();
+ return isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base();
#endif
}
diff --git a/src/gui/listview.h b/src/gui/listview.h
index 3f1c485..d54eab6 100644
--- a/src/gui/listview.h
+++ b/src/gui/listview.h
@@ -161,8 +161,8 @@ public:
* @param alternate The alternate row color can be forced
*/
virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!!
- virtual void paintCell(TQPainter* painter, const TQColorGroup& tqcolorGroup,
- int column, int width, int tqalignment);
+ virtual void paintCell(TQPainter* painter, const TQColorGroup& colorGroup,
+ int column, int width, int alignment);
ListView* listView () const { return static_cast(KListViewItem::listView()); }
diff --git a/src/gui/numberfieldwidget.cpp b/src/gui/numberfieldwidget.cpp
index f2cdaa8..c016bc6 100644
--- a/src/gui/numberfieldwidget.cpp
+++ b/src/gui/numberfieldwidget.cpp
@@ -17,7 +17,7 @@
#include
-#include
+#include
#include
using Tellico::GUI::NumberFieldWidget;
@@ -41,7 +41,7 @@ void NumberFieldWidget::initLineEdit() {
// regexp is any number of digits followed optionally by any number of
// groups of a semi-colon followed optionally by a space, followed by digits
- TQRegExp rx(TQString::tqfromLatin1("-?\\d*(; ?-?\\d*)*"));
+ TQRegExp rx(TQString::fromLatin1("-?\\d*(; ?-?\\d*)*"));
m_lineEdit->setValidator(new TQRegExpValidator(rx, TQT_TQOBJECT(this)));
}
@@ -67,7 +67,7 @@ TQString NumberFieldWidget::text() const {
TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.replace(s_semiColon, TQString::tqfromLatin1("; "));
+ text.replace(s_semiColon, TQString::fromLatin1("; "));
}
return text.simplifyWhiteSpace();
}
@@ -116,19 +116,19 @@ void NumberFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_
TQString value = text();
if(wasLineEdit && !nowLineEdit) {
- tqlayout()->remove(m_lineEdit);
+ layout()->remove(m_lineEdit);
delete m_lineEdit;
m_lineEdit = 0;
initSpinBox();
} else if(!wasLineEdit && nowLineEdit) {
- tqlayout()->remove(m_spinBox);
+ layout()->remove(m_spinBox);
delete m_spinBox;
m_spinBox = 0;
initLineEdit();
}
// should really be FIELD_EDIT_WIDGET_INDEX from fieldwidget.cpp
- static_cast(tqlayout())->insertWidget(2, widget(), 1 /*stretch*/);
+ static_cast(layout())->insertWidget(2, widget(), 1 /*stretch*/);
widget()->show();
setText(value);
}
diff --git a/src/gui/overlaywidget.cpp b/src/gui/overlaywidget.cpp
index fd5c02b..7116ba2 100644
--- a/src/gui/overlaywidget.cpp
+++ b/src/gui/overlaywidget.cpp
@@ -13,7 +13,7 @@
#include "overlaywidget.h"
-#include
+#include
using Tellico::GUI::OverlayWidget;
@@ -34,7 +34,7 @@ void OverlayWidget::setCorner(Corner corner_) {
}
void OverlayWidget::addWidget(TQWidget* widget_) {
- tqlayout()->add(widget_);
+ layout()->add(widget_);
adjustSize();
}
@@ -70,9 +70,9 @@ void OverlayWidget::reposition() {
}
// Position in the toplevelwidget's coordinates
- TQPoint pTopLevel = m_anchor->mapTo(tqtopLevelWidget(), p);
+ TQPoint pTopLevel = m_anchor->mapTo(topLevelWidget(), p);
// Position in the widget's parentWidget coordinates
- TQPoint pParent = parentWidget()->mapFrom(tqtopLevelWidget(), pTopLevel);
+ TQPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel);
// keep it on the screen
if(pParent.x() < 0) {
pParent.rx() = 0;
diff --git a/src/gui/parafieldwidget.cpp b/src/gui/parafieldwidget.cpp
index 9aee35e..c03a28a 100644
--- a/src/gui/parafieldwidget.cpp
+++ b/src/gui/parafieldwidget.cpp
@@ -24,7 +24,7 @@ ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
m_textEdit = new KTextEdit(this);
m_textEdit->setTextFormat(TQt::PlainText);
- if(field_->property(TQString::tqfromLatin1("spellcheck")) != Latin1Literal("false")) {
+ if(field_->property(TQString::fromLatin1("spellcheck")) != Latin1Literal("false")) {
m_textEdit->setCheckSpellingEnabled(true);
}
connect(m_textEdit, TQT_SIGNAL(textChanged()), TQT_SIGNAL(modified()));
@@ -34,7 +34,7 @@ ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
TQString ParaFieldWidget::text() const {
TQString text = m_textEdit->text();
- text.replace('\n', TQString::tqfromLatin1("
"));
+ text.replace('\n', TQString::fromLatin1("
"));
return text;
}
@@ -42,7 +42,7 @@ void ParaFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_textEdit->blockSignals(true);
- TQRegExp rx(TQString::tqfromLatin1("
"), false /*case-sensitive*/);
+ TQRegExp rx(TQString::fromLatin1("
"), false /*case-sensitive*/);
TQString s = text_;
s.replace(rx, TQChar('\n'));
m_textEdit->setText(s);
diff --git a/src/gui/ratingwidget.cpp b/src/gui/ratingwidget.cpp
index ec5d717..a35c3fa 100644
--- a/src/gui/ratingwidget.cpp
+++ b/src/gui/ratingwidget.cpp
@@ -20,7 +20,7 @@
#include
#include
-#include
+#include
namespace {
static const int RATING_WIDGET_MAX_ICONS = 10; // same as in Field::ratingValues()
@@ -43,7 +43,7 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) {
return *pixmaps[n];
}
- TQString picName = TQString::tqfromLatin1("stars%1").tqarg(n);
+ TQString picName = TQString::fromLatin1("stars%1").arg(n);
TQPixmap* pix = new TQPixmap(UserIcon(picName));
pixmaps.insert(n, pix);
return *pix;
@@ -51,8 +51,8 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) {
RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char* name_/*=0*/)
: TQHBox(parent_, name_), m_field(field_), m_currIndex(-1) {
- m_pixOn = UserIcon(TQString::tqfromLatin1("star_on"));
- m_pixOff = UserIcon(TQString::tqfromLatin1("star_off"));
+ m_pixOn = UserIcon(TQString::fromLatin1("star_on"));
+ m_pixOff = UserIcon(TQString::fromLatin1("star_off"));
setSpacing(0);
// find maximum width and height
@@ -65,7 +65,7 @@ RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char*
}
init();
- TQBoxLayout* l = dynamic_cast(tqlayout());
+ TQBoxLayout* l = dynamic_cast(layout());
if(l) {
l->addStretch(1);
}
@@ -86,8 +86,8 @@ void RatingWidget::init() {
void RatingWidget::updateBounds() {
bool ok; // not used;
- m_min = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("minimum")), &ok);
- m_max = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("maximum")), &ok);
+ m_min = Tellico::toUInt(m_field->property(TQString::fromLatin1("minimum")), &ok);
+ m_max = Tellico::toUInt(m_field->property(TQString::fromLatin1("maximum")), &ok);
if(m_max > RATING_WIDGET_MAX_ICONS) {
myDebug() << "RatingWidget::updateBounds() - max is too high: " << m_max << endl;
m_max = RATING_WIDGET_MAX_ICONS;
@@ -116,7 +116,7 @@ void RatingWidget::mousePressEvent(TQMouseEvent* event_) {
}
int idx;
- TQWidget* child = tqchildAt(event_->pos());
+ TQWidget* child = childAt(event_->pos());
if(child) {
idx = m_widgets.findRef(static_cast(child));
// if the widget is clicked beyond the maximum value, clear it
diff --git a/src/gui/richtextlabel.cpp b/src/gui/richtextlabel.cpp
index 632f771..85a9dde 100644
--- a/src/gui/richtextlabel.cpp
+++ b/src/gui/richtextlabel.cpp
@@ -15,7 +15,7 @@
#include
-#include
+#include
using Tellico::GUI::RichTextLabel;
@@ -27,8 +27,8 @@ RichTextLabel::RichTextLabel(const TQString& text, TQWidget* parent) : TQTextEdi
init();
}
-TQSize RichTextLabel::tqsizeHint() const {
- return tqminimumSizeHint();
+TQSize RichTextLabel::sizeHint() const {
+ return minimumSizeHint();
}
void RichTextLabel::init() {
@@ -38,10 +38,10 @@ void RichTextLabel::init() {
setFrameShape(TQFrame::NoFrame);
viewport()->setMouseTracking(false);
- setPaper(tqcolorGroup().background());
+ setPaper(colorGroup().background());
- tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
- viewport()->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
+ viewport()->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
}
#include "richtextlabel.moc"
diff --git a/src/gui/richtextlabel.h b/src/gui/richtextlabel.h
index e8c4777..850f2d7 100644
--- a/src/gui/richtextlabel.h
+++ b/src/gui/richtextlabel.h
@@ -14,7 +14,7 @@
#ifndef TELLICO_GUI_RICHTEXTLABEL_H
#define TELLICO_GUI_RICHTEXTLABEL_H
-#include
+#include
namespace Tellico {
namespace GUI {
@@ -30,7 +30,7 @@ public:
RichTextLabel(TQWidget* parent);
RichTextLabel(const TQString& text, TQWidget* parent);
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
private:
void init();
diff --git a/src/gui/stringmapdialog.cpp b/src/gui/stringmapdialog.cpp
index fbd6f6a..62a12a3 100644
--- a/src/gui/stringmapdialog.cpp
+++ b/src/gui/stringmapdialog.cpp
@@ -19,7 +19,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -55,9 +55,9 @@ StringMapDialog::StringMapDialog(const TQMap& map_, TQWidget
KButtonBox* bb = new KButtonBox(box);
bb->addStretch();
TQPushButton* btn = bb->addButton(i18n("&Set"), TQT_TQOBJECT(this), TQT_SLOT(slotAdd()));
- btn->setIconSet(BarIcon(TQString::tqfromLatin1("filenew"), KIcon::SizeSmall));
+ btn->setIconSet(BarIcon(TQString::fromLatin1("filenew"), KIcon::SizeSmall));
btn = bb->addButton(i18n("&Delete"), TQT_TQOBJECT(this), TQT_SLOT(slotDelete()));
- btn->setIconSet(BarIcon(TQString::tqfromLatin1("editdelete"), KIcon::SizeSmall));
+ btn->setIconSet(BarIcon(TQString::fromLatin1("editdelete"), KIcon::SizeSmall));
l->addWidget(box);
l->addStretch(1);
diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp
index 449fbbb..81c9dba 100644
--- a/src/gui/tablefieldwidget.cpp
+++ b/src/gui/tablefieldwidget.cpp
@@ -34,7 +34,7 @@ TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, TQWidget* parent_, con
: FieldWidget(field_, parent_, name_), m_field(field_), m_row(-1), m_col(-1) {
bool ok;
- m_columns = Tellico::toUInt(field_->property(TQString::tqfromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(field_->property(TQString::fromLatin1("columns")), &ok);
if(!ok) {
m_columns = 1;
} else {
@@ -77,17 +77,17 @@ TQString TableFieldWidget::text() const {
for(int col = 0; col < m_table->numCols(); ++col) {
str = m_table->text(row, col).simplifyWhiteSpace();
if(str.isEmpty()) {
- cstack += TQString::tqfromLatin1("::");
+ cstack += TQString::fromLatin1("::");
} else {
- rowStr += cstack + str + TQString::tqfromLatin1("::");
+ rowStr += cstack + str + TQString::fromLatin1("::");
cstack.truncate(0);
}
}
if(rowStr.isEmpty()) {
- rstack += TQString::tqfromLatin1("; ");
+ rstack += TQString::fromLatin1("; ");
} else {
rowStr.truncate(rowStr.length()-2); // remove last semi-colon and space
- text += rstack + rowStr + TQString::tqfromLatin1("; ");
+ text += rstack + rowStr + TQString::fromLatin1("; ");
rstack.truncate(0);
}
}
@@ -123,7 +123,7 @@ void TableFieldWidget::setText(const TQString& text_) {
int row;
for(row = 0; row < static_cast(list.count()); ++row) {
for(int col = 0; col < m_table->numCols(); ++col) {
- m_table->setText(row, col, list[row].section(TQString::tqfromLatin1("::"), col, col));
+ m_table->setText(row, col, list[row].section(TQString::fromLatin1("::"), col, col));
}
m_table->showRow(row);
}
@@ -182,7 +182,7 @@ void TableFieldWidget::slotRenameColumn() {
name, &ok, this);
if(ok && !newName.isEmpty()) {
Data::FieldPtr newField = new Data::Field(*m_field);
- newField->setProperty(TQString::tqfromLatin1("column%1").tqarg(m_col+1), newName);
+ newField->setProperty(TQString::fromLatin1("column%1").arg(m_col+1), newName);
if(Kernel::self()->modifyField(newField)) {
m_field = newField;
labelColumns(m_field);
@@ -201,9 +201,9 @@ bool TableFieldWidget::emptyRow(int row_) const {
void TableFieldWidget::labelColumns(Data::FieldPtr field_) {
for(int i = 0; i < m_columns; ++i) {
- TQString s = field_->property(TQString::tqfromLatin1("column%1").tqarg(i+1));
+ TQString s = field_->property(TQString::fromLatin1("column%1").arg(i+1));
if(s.isEmpty()) {
- s = i18n("Column %1").tqarg(i+1);
+ s = i18n("Column %1").arg(i+1);
}
m_table->horizontalHeader()->setLabel(i, s);
}
@@ -211,7 +211,7 @@ void TableFieldWidget::labelColumns(Data::FieldPtr field_) {
void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) {
bool ok;
- m_columns = Tellico::toUInt(newField_->property(TQString::tqfromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(newField_->property(TQString::fromLatin1("columns")), &ok);
if(!ok) {
m_columns = 1;
} else {
@@ -238,7 +238,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
m_row = -1;
m_col = col;
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."),
this, TQT_SLOT(slotRenameColumn()));
menu.exec(ev->globalPos());
return true;
@@ -271,28 +271,28 @@ void TableFieldWidget::contextMenu(int row_, int col_, const TQPoint& p_) {
int id;
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("insrow")), i18n("Insert Row"),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("insrow")), i18n("Insert Row"),
this, TQT_SLOT(slotInsertRow()));
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("remrow")), i18n("Remove Row"),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("remrow")), i18n("Remove Row"),
this, TQT_SLOT(slotRemoveRow()));
- id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1uparrow")), i18n("Move Row Up"),
+ id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1uparrow")), i18n("Move Row Up"),
this, TQT_SLOT(slotMoveRowUp()));
if(m_row == 0) {
menu.setItemEnabled(id, false);
}
- id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1downarrow")), i18n("Move Row Down"),
+ id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1downarrow")), i18n("Move Row Down"),
this, TQT_SLOT(slotMoveRowDown()));
if(m_row == m_table->numRows()-1) {
menu.setItemEnabled(id, false);
}
menu.insertSeparator();
- id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."),
+ id = menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."),
this, TQT_SLOT(slotRenameColumn()));
if(m_col < 0 || m_col > m_columns-1) {
menu.setItemEnabled(id, false);
}
menu.insertSeparator();
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")), i18n("Clear Table"),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("locationbar_erase")), i18n("Clear Table"),
this, TQT_SLOT(clear()));
menu.exec(p_);
}
diff --git a/src/gui/urlfieldwidget.cpp b/src/gui/urlfieldwidget.cpp
index 0ecc37d..187f8bb 100644
--- a/src/gui/urlfieldwidget.cpp
+++ b/src/gui/urlfieldwidget.cpp
@@ -44,7 +44,7 @@ URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const c
registerWidget();
// special case, remember if it's a relative url
- m_isRelative = field_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = field_->property(TQString::fromLatin1("relative")) == Latin1Literal("true");
}
URLFieldWidget::~URLFieldWidget() {
@@ -80,7 +80,7 @@ void URLFieldWidget::clear() {
}
void URLFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) {
- m_isRelative = newField_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = newField_->property(TQString::fromLatin1("relative")) == Latin1Literal("true");
}
void URLFieldWidget::slotOpenURL(const TQString& url_) {
diff --git a/src/image.cpp b/src/image.cpp
index 88c134f..8cb6fa4 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -103,7 +103,7 @@ TQByteArray Image::byteArray(const TQImage& img_, const TQCString& outputFormat_
}
TQString Image::idClean(const TQString& id_) {
- static const TQRegExp rx('[' + TQRegExp::escape(TQString::tqfromLatin1("/@<>#\"&%?={}|^~[]'`\\:+")) + ']');
+ static const TQRegExp rx('[' + TQRegExp::escape(TQString::fromLatin1("/@<>#\"&%?={}|^~[]'`\\:+")) + ']');
TQString clean = id_;
return clean.remove(rx);
}
@@ -116,7 +116,7 @@ void Image::calculateID() {
// the id will eventually be used as a filename
if(!isNull()) {
KMD5 md5(byteArray());
- m_id = TQString::tqfromLatin1(md5.hexDigest()) + TQString::tqfromLatin1(".") + TQString::tqfromLatin1(m_format).lower();
+ m_id = TQString::fromLatin1(md5.hexDigest()) + TQString::fromLatin1(".") + TQString::fromLatin1(m_format).lower();
m_id = idClean(m_id);
}
}
diff --git a/src/imagefactory.cpp b/src/imagefactory.cpp
index 12b116d..c63fc18 100644
--- a/src/imagefactory.cpp
+++ b/src/imagefactory.cpp
@@ -67,7 +67,7 @@ TQString ImageFactory::tempDir() {
}
TQString ImageFactory::dataDir() {
- static const TQString dataDir = Tellico::saveLocation(TQString::tqfromLatin1("data/"));
+ static const TQString dataDir = Tellico::saveLocation(TQString::fromLatin1("data/"));
return dataDir;
}
@@ -510,12 +510,12 @@ void ImageFactory::createStyleImages(const StyleOptions& opt_) {
const TQColor& bgc1 = Tellico::blendColors(baseColor, highColor, 30);
const TQColor& bgc2 = Tellico::blendColors(baseColor, highColor, 50);
- const TQString bgname = TQString::tqfromLatin1("gradient_bg.png");
+ const TQString bgname = TQString::fromLatin1("gradient_bg.png");
TQImage bgImage = KImageEffect::gradient(TQSize(400, 1), bgc1, baseColor,
KImageEffect::PipeCrossGradient);
bgImage = KImageEffect::rotate(bgImage, KImageEffect::Rotate90);
- const TQString hdrname = TQString::tqfromLatin1("gradient_header.png");
+ const TQString hdrname = TQString::fromLatin1("gradient_header.png");
TQImage hdrImage = KImageEffect::unbalancedGradient(TQSize(1, 10), highColor, bgc2,
KImageEffect::VerticalGradient, 100, -100);
@@ -523,12 +523,12 @@ void ImageFactory::createStyleImages(const StyleOptions& opt_) {
// write the style images both to the tmp dir and the data dir
// doesn't really hurt and lets the user switch back and forth
ImageFactory::removeImage(bgname, true /*delete */);
- ImageFactory::addImageImpl(Data::Image::byteArray(bgImage, "PNG"), TQString::tqfromLatin1("PNG"), bgname);
+ ImageFactory::addImageImpl(Data::Image::byteArray(bgImage, "PNG"), TQString::fromLatin1("PNG"), bgname);
ImageFactory::writeCachedImage(bgname, DataDir, true /*force*/);
ImageFactory::writeCachedImage(bgname, TempDir, true /*force*/);
ImageFactory::removeImage(hdrname, true /*delete */);
- ImageFactory::addImageImpl(Data::Image::byteArray(hdrImage, "PNG"), TQString::tqfromLatin1("PNG"), hdrname);
+ ImageFactory::addImageImpl(Data::Image::byteArray(hdrImage, "PNG"), TQString::fromLatin1("PNG"), hdrname);
ImageFactory::writeCachedImage(hdrname, DataDir, true /*force*/);
ImageFactory::writeCachedImage(hdrname, TempDir, true /*force*/);
} else {
@@ -601,8 +601,8 @@ void ImageFactory::setLocalDirectory(const KURL& url_) {
} else {
s_localDir = url_.directory(false);
// could have already been set once
- if(!url_.fileName().contains(TQString::tqfromLatin1("_files"))) {
- s_localDir += url_.fileName().section('.', 0, 0) + TQString::tqfromLatin1("_files/");
+ if(!url_.fileName().contains(TQString::fromLatin1("_files"))) {
+ s_localDir += url_.fileName().section('.', 0, 0) + TQString::fromLatin1("_files/");
}
myLog() << "ImageFactory::setLocalDirectory() - local dir = " << s_localDir << endl;
}
diff --git a/src/importdialog.cpp b/src/importdialog.cpp
index 86f6c27..192b710 100644
--- a/src/importdialog.cpp
+++ b/src/importdialog.cpp
@@ -38,7 +38,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -96,7 +96,7 @@ ImportDialog::ImportDialog(Import::Format format_, const KURL::List& urls_, TQWi
setButtonOK(ok);
// want to grab default button action, too
- // since the importer might do something with widgets, don't just call it, do it after tqlayout is done
+ // since the importer might do something with widgets, don't just call it, do it after layout is done
TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateAction()));
}
@@ -160,7 +160,7 @@ Tellico::Import::Importer* ImportDialog::importer(Import::Format format_, const
CHECK_SIZE;
importer = new Import::XSLTImporter(firstURL);
{
- TQString xsltFile = locate("appdata", TQString::tqfromLatin1("mods2tellico.xsl"));
+ TQString xsltFile = locate("appdata", TQString::fromLatin1("mods2tellico.xsl"));
if(!xsltFile.isEmpty()) {
KURL u;
u.setPath(xsltFile);
@@ -318,18 +318,18 @@ Tellico::Import::FormatMap ImportDialog::formatMap() {
// I decided they were likely to be the same in any language
// transliteration is unlikely
Import::FormatMap map;
- map[Import::TellicoXML] = TQString::tqfromLatin1("Tellico");
- map[Import::Bibtex] = TQString::tqfromLatin1("Bibtex");
- map[Import::Bibtexml] = TQString::tqfromLatin1("Bibtexml");
-// map[Import::CSV] = TQString::tqfromLatin1("CSV");
- map[Import::MODS] = TQString::tqfromLatin1("MODS");
- map[Import::RIS] = TQString::tqfromLatin1("RIS");
- map[Import::GCfilms] = TQString::tqfromLatin1("GCstar");
- map[Import::AMC] = TQString::tqfromLatin1("AMC");
- map[Import::Griffith] = TQString::tqfromLatin1("Griffith");
- map[Import::PDF] = TQString::tqfromLatin1("PDF");
- map[Import::Referencer] = TQString::tqfromLatin1("Referencer");
- map[Import::Delicious ] = TQString::tqfromLatin1("Delicious Library");
+ map[Import::TellicoXML] = TQString::fromLatin1("Tellico");
+ map[Import::Bibtex] = TQString::fromLatin1("Bibtex");
+ map[Import::Bibtexml] = TQString::fromLatin1("Bibtexml");
+// map[Import::CSV] = TQString::fromLatin1("CSV");
+ map[Import::MODS] = TQString::fromLatin1("MODS");
+ map[Import::RIS] = TQString::fromLatin1("RIS");
+ map[Import::GCfilms] = TQString::fromLatin1("GCstar");
+ map[Import::AMC] = TQString::fromLatin1("AMC");
+ map[Import::Griffith] = TQString::fromLatin1("Griffith");
+ map[Import::PDF] = TQString::fromLatin1("PDF");
+ map[Import::Referencer] = TQString::fromLatin1("Referencer");
+ map[Import::Delicious ] = TQString::fromLatin1("Delicious Library");
return map;
}
@@ -343,11 +343,11 @@ TQString ImportDialog::startDir(Import::Format format_) {
if(format_ == Import::GCfilms) {
TQDir dir = TQDir::home();
// able to cd if exists and readable
- if(dir.cd(TQString::tqfromLatin1(".local/share/gcfilms/"))) {
+ if(dir.cd(TQString::fromLatin1(".local/share/gcfilms/"))) {
return dir.absPath();
}
}
- return TQString::tqfromLatin1(":import");
+ return TQString::fromLatin1(":import");
}
void ImportDialog::slotOk() {
diff --git a/src/isbnvalidator.cpp b/src/isbnvalidator.cpp
index 6f33c67..4832cdd 100644
--- a/src/isbnvalidator.cpp
+++ b/src/isbnvalidator.cpp
@@ -18,7 +18,7 @@ using Tellico::ISBNValidator;
//static
TQString ISBNValidator::isbn10(TQString isbn13) {
- if(!isbn13.startsWith(TQString::tqfromLatin1("978"))) {
+ if(!isbn13.startsWith(TQString::fromLatin1("978"))) {
myDebug() << "ISBNValidator::isbn10() - can't convert, must start with 978: " << isbn13 << endl;
return isbn13;
}
@@ -34,14 +34,14 @@ TQString ISBNValidator::isbn10(TQString isbn13) {
TQString ISBNValidator::isbn13(TQString isbn10) {
isbn10.remove('-');
- if(isbn10.startsWith(TQString::tqfromLatin1("978")) ||
- isbn10.startsWith(TQString::tqfromLatin1("979"))) {
+ if(isbn10.startsWith(TQString::fromLatin1("978")) ||
+ isbn10.startsWith(TQString::fromLatin1("979"))) {
return isbn10;
}
// remove checksum
isbn10.truncate(isbn10.length()-1);
// begins with 978
- isbn10.prepend(TQString::tqfromLatin1("978"));
+ isbn10.prepend(TQString::fromLatin1("978"));
// add new checksum
isbn10 += checkSum13(isbn10);
staticFixup(isbn10);
@@ -49,7 +49,7 @@ TQString ISBNValidator::isbn13(TQString isbn10) {
}
TQString ISBNValidator::cleanValue(TQString isbn) {
- isbn.remove(TQRegExp(TQString::tqfromLatin1("[^xX0123456789]")));
+ isbn.remove(TQRegExp(TQString::fromLatin1("[^xX0123456789]")));
return isbn;
}
@@ -58,8 +58,8 @@ ISBNValidator::ISBNValidator(TQObject* parent_, const char* name_/*=0*/)
}
TQValidator::State ISBNValidator::validate(TQString& input_, int& pos_) const {
- if(input_.startsWith(TQString::tqfromLatin1("978")) ||
- input_.startsWith(TQString::tqfromLatin1("979"))) {
+ if(input_.startsWith(TQString::fromLatin1("978")) ||
+ input_.startsWith(TQString::fromLatin1("979"))) {
return validate13(input_, pos_);
} else {
return validate10(input_, pos_);
@@ -71,9 +71,9 @@ void ISBNValidator::fixup(TQString& input_) const {
}
void ISBNValidator::staticFixup(TQString& input_) {
- if((input_.startsWith(TQString::tqfromLatin1("978"))
- || input_.startsWith(TQString::tqfromLatin1("979")))
- && input_.contains(TQRegExp(TQString::tqfromLatin1("\\d"))) > 10) {
+ if((input_.startsWith(TQString::fromLatin1("978"))
+ || input_.startsWith(TQString::fromLatin1("979")))
+ && input_.contains(TQRegExp(TQString::fromLatin1("\\d"))) > 10) {
return fixup13(input_);
}
return fixup10(input_);
@@ -84,7 +84,7 @@ TQValidator::State ISBNValidator::validate10(TQString& input_, int& pos_) const
// A perfect ISBN has 9 digits plus either an 'X' or another digit
// A perfect ISBN may have 2 or 3 hyphens
// The final digit or 'X' is the correct check sum
- static const TQRegExp isbn(TQString::tqfromLatin1("(\\d-?){9,11}-[\\dX]"));
+ static const TQRegExp isbn(TQString::fromLatin1("(\\d-?){9,11}-[\\dX]"));
uint len = input_.length();
/*
// Don't do this since the hyphens may be in the wrong place, can't put that in a regexp
@@ -113,7 +113,7 @@ TQValidator::State ISBNValidator::validate10(TQString& input_, int& pos_) const
// fix the case where the user attempts to delete the checksum; the
// solution is to delete the last digit as well
- static const TQRegExp digit(TQString::tqfromLatin1("\\d"));
+ static const TQRegExp digit(TQString::fromLatin1("\\d"));
if(atEnd && input_.contains(digit) == 9 && input_[len-1] == '-') {
input_.truncate(len-2);
pos_ -= 2;
@@ -139,7 +139,7 @@ TQValidator::State ISBNValidator::validate13(TQString& input_, int& pos_) const
// A perfect ISBN13 has 13 digits
// A perfect ISBN13 may have 3 or 4 hyphens
// The final digit is the correct check sum
- static const TQRegExp isbn(TQString::tqfromLatin1("(\\d-?){13,17}"));
+ static const TQRegExp isbn(TQString::fromLatin1("(\\d-?){13,17}"));
uint len = input_.length();
const uint countX = input_.contains('X', false);
@@ -166,7 +166,7 @@ TQValidator::State ISBNValidator::validate13(TQString& input_, int& pos_) const
// fix the case where the user attempts to delete the checksum; the
// solution is to delete the last digit as well
- static const TQRegExp digit(TQString::tqfromLatin1("\\d"));
+ static const TQRegExp digit(TQString::fromLatin1("\\d"));
const uint countN = input_.contains(digit);
if(atEnd && (countN == 12 || countN == 9) && input_[len-1] == '-') {
input_.truncate(len-2);
@@ -199,10 +199,10 @@ void ISBNValidator::fixup10(TQString& input_) {
}
//replace "x" with "X"
- input_.replace('x', TQString::tqfromLatin1("X"));
+ input_.replace('x', TQString::fromLatin1("X"));
// remove invalid chars
- static const TQRegExp badChars(TQString::tqfromLatin1("[^\\d-X]"));
+ static const TQRegExp badChars(TQString::fromLatin1("[^\\d-X]"));
input_.remove(badChars);
// special case for EAN values that start with 978 or 979. That's the case
@@ -214,8 +214,8 @@ void ISBNValidator::fixup10(TQString& input_) {
// I consider the likelihood that someone wants to input an EAN to be higher than someone
// using a Nigerian ISBN and not noticing that the checksum gets added automatically.
if(input_.length() > 12
- && (input_.startsWith(TQString::tqfromLatin1("978"))
- || input_.startsWith(TQString::tqfromLatin1("979")))) {
+ && (input_.startsWith(TQString::fromLatin1("978"))
+ || input_.startsWith(TQString::fromLatin1("979")))) {
// Strip the first 4 characters (the invalid publisher)
input_ = input_.right(input_.length() - 3);
}
@@ -251,8 +251,8 @@ void ISBNValidator::fixup10(TQString& input_) {
// If we can find it, add the checksum
// but only if not started with 978 or 979
if(input_.length() > 8
- && !input_.startsWith(TQString::tqfromLatin1("978"))
- && !input_.startsWith(TQString::tqfromLatin1("979"))) {
+ && !input_.startsWith(TQString::fromLatin1("978"))
+ && !input_.startsWith(TQString::fromLatin1("979"))) {
input_[9] = checkSum10(input_);
}
@@ -293,7 +293,7 @@ void ISBNValidator::fixup13(TQString& input_) {
}
// remove invalid chars
- static const TQRegExp badChars(TQString::tqfromLatin1("[^\\d-]"));
+ static const TQRegExp badChars(TQString::fromLatin1("[^\\d-]"));
input_.remove(badChars);
// hyphen placement for some languages publishers is well-defined
diff --git a/src/latin1literal.h b/src/latin1literal.h
index 72bc880..1cebfe7 100644
--- a/src/latin1literal.h
+++ b/src/latin1literal.h
@@ -53,7 +53,7 @@ public:
inline
bool operator==(const TQString& s1, const Tellico::Latin1LiteralInternal& s2) {
- const TQChar* uc = s1.tqunicode();
+ const TQChar* uc = s1.unicode();
const char* c = s2.str;
if(!c || !uc) {
return (!c && !uc);
@@ -65,7 +65,7 @@ bool operator==(const TQString& s1, const Tellico::Latin1LiteralInternal& s2) {
}
for(size_t i = 0; i < l; ++i, ++uc, ++c) {
- if(uc->tqunicode() != static_cast(*c)) {
+ if(uc->unicode() != static_cast(*c)) {
return false;
}
}
diff --git a/src/lccnvalidator.cpp b/src/lccnvalidator.cpp
index bde2427..cf0e850 100644
--- a/src/lccnvalidator.cpp
+++ b/src/lccnvalidator.cpp
@@ -17,7 +17,7 @@
using Tellico::LCCNValidator;
LCCNValidator::LCCNValidator(TQObject* parent_) : TQRegExpValidator(parent_) {
- TQRegExp rx(TQString::tqfromLatin1("[a-z ]{0,3}"
+ TQRegExp rx(TQString::fromLatin1("[a-z ]{0,3}"
"("
"\\d{2}-?\\d{1,6}"
"|"
@@ -54,7 +54,7 @@ TQString LCCNValidator::formalize(const TQString& value_) {
// or from any year after 2100. Reasonable, right?
// so if the string starts with '20' we take the first 4 digits as the year
// otherwise the first 2
- if(afterAlpha.startsWith(TQString::tqfromLatin1("20"))) {
+ if(afterAlpha.startsWith(TQString::fromLatin1("20"))) {
year = afterAlpha.left(4);
serial = afterAlpha.mid(4);
} else {
diff --git a/src/listviewcomparison.cpp b/src/listviewcomparison.cpp
index e15b1d8..b78de94 100644
--- a/src/listviewcomparison.cpp
+++ b/src/listviewcomparison.cpp
@@ -51,7 +51,7 @@ Tellico::ListViewComparison* Tellico::ListViewComparison::create(Data::ConstFiel
} else if(field_->formatFlag() == Data::Field::FormatTitle) {
// Dependent could be title, so put this test after
return new TitleComparison(field_);
- } else if(field_->property(TQString::tqfromLatin1("lcc")) == Latin1Literal("true") ||
+ } else if(field_->property(TQString::fromLatin1("lcc")) == Latin1Literal("true") ||
(field_->name() == Latin1Literal("lcc") &&
Data::Document::self()->collection() &&
(Data::Document::self()->collection()->type() == Data::Collection::Book ||
@@ -119,15 +119,15 @@ int Tellico::NumberComparison::compare(const TQString& str1_, const TQString& st
// http://www.mcgees.org/2001/08/08/sort-by-library-of-congress-call-number-in-perl/
Tellico::LCCComparison::LCCComparison(Data::ConstFieldPtr field) : StringComparison(field),
- m_regexp(TQString::tqfromLatin1("^([A-Z]+)(\\d+(?:\\.\\d+)?)\\.?([A-Z]*)(\\d*)\\.?([A-Z]*)(\\d*)(?: (\\d\\d\\d\\d))?")) {
+ m_regexp(TQString::fromLatin1("^([A-Z]+)(\\d+(?:\\.\\d+)?)\\.?([A-Z]*)(\\d*)\\.?([A-Z]*)(\\d*)(?: (\\d\\d\\d\\d))?")) {
}
int Tellico::LCCComparison::compare(const TQString& str1_, const TQString& str2_) {
// myDebug() << "LCCComparison::compare() - " << str1_ << " to " << str2_ << endl;
int pos1 = m_regexp.search(str1_);
- const TQStringList cap1 = m_regexp.tqcapturedTexts();
+ const TQStringList cap1 = m_regexp.capturedTexts();
int pos2 = m_regexp.search(str2_);
- const TQStringList cap2 = m_regexp.tqcapturedTexts();
+ const TQStringList cap2 = m_regexp.capturedTexts();
if(pos1 > -1 && pos2 > -1) {
int res = compareLCC(cap1, cap2);
// myLog() << "...result = " << res << endl;
@@ -142,11 +142,11 @@ int Tellico::LCCComparison::compareLCC(const TQStringList& cap1, const TQStringL
return (res = cap1[1].compare(cap2[1])) != 0 ? res :
(res = compareFloat(cap1[2], cap2[2])) != 0 ? res :
(res = cap1[3].compare(cap2[3])) != 0 ? res :
- (res = compareFloat(TQString::tqfromLatin1("0.") + cap1[4],
- TQString::tqfromLatin1("0.") + cap2[4])) != 0 ? res :
+ (res = compareFloat(TQString::fromLatin1("0.") + cap1[4],
+ TQString::fromLatin1("0.") + cap2[4])) != 0 ? res :
(res = cap1[5].compare(cap2[5])) != 0 ? res :
- (res = compareFloat(TQString::tqfromLatin1("0.") + cap1[6],
- TQString::tqfromLatin1("0.") + cap2[6])) != 0 ? res :
+ (res = compareFloat(TQString::fromLatin1("0.") + cap1[6],
+ TQString::fromLatin1("0.") + cap2[6])) != 0 ? res :
(res = compareFloat(cap1[7], cap2[7])) != 0 ? res : 0;
}
@@ -241,9 +241,9 @@ int Tellico::ISODateComparison::compare(const TQString& str1, const TQString& st
// and accounting for "current year - 1 - 1" default scheme
TQStringList dlist1 = TQStringList::split('-', str1, true);
bool ok = true;
- int y1 = dlist1.count() > 0 ? dlist1[0].toInt(&ok) : TQDate::tqcurrentDate().year();
+ int y1 = dlist1.count() > 0 ? dlist1[0].toInt(&ok) : TQDate::currentDate().year();
if(!ok) {
- y1 = TQDate::tqcurrentDate().year();
+ y1 = TQDate::currentDate().year();
}
int m1 = dlist1.count() > 1 ? dlist1[1].toInt(&ok) : 1;
if(!ok) {
@@ -256,9 +256,9 @@ int Tellico::ISODateComparison::compare(const TQString& str1, const TQString& st
TQDate date1(y1, m1, d1);
TQStringList dlist2 = TQStringList::split('-', str2, true);
- int y2 = dlist2.count() > 0 ? dlist2[0].toInt(&ok) : TQDate::tqcurrentDate().year();
+ int y2 = dlist2.count() > 0 ? dlist2[0].toInt(&ok) : TQDate::currentDate().year();
if(!ok) {
- y2 = TQDate::tqcurrentDate().year();
+ y2 = TQDate::currentDate().year();
}
int m2 = dlist2.count() > 1 ? dlist2[1].toInt(&ok) : 1;
if(!ok) {
diff --git a/src/loandialog.cpp b/src/loandialog.cpp
index ba7a16e..5a74a14 100644
--- a/src/loandialog.cpp
+++ b/src/loandialog.cpp
@@ -28,7 +28,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -69,23 +69,23 @@ void LoanDialog::init() {
TQHBox* hbox = new TQHBox(mainWidget);
hbox->setSpacing(KDialog::spacingHint());
TQLabel* pixLabel = new TQLabel(hbox);
- pixLabel->setPixmap(DesktopIcon(TQString::tqfromLatin1("tellico"), 64));
- pixLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignTop);
+ pixLabel->setPixmap(DesktopIcon(TQString::fromLatin1("tellico"), 64));
+ pixLabel->setAlignment(TQt::AlignAuto | TQt::AlignTop);
hbox->setStretchFactor(pixLabel, 0);
- TQString entryString = TQString::tqfromLatin1("");
+ TQString entryString = TQString::fromLatin1("");
if(m_mode == Add) {
entryString += i18n("The following items are being checked out:");
- entryString += TQString::tqfromLatin1("
");
+ entryString += TQString::fromLatin1("
");
for(Data::EntryVec::ConstIterator entry = m_entries.constBegin(); entry != m_entries.constEnd(); ++entry) {
- entryString += TQString::tqfromLatin1("- ") + entry->title() + TQString::tqfromLatin1("
");
+ entryString += TQString::fromLatin1("- ") + entry->title() + TQString::fromLatin1("
");
}
} else {
entryString += i18n("The following item is on-loan:");
- entryString += TQString::tqfromLatin1("");
- entryString += TQString::tqfromLatin1("- ") + m_loan->entry()->title() + TQString::tqfromLatin1("
");
+ entryString += TQString::fromLatin1("");
+ entryString += TQString::fromLatin1("- ") + m_loan->entry()->title() + TQString::fromLatin1("
");
}
- entryString += TQString::tqfromLatin1("
");
+ entryString += TQString::fromLatin1("");
GUI::RichTextLabel* entryLabel = new GUI::RichTextLabel(entryString, hbox);
hbox->setStretchFactor(entryLabel, 1);
@@ -102,7 +102,7 @@ void LoanDialog::init() {
connect(m_borrowerEdit, TQT_SIGNAL(textChanged(const TQString&)),
TQT_SLOT(slotBorrowerNameChanged(const TQString&)));
actionButton(Ok)->setEnabled(false); // disable until a name is entered
- KPushButton* pb = new KPushButton(SmallIconSet(TQString::tqfromLatin1("kaddressbook")), TQString(), hbox);
+ KPushButton* pb = new KPushButton(SmallIconSet(TQString::fromLatin1("kaddressbook")), TQString(), hbox);
connect(pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotGetBorrower()));
TQString whats = i18n("Enter the name of the person borrowing the items from you. "
"Clicking the button allows you to select from your address book.");
@@ -117,7 +117,7 @@ void LoanDialog::init() {
l = new TQLabel(i18n("&Loan date:"), mainWidget);
topLayout->addWidget(l, 2, 0);
m_loanDate = new GUI::DateWidget(mainWidget);
- m_loanDate->setDate(TQDate::tqcurrentDate());
+ m_loanDate->setDate(TQDate::currentDate());
l->setBuddy(m_loanDate);
topLayout->addWidget(m_loanDate, 2, 1);
whats = i18n("The check-out date is the date that you lent the items. By default, "
@@ -158,7 +158,7 @@ void LoanDialog::init() {
"to your active calendar, which can be viewed using KOrganizer. "
"The box is only active if you set a due date."));
- resize(configDialogSize(TQString::tqfromLatin1("Loan Dialog Options")));
+ resize(configDialogSize(TQString::fromLatin1("Loan Dialog Options")));
KABC::AddressBook* abook = KABC::StdAddressBook::self(true);
connect(abook, TQT_SIGNAL(addressBookChanged(AddressBook*)),
@@ -169,7 +169,7 @@ void LoanDialog::init() {
}
LoanDialog::~LoanDialog() {
- saveDialogSize(TQString::tqfromLatin1("Loan Dialog Options"));
+ saveDialogSize(TQString::fromLatin1("Loan Dialog Options"));
}
void LoanDialog::slotBorrowerNameChanged(const TQString& str_) {
diff --git a/src/loanview.cpp b/src/loanview.cpp
index b2e4347..7f7d36d 100644
--- a/src/loanview.cpp
+++ b/src/loanview.cpp
@@ -70,9 +70,9 @@ void LoanView::contextMenuRequested(TQListViewItem* item_, const TQPoint& point_
GUI::ListViewItem* item = static_cast(item_);
if(item->isLoanItem()) {
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("2downarrow")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("2downarrow")),
i18n("Check-in"), this, TQT_SLOT(slotCheckIn()));
- menu.insertItem(SmallIconSet(TQString::tqfromLatin1("2downarrow")),
+ menu.insertItem(SmallIconSet(TQString::fromLatin1("2downarrow")),
i18n("Modify Loan..."), this, TQT_SLOT(slotModifyLoan()));
menu.exec(point_);
}
@@ -101,7 +101,7 @@ void LoanView::addCollection(Data::CollPtr coll_) {
for(Data::BorrowerVec::Iterator it = borrowers.begin(); it != borrowers.end(); ++it) {
addBorrower(it);
}
- Data::FieldPtr f = coll_->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = coll_->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
@@ -225,7 +225,7 @@ void LoanView::resetComparisons() {
if(!coll) {
return;
}
- Data::FieldPtr f = coll->fieldByName(TQString::tqfromLatin1("title"));
+ Data::FieldPtr f = coll->fieldByName(TQString::fromLatin1("title"));
if(f) {
setComparison(0, ListViewComparison::create(f));
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 377d9d2..6cd1df5 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -87,7 +87,7 @@
// the null string and bool are dummy arguments
#define MIME_ICON(s) \
- KMimeType::mimeType(TQString::tqfromLatin1(s))->icon(TQString(), false)
+ KMimeType::mimeType(TQString::fromLatin1(s))->icon(TQString(), false)
namespace {
static const int MAIN_WINDOW_MIN_WIDTH = 600;
@@ -126,7 +126,7 @@ MainWindow::MainWindow(TQWidget* parent_/*=0*/, const char* name_/*=0*/) : KMain
// has to be after controller init
Kernel::init(this); // the only time this is ever called!
- setIcon(DesktopIcon(TQString::tqfromLatin1("tellico")));
+ setIcon(DesktopIcon(TQString::fromLatin1("tellico")));
// initialize the status bar and progress bar
initStatusBar();
@@ -187,14 +187,14 @@ void MainWindow::initActions() {
KActionMenu* fileNewMenu = new KActionMenu(actionCollection(), "file_new_collection");
fileNewMenu->setText(i18n("New"));
-// fileNewMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("filenew"))); // doesn't work
- fileNewMenu->setIconSet(BarIcon(TQString::tqfromLatin1("filenew")));
+// fileNewMenu->setIconSet(BarIconSet(TQString::fromLatin1("filenew"))); // doesn't work
+ fileNewMenu->setIconSet(BarIcon(TQString::fromLatin1("filenew")));
fileNewMenu->setToolTip(i18n("Create a new collection"));
fileNewMenu->setDelayed(false);
KAction* action = new KAction(actionCollection(), "new_book_collection");
action->setText(i18n("New &Book Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("book")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("book")));
action->setToolTip(i18n("Create a new book collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -202,7 +202,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_bibtex_collection");
action->setText(i18n("New B&ibliography"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("bibtex")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("bibtex")));
action->setToolTip(i18n("Create a new bibtex bibliography"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -210,7 +210,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_comic_book_collection");
action->setText(i18n("New &Comic Book Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("comic")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("comic")));
action->setToolTip(i18n("Create a new comic book collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -218,7 +218,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_video_collection");
action->setText(i18n("New &Video Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("video")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("video")));
action->setToolTip(i18n("Create a new video collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -226,7 +226,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_music_collection");
action->setText(i18n("New &Music Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("album")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("album")));
action->setToolTip(i18n("Create a new music collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -234,7 +234,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_coin_collection");
action->setText(i18n("New C&oin Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("coin")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("coin")));
action->setToolTip(i18n("Create a new coin collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -242,7 +242,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_stamp_collection");
action->setText(i18n("New &Stamp Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("stamp")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("stamp")));
action->setToolTip(i18n("Create a new stamp collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -250,7 +250,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_card_collection");
action->setText(i18n("New C&ard Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("card")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("card")));
action->setToolTip(i18n("Create a new trading card collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -258,7 +258,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_wine_collection");
action->setText(i18n("New &Wine Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("wine")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("wine")));
action->setToolTip(i18n("Create a new wine collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -266,7 +266,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_game_collection");
action->setText(i18n("New &Game Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("game")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("game")));
action->setToolTip(i18n("Create a new game collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -274,7 +274,7 @@ void MainWindow::initActions() {
collectionMapper->setMapping(action, Data::Collection::Game);
action = new KAction(actionCollection(), "new_boardgame_collection");
action->setText(i18n("New Boa&rd Game Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("boardgame")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("boardgame")));
action->setToolTip(i18n("Create a new board game collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -282,7 +282,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_file_catalog");
action->setText(i18n("New &File Catalog"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("file")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("file")));
action->setToolTip(i18n("Create a new file catalog"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -290,7 +290,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "new_custom_collection");
action->setText(i18n("New C&ustom Collection"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("filenew")));
+ action->setIconSet(UserIconSet(TQString::fromLatin1("filenew")));
action->setToolTip(i18n("Create a new custom collection"));
fileNewMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
@@ -320,14 +320,14 @@ void MainWindow::initActions() {
KActionMenu* importMenu = new KActionMenu(actionCollection(), "file_import");
importMenu->setText(i18n("&Import"));
- importMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileimport")));
+ importMenu->setIconSet(BarIconSet(TQString::fromLatin1("fileimport")));
importMenu->setToolTip(i18n("Import collection data from other formats"));
importMenu->setDelayed(false);
action = new KAction(actionCollection(), "file_import_tellico");
action->setText(i18n("Import Tellico Data..."));
action->setToolTip(i18n("Import another Tellico data file"));
- action->setIcon(TQString::tqfromLatin1("tellico"));
+ action->setIcon(TQString::fromLatin1("tellico"));
importMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::TellicoXML);
@@ -351,7 +351,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_import_alexandria");
action->setText(i18n("Import Alexandria Data..."));
action->setToolTip(i18n("Import data from the Alexandria book collection manager"));
- action->setIcon(TQString::tqfromLatin1("alexandria"));
+ action->setIcon(TQString::fromLatin1("alexandria"));
importMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Alexandria);
@@ -367,7 +367,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_import_referencer");
action->setText(i18n("Import Referencer Data..."));
action->setToolTip(i18n("Import data from Referencer"));
- action->setIcon(TQString::tqfromLatin1("referencer"));
+ action->setIcon(TQString::fromLatin1("referencer"));
importMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Referencer);
@@ -429,7 +429,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_import_gcfilms");
action->setText(i18n("Import GCstar Data..."));
action->setToolTip(i18n("Import a GCstar data file"));
- action->setIcon(TQString::tqfromLatin1("gcstar"));
+ action->setIcon(TQString::fromLatin1("gcstar"));
importMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::GCfilms);
@@ -437,7 +437,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_import_griffith");
action->setText(i18n("Import Griffith Data..."));
action->setToolTip(i18n("Import a Griffith database"));
- action->setIcon(TQString::tqfromLatin1("griffith"));
+ action->setIcon(TQString::fromLatin1("griffith"));
importMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Griffith);
@@ -474,14 +474,14 @@ void MainWindow::initActions() {
KActionMenu* exportMenu = new KActionMenu(actionCollection(), "file_export");
exportMenu->setText(i18n("&Export"));
- exportMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileexport")));
+ exportMenu->setIconSet(BarIconSet(TQString::fromLatin1("fileexport")));
exportMenu->setToolTip(i18n("Export the collection data to other formats"));
exportMenu->setDelayed(false);
action = new KAction(actionCollection(), "file_export_xml");
action->setText(i18n("Export to XML..."));
action->setToolTip(i18n("Export to a Tellico XML file"));
- action->setIcon(TQString::tqfromLatin1("tellico"));
+ action->setIcon(TQString::fromLatin1("tellico"));
exportMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::TellicoXML);
@@ -489,7 +489,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_export_zip");
action->setText(i18n("Export to Zip..."));
action->setToolTip(i18n("Export to a Tellico Zip file"));
- action->setIcon(TQString::tqfromLatin1("tellico"));
+ action->setIcon(TQString::fromLatin1("tellico"));
exportMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::TellicoZip);
@@ -521,7 +521,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_export_alexandria");
action->setText(i18n("Export to Alexandria..."));
action->setToolTip(i18n("Export to an Alexandria library"));
- action->setIcon(TQString::tqfromLatin1("alexandria"));
+ action->setIcon(TQString::fromLatin1("alexandria"));
exportMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::Alexandria);
@@ -553,7 +553,7 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_export_gcfilms");
action->setText(i18n("Export to GCfilms..."));
action->setToolTip(i18n("Export to a GCfilms data file"));
- action->setIcon(TQString::tqfromLatin1("gcstar"));
+ action->setIcon(TQString::fromLatin1("gcstar"));
exportMenu->insert(action);
connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::GCfilms);
@@ -585,12 +585,12 @@ void MainWindow::initActions() {
action = KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotEditDeselect()), actionCollection());
action->setToolTip(i18n("Deselect all the entries in the collection"));
- action = new KAction(i18n("Internet Search..."), TQString::tqfromLatin1("wizard"), CTRL + Key_M,
+ action = new KAction(i18n("Internet Search..."), TQString::fromLatin1("wizard"), CTRL + Key_M,
TQT_TQOBJECT(this), TQT_SLOT(slotShowFetchDialog()),
actionCollection(), "edit_search_internet");
action->setToolTip(i18n("Search the internet..."));
- action = new KAction(i18n("Advanced &Filter..."), TQString::tqfromLatin1("filter"), CTRL + Key_J,
+ action = new KAction(i18n("Advanced &Filter..."), TQString::fromLatin1("filter"), CTRL + Key_J,
TQT_TQOBJECT(this), TQT_SLOT(slotShowFilterDialog()),
actionCollection(), "filter_dialog");
action->setToolTip(i18n("Filter the collection"));
@@ -598,46 +598,46 @@ void MainWindow::initActions() {
/*************************************************
* Collection menu
*************************************************/
- m_newEntry = new KAction(i18n("&New Entry..."), TQString::tqfromLatin1("filenew"), CTRL + Key_N,
+ m_newEntry = new KAction(i18n("&New Entry..."), TQString::fromLatin1("filenew"), CTRL + Key_N,
TQT_TQOBJECT(this), TQT_SLOT(slotNewEntry()),
actionCollection(), "coll_new_entry");
m_newEntry->setToolTip(i18n("Create a new entry"));
- m_editEntry = new KAction(i18n("&Edit Entry..."), TQString::tqfromLatin1("edit"), CTRL + Key_E,
+ m_editEntry = new KAction(i18n("&Edit Entry..."), TQString::fromLatin1("edit"), CTRL + Key_E,
TQT_TQOBJECT(this), TQT_SLOT(slotShowEntryEditor()),
actionCollection(), "coll_edit_entry");
m_editEntry->setToolTip(i18n("Edit the selected entries"));
- m_copyEntry = new KAction(i18n("D&uplicate Entry"), TQString::tqfromLatin1("editcopy"), CTRL + Key_Y,
+ m_copyEntry = new KAction(i18n("D&uplicate Entry"), TQString::fromLatin1("editcopy"), CTRL + Key_Y,
Controller::self(), TQT_SLOT(slotCopySelectedEntries()),
actionCollection(), "coll_copy_entry");
m_copyEntry->setToolTip(i18n("Copy the selected entries"));
- m_deleteEntry = new KAction(i18n("&Delete Entry"), TQString::tqfromLatin1("editdelete"), CTRL + Key_D,
+ m_deleteEntry = new KAction(i18n("&Delete Entry"), TQString::fromLatin1("editdelete"), CTRL + Key_D,
Controller::self(), TQT_SLOT(slotDeleteSelectedEntries()),
actionCollection(), "coll_delete_entry");
m_deleteEntry->setToolTip(i18n("Delete the selected entries"));
- m_mergeEntry = new KAction(i18n("&Merge Entries"), TQString::tqfromLatin1("editcopy"), CTRL + Key_G,
+ m_mergeEntry = new KAction(i18n("&Merge Entries"), TQString::fromLatin1("editcopy"), CTRL + Key_G,
Controller::self(), TQT_SLOT(slotMergeSelectedEntries()),
actionCollection(), "coll_merge_entry");
m_mergeEntry->setToolTip(i18n("Merge the selected entries"));
m_mergeEntry->setEnabled(false); // gets enabled when more than 1 entry is selected
- action = new KAction(i18n("&Generate Reports..."), TQString::tqfromLatin1("document"), 0, TQT_TQOBJECT(this),
+ action = new KAction(i18n("&Generate Reports..."), TQString::fromLatin1("document"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotShowReportDialog()),
actionCollection(), "coll_reports");
action->setToolTip(i18n("Generate collection reports"));
- m_checkOutEntry = new KAction(i18n("Check-&out..."), TQString::tqfromLatin1("2uparrow"), 0,
+ m_checkOutEntry = new KAction(i18n("Check-&out..."), TQString::fromLatin1("2uparrow"), 0,
Controller::self(), TQT_SLOT(slotCheckOut()),
actionCollection(), "coll_checkout");
m_checkOutEntry->setToolTip(i18n("Check-out the selected items"));
- m_checkInEntry = new KAction(i18n("Check-&in"), TQString::tqfromLatin1("2downarrow"), 0,
+ m_checkInEntry = new KAction(i18n("Check-&in"), TQString::fromLatin1("2downarrow"), 0,
Controller::self(), TQT_SLOT(slotCheckIn()),
actionCollection(), "coll_checkin");
m_checkInEntry->setToolTip(i18n("Check-in the selected items"));
- action = new KAction(i18n("&Rename Collection..."), TQString::tqfromLatin1("editclear"), CTRL + Key_R,
+ action = new KAction(i18n("&Rename Collection..."), TQString::fromLatin1("editclear"), CTRL + Key_R,
TQT_TQOBJECT(this), TQT_SLOT(slotRenameCollection()),
actionCollection(), "coll_rename_collection");
action->setToolTip(i18n("Rename the collection"));
- action = new KAction(i18n("Collection &Fields..."), TQString::tqfromLatin1("edit"), CTRL + Key_U,
+ action = new KAction(i18n("Collection &Fields..."), TQString::fromLatin1("edit"), CTRL + Key_U,
TQT_TQOBJECT(this), TQT_SLOT(slotShowCollectionFieldsDialog()),
actionCollection(), "coll_fields");
action->setToolTip(i18n("Modify the collection fields"));
@@ -645,8 +645,8 @@ void MainWindow::initActions() {
TQT_TQOBJECT(this), TQT_SLOT(slotConvertToBibliography()),
actionCollection(), "coll_convert_bibliography");
action->setToolTip(i18n("Convert a book collection to a bibliography"));
- action->setIconSet(UserIconSet(TQString::tqfromLatin1("bibtex")));
- action = new KAction(i18n("String &Macros..."), TQString::tqfromLatin1("view_text"), 0,
+ action->setIconSet(UserIconSet(TQString::fromLatin1("bibtex")));
+ action = new KAction(i18n("String &Macros..."), TQString::fromLatin1("view_text"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotShowStringMacroDialog()),
actionCollection(), "coll_string_macros");
action->setToolTip(i18n("Edit the bibtex string macros"));
@@ -658,21 +658,21 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "cite_clipboard");
action->setText(i18n("Copy Bibtex to Cli&pboard"));
action->setToolTip(i18n("Copy bibtex citations to the clipboard"));
- action->setIcon(TQString::tqfromLatin1("editpaste"));
+ action->setIcon(TQString::fromLatin1("editpaste"));
connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteClipboard);
action = new KAction(actionCollection(), "cite_lyxpipe");
action->setText(i18n("Cite Entry in &LyX"));
action->setToolTip(i18n("Cite the selected entries in LyX"));
- action->setIcon(TQString::tqfromLatin1("lyx"));
+ action->setIcon(TQString::fromLatin1("lyx"));
connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteLyxpipe);
action = new KAction(actionCollection(), "cite_openoffice");
action->setText(i18n("Ci&te Entry in OpenOffice.org"));
action->setToolTip(i18n("Cite the selected entries in OpenOffice.org"));
- action->setIcon(TQString::tqfromLatin1("ooo-writer"));
+ action->setIcon(TQString::fromLatin1("ooo-writer"));
connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteOpenOffice);
@@ -681,7 +681,7 @@ void MainWindow::initActions() {
Controller::self(), TQT_SLOT(slotUpdateSelectedEntries(const TQString&)));
m_updateEntryMenu = new KActionMenu(i18n("&Update Entry"), actionCollection(), "coll_update_entry");
-// m_updateEntryMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileexport")));
+// m_updateEntryMenu->setIconSet(BarIconSet(TQString::fromLatin1("fileexport")));
m_updateEntryMenu->setDelayed(false);
m_updateAll = new KAction(actionCollection(), "update_entry_all");
@@ -689,7 +689,7 @@ void MainWindow::initActions() {
m_updateAll->setToolTip(i18n("Update entry data from all available sources"));
// m_updateEntryMenu->insert(action);
connect(m_updateAll, TQT_SIGNAL(activated()), updateMapper, TQT_SLOT(map()));
- updateMapper->setMapping(m_updateAll, TQString::tqfromLatin1("_all"));
+ updateMapper->setMapping(m_updateAll, TQString::fromLatin1("_all"));
/*************************************************
* Settings menu
@@ -738,7 +738,7 @@ void MainWindow::initActions() {
(void) new KAction(i18n("Filter"), CTRL + Key_F,
TQT_TQOBJECT(this), TQT_SLOT(slotFilterLabelActivated()),
actionCollection(), "quick_filter_accel");
- (void) new KAction(i18n("Clear Filter"), TQString::tqfromLatin1("locationbar_erase"), 0,
+ (void) new KAction(i18n("Clear Filter"), TQString::fromLatin1("locationbar_erase"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotClearFilter()),
actionCollection(), "quick_filter_clear");
@@ -761,7 +761,7 @@ void MainWindow::initActions() {
connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)),
TQT_SLOT(slotStatusMsg(const TQString &)));
connect(actionCollection(), TQT_SIGNAL(clearStatusText()),
- TQT_SLOT(slotCleartqStatus()));
+ TQT_SLOT(slotClearStatus()));
#ifdef UIFILE
kdWarning() << "MainWindow::initActions() - change createGUI() call!" << endl;
@@ -801,7 +801,7 @@ void MainWindow::initView() {
m_viewTabs->setTabBarHidden(true);
m_groupView = new GroupView(m_viewTabs, "groupview");
Controller::self()->addObserver(m_groupView);
- m_viewTabs->addTab(m_groupView, SmallIcon(TQString::tqfromLatin1("folder")), i18n("Groups"));
+ m_viewTabs->addTab(m_groupView, SmallIcon(TQString::fromLatin1("folder")), i18n("Groups"));
TQWhatsThis::add(m_groupView, i18n("The Group View sorts the entries into groupings "
"based on a selected field."));
@@ -856,16 +856,16 @@ void MainWindow::initFileOpen(bool nofile_) {
slotEntryCount();
const int type = Kernel::self()->collectionType();
- TQString welcomeFile = locate("appdata", TQString::tqfromLatin1("welcome.html"));
+ TQString welcomeFile = locate("appdata", TQString::fromLatin1("welcome.html"));
TQString text = FileHandler::readTextFile(welcomeFile);
- text.replace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
- text.replace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
- text.replace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
- text.replace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
- text.replace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
- text.replace(TQString::tqfromLatin1("$BANNER$"),
+ text.replace(TQString::fromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
+ text.replace(TQString::fromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
+ text.replace(TQString::fromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
+ text.replace(TQString::fromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
+ text.replace(TQString::fromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
+ text.replace(TQString::fromLatin1("$BANNER$"),
i18n("Welcome to the Tellico Collection Manager"));
- text.replace(TQString::tqfromLatin1("$WELCOMETEXT$"),
+ text.replace(TQString::fromLatin1("$WELCOMETEXT$"),
i18n("Tellico is a tool for managing collections of books, "
"videos, music, and whatever else you want to catalog.
"
"New entries can be added to your collection by "
@@ -883,13 +883,13 @@ void MainWindow::initFileOpen(bool nofile_) {
void MainWindow::saveOptions() {
// myDebug() << "MainWindow::saveOptions()" << endl;
- saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
+ saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1("Main Window Options"));
Config::setShowGroupWidget(m_toggleGroupWidget->isChecked());
Config::setShowEditWidget(m_toggleEntryEditor->isChecked());
Config::setShowEntryView(m_toggleEntryView->isChecked());
- m_fileOpenRecent->saveEntries(KGlobal::config(), TQString::tqfromLatin1("Recent Files"));
+ m_fileOpenRecent->saveEntries(KGlobal::config(), TQString::fromLatin1("Recent Files"));
if(!isNewDocument()) {
Config::setLastOpenFile(Data::Document::self()->URL().url());
}
@@ -916,14 +916,14 @@ void MainWindow::saveOptions() {
}
// this is used in the EntryEditDialog constructor, too
- m_editDialog->saveDialogSize(TQString::tqfromLatin1("Edit Dialog Options"));
+ m_editDialog->saveDialogSize(TQString::fromLatin1("Edit Dialog Options"));
saveCollectionOptions(Data::Document::self()->collection());
Config::writeConfig();
}
void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
- KConfigGroup group(KGlobal::config(), TQString::tqfromLatin1("Options - %1").tqarg(coll_->typeName()));
+ KConfigGroup group(KGlobal::config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString defaultGroup = coll_->defaultGroupField();
TQString entryGroup;
@@ -932,9 +932,9 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
} else {
KURL url = Kernel::self()->URL();
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
- KURL u = group.readEntry(TQString::tqfromLatin1("URL_%1").tqarg(i));
+ KURL u = group.readEntry(TQString::fromLatin1("URL_%1").arg(i));
if(url == u) {
- entryGroup = group.readEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i), defaultGroup);
+ entryGroup = group.readEntry(TQString::fromLatin1("Group By_%1").arg(i), defaultGroup);
break;
}
}
@@ -950,9 +950,9 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
TQString entryXSLTFile = Config::templateName(coll_->type());
if(entryXSLTFile.isEmpty()) {
- entryXSLTFile = TQString::tqfromLatin1("Fancy"); // should never happen, but just in case
+ entryXSLTFile = TQString::fromLatin1("Fancy"); // should never happen, but just in case
}
- m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::tqfromLatin1(".xsl"));
+ m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::fromLatin1(".xsl"));
// make sure the right combo element is selected
slotUpdateCollectionToolBar(coll_);
@@ -965,7 +965,7 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
}
int configIndex = -1;
- KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("Options - %1").tqarg(coll_->typeName()));
+ KConfigGroup config(KGlobal::config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString groupName;
if(m_entryGrouping->currentItem() > -1 &&
static_cast(coll_->entryGroups().count()) > m_entryGrouping->currentItem()) {
@@ -981,8 +981,8 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
TQValueList urls = TQValueList() << url;
TQStringList groupBys = TQStringList() << groupName;
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
- KURL u = config.readEntry(TQString::tqfromLatin1("URL_%1").tqarg(i));
- TQString g = config.readEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i));
+ KURL u = config.readEntry(TQString::fromLatin1("URL_%1").arg(i));
+ TQString g = config.readEntry(TQString::fromLatin1("Group By_%1").arg(i));
if(!u.isEmpty() && url != u) {
urls.append(u);
groupBys.append(g);
@@ -992,8 +992,8 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
}
uint limit = TQMIN(urls.count(), Config::maxCustomURLSettings());
for(uint i = 0; i < limit; ++i) {
- config.writeEntry(TQString::tqfromLatin1("URL_%1").tqarg(i), urls[i].url());
- config.writeEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i), groupBys[i]);
+ config.writeEntry(TQString::fromLatin1("URL_%1").arg(i), urls[i].url());
+ config.writeEntry(TQString::fromLatin1("Group By_%1").arg(i), groupBys[i]);
}
}
m_detailedView->saveConfig(coll_, configIndex);
@@ -1002,7 +1002,7 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
void MainWindow::readOptions() {
// myDebug() << "MainWindow::readOptions()" << endl;
- applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
+ applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1("Main Window Options"));
TQValueList splitList = Config::mainSplitterSizes();
if(!splitList.empty()) {
@@ -1025,7 +1025,7 @@ void MainWindow::readOptions() {
slotToggleEntryView();
// initialize the recent file list
- m_fileOpenRecent->loadEntries(KGlobal::config(), TQString::tqfromLatin1("Recent Files"));
+ m_fileOpenRecent->loadEntries(KGlobal::config(), TQString::fromLatin1("Recent Files"));
// sort by count if column = 1
int sortStyle = Config::groupViewSortColumn();
@@ -1061,8 +1061,8 @@ void MainWindow::saveProperties(KConfig* cfg_) {
}
void MainWindow::readProperties(KConfig* cfg_) {
- TQString filename = cfg_->readEntry(TQString::tqfromLatin1("filename"));
- bool modified = cfg_->readBoolEntry(TQString::tqfromLatin1("modified"), false);
+ TQString filename = cfg_->readEntry(TQString::fromLatin1("filename"));
+ bool modified = cfg_->readBoolEntry(TQString::fromLatin1("modified"), false);
if(modified) {
bool canRecover;
TQString tempname = kapp->checkRecoverFile(filename, canRecover);
@@ -1127,7 +1127,7 @@ void MainWindow::slotFileNew(int type_) {
ImageFactory::clean(false);
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotFileOpen() {
@@ -1135,18 +1135,18 @@ void MainWindow::slotFileOpen() {
if(m_editDialog->queryModified() && Data::Document::self()->saveModified()) {
TQString filter = i18n("*.tc *.bc|Tellico Files (*.tc)");
- filter += TQString::tqfromLatin1("\n");
+ filter += TQString::fromLatin1("\n");
filter += i18n("*.xml|XML Files (*.xml)");
- filter += TQString::tqfromLatin1("\n");
+ filter += TQString::fromLatin1("\n");
filter += i18n("*|All Files");
// keyword 'open'
- KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":open"), filter,
+ KURL url = KFileDialog::getOpenURL(TQString::fromLatin1(":open"), filter,
this, i18n("Open File"));
if(!url.isEmpty() && url.isValid()) {
slotFileOpen(url);
}
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotFileOpen(const KURL& url_) {
@@ -1164,7 +1164,7 @@ void MainWindow::slotFileOpen(const KURL& url_) {
}
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotFileOpenRecent(const KURL& url_) {
@@ -1183,7 +1183,7 @@ void MainWindow::slotFileOpenRecent(const KURL& url_) {
m_fileOpenRecent->setCurrentItem(-1);
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::openFile(const TQString& file_) {
@@ -1279,13 +1279,13 @@ bool MainWindow::fileSave() {
m_newDocument = false;
updateCaption(false);
m_fileSave->setEnabled(false);
- m_detailedView->resetEntrytqStatus();
+ m_detailedView->resetEntryStatus();
} else {
ret = false;
}
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return ret;
}
@@ -1305,13 +1305,13 @@ bool MainWindow::fileSaveAs() {
filter += i18n("*|All Files");
// keyword 'open'
- KFileDialog dlg(TQString::tqfromLatin1(":open"), filter, this, "filedialog", true);
+ KFileDialog dlg(TQString::fromLatin1(":open"), filter, this, "filedialog", true);
dlg.setCaption(i18n("Save As"));
dlg.setOperationMode(KFileDialog::Saving);
int result = dlg.exec();
if(result == TQDialog::Rejected) {
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return false;
}
@@ -1325,13 +1325,13 @@ bool MainWindow::fileSaveAs() {
updateCaption(false);
m_newDocument = false;
m_fileSave->setEnabled(false);
- m_detailedView->resetEntrytqStatus();
+ m_detailedView->resetEntryStatus();
} else {
ret = false;
}
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return ret;
}
@@ -1348,9 +1348,9 @@ void MainWindow::slotFilePrint() {
TQString str = i18n("The collection is currently being filtered to show a limited subset of "
"the entries. Only the visible entries will be printed. Continue?");
int ret = KMessageBox::warningContinueCancel(this, str, TQString(), KStdGuiItem::print(),
- TQString::tqfromLatin1("WarnPrintVisible"));
+ TQString::fromLatin1("WarnPrintVisible"));
if(ret == KMessageBox::Cancel) {
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return;
}
}
@@ -1360,7 +1360,7 @@ void MainWindow::slotFilePrint() {
Export::HTMLExporter exporter(Data::Document::self()->collection());
// only print visible entries
exporter.setEntries(m_detailedView->visibleEntries());
- exporter.setXSLTFile(TQString::tqfromLatin1("tellico-printing.xsl"));
+ exporter.setXSLTFile(TQString::fromLatin1("tellico-printing.xsl"));
exporter.setPrintHeaders(printHeaders);
exporter.setPrintGrouped(printGrouped);
exporter.setGroupBy(Controller::self()->expandedGroupBy());
@@ -1379,7 +1379,7 @@ void MainWindow::slotFilePrint() {
TQString html = exporter.text();
if(html.isEmpty()) {
XSLTError();
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return;
}
@@ -1389,7 +1389,7 @@ void MainWindow::slotFilePrint() {
slotStatusMsg(i18n("Printing..."));
doPrint(html);
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotFileQuit() {
@@ -1399,7 +1399,7 @@ void MainWindow::slotFileQuit() {
//saveOptions();
close();
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotEditCut() {
@@ -1418,13 +1418,13 @@ void MainWindow::activateEditSlot(const char* slot_) {
// the edit widget is the only one that copies, cuts, and pastes
TQWidget* w;
if(m_editDialog->isVisible()) {
- w = m_editDialog->tqfocusWidget();
+ w = m_editDialog->focusWidget();
} else {
- w = kapp->tqfocusWidget();
+ w = kapp->focusWidget();
}
if(w && w->isVisible()) {
- TQMetaObject* meta = w->tqmetaObject();
+ TQMetaObject* meta = w->metaObject();
int idx = meta->findSlot(slot_ + 1, true);
if(idx > -1) {
@@ -1442,7 +1442,7 @@ void MainWindow::slotEditDeselect() {
}
void MainWindow::slotConfigToolbar() {
- saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
+ saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1("Main Window Options"));
#ifdef UIFILE
KEditToolbar dlg(actionCollection(), UIFILE);
#else
@@ -1453,7 +1453,7 @@ void MainWindow::slotConfigToolbar() {
}
void MainWindow::slotNewToolbarConfig() {
- applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
+ applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1("Main Window Options"));
#ifdef UIFILE
createGUI(UIFILE, false);
#else
@@ -1512,16 +1512,16 @@ void MainWindow::slotHideConfigDialog() {
}
void MainWindow::slotShowTipOfDay(bool force_/*=true*/) {
- TQString tipfile = locate("appdata", TQString::tqfromLatin1("tellico.tips"));
+ TQString tipfile = locate("appdata", TQString::fromLatin1("tellico.tips"));
KTipDialog::showTip(this, tipfile, force_);
}
void MainWindow::slotStatusMsg(const TQString& text_) {
- m_statusBar->settqStatus(text_);
+ m_statusBar->setStatus(text_);
}
-void MainWindow::slotCleartqStatus() {
- StatusBar::self()->cleartqStatus();
+void MainWindow::slotClearStatus() {
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotEntryCount() {
@@ -1531,20 +1531,20 @@ void MainWindow::slotEntryCount() {
}
int count = coll->entryCount();
- TQString text = i18n("Total entries: %1").tqarg(count);
+ TQString text = i18n("Total entries: %1").arg(count);
int selectCount = Controller::self()->selectedEntries().count();
int filterCount = m_detailedView->visibleItems();
// if more than one book is selected, add the number of selected books
if(filterCount < count && selectCount > 1) {
text += TQChar(' ');
- text += i18n("(%1 filtered; %2 selected)").tqarg(filterCount).tqarg(selectCount);
+ text += i18n("(%1 filtered; %2 selected)").arg(filterCount).arg(selectCount);
} else if(filterCount < count) {
text += TQChar(' ');
- text += i18n("(%1 filtered)").tqarg(filterCount);
+ text += i18n("(%1 filtered)").arg(filterCount);
} else if(selectCount > 1) {
text += TQChar(' ');
- text += i18n("(%1 selected)").tqarg(selectCount);
+ text += i18n("(%1 selected)").arg(selectCount);
}
m_statusBar->setCount(text);
@@ -1591,14 +1591,14 @@ void MainWindow::slotHandleConfigChange() {
nocaps != Config::noCapitalizationList() ||
suffixes != Config::nameSuffixList() ||
prefixes != Config::surnamePrefixList()) {
- // tqinvalidate all groups
+ // invalidate all groups
Data::Document::self()->collection()->invalidateGroups();
// refreshing the title causes the group view to refresh
- Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(TQString::tqfromLatin1("title")));
+ Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(TQString::fromLatin1("title")));
}
TQString entryXSLTFile = Config::templateName(Kernel::self()->collectionType());
- m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::tqfromLatin1(".xsl"));
+ m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::fromLatin1(".xsl"));
}
void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
@@ -1624,7 +1624,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
for(TQStringList::ConstIterator groupIt = groups.begin(); groupIt != groups.end(); ++groupIt) {
// special case for people "pseudo-group"
if(*groupIt == Data::Collection::s_peopleGroupName) {
- groupMap.insert(*groupIt, TQString::tqfromLatin1("<") + i18n("People") + TQString::tqfromLatin1(">"));
+ groupMap.insert(*groupIt, TQString::fromLatin1("<") + i18n("People") + TQString::fromLatin1(">"));
} else {
groupMap.insert(*groupIt, coll_->fieldTitleByName(*groupIt));
}
@@ -1649,8 +1649,8 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
if(tb) {
KComboBox* cb = tb->getCombo(m_entryGrouping->itemId(i));
if(cb) {
- // qt caches the combobox size and never recalculates the tqsizeHint()
- // the source code recommends calling setFont to tqinvalidate the tqsizeHint
+ // qt caches the combobox size and never recalculates the sizeHint()
+ // the source code recommends calling setFont to invalidate the sizeHint
cb->setFont(cb->font());
cb->updateGeometry();
}
@@ -1664,7 +1664,7 @@ void MainWindow::slotChangeGrouping() {
TQString groupName = Kernel::self()->fieldNameByTitle(title);
if(groupName.isEmpty()) {
- if(title == TQString::tqfromLatin1("<") + i18n("People") + TQString::tqfromLatin1(">")) {
+ if(title == TQString::fromLatin1("<") + i18n("People") + TQString::fromLatin1(">")) {
groupName = Data::Collection::s_peopleGroupName;
} else {
groupName = Data::Document::self()->collection()->defaultGroupField();
@@ -1703,7 +1703,7 @@ void MainWindow::doPrint(const TQString& html_) {
w.write(html_);
w.end();
-// the problem with doing my own tqlayout is that the text gets truncated, both at the
+// the problem with doing my own layout is that the text gets truncated, both at the
// top and at the bottom. Even adding the overlap parameter, there were problems.
// KHTMLView takes care of that with a truncatedAt() parameter, but that's hidden in
// the khtml::render_root class. So for now, just use the KHTMLView::print() method.
@@ -1712,20 +1712,20 @@ void MainWindow::doPrint(const TQString& html_) {
#else
KPrinter* printer = new KPrinter(TQPrinter::PrinterResolution);
- if(printer->setup(this, i18n("Print %1").tqarg(Data::Document::self()->URL().prettyURL()))) {
+ if(printer->setup(this, i18n("Print %1").arg(Data::Document::self()->URL().prettyURL()))) {
printer->setFullPage(false);
- printer->setCreator(TQString::tqfromLatin1("Tellico"));
+ printer->setCreator(TQString::fromLatin1("Tellico"));
printer->setDocName(Data::Document::self()->URL().prettyURL());
TQPainter *p = new TQPainter;
p->begin(printer);
// mostly taken from KHTMLView::print()
- TQString headerLeft = KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), false);
+ TQString headerLeft = KGlobal::locale()->formatDate(TQDate::currentDate(), false);
TQString headerRight = Data::Document::self()->URL().prettyURL();
TQString footerMid;
- TQFont headerFont(TQString::tqfromLatin1("helvetica"), 8);
+ TQFont headerFont(TQString::fromLatin1("helvetica"), 8);
p->setFont(headerFont);
const int lspace = p->fontMetrics().lineSpacing();
const int headerHeight = (lspace * 3) / 2;
@@ -1745,7 +1745,7 @@ void MainWindow::doPrint(const TQString& html_) {
p->setPen(TQt::black);
p->setFont(headerFont);
- footerMid = i18n("Page %1").tqarg(page);
+ footerMid = i18n("Page %1").arg(page);
p->drawText(0, 0, pageWidth, lspace, TQt::AlignLeft, headerLeft);
p->drawText(0, 0, pageWidth, lspace, TQt::AlignRight, headerRight);
@@ -1835,10 +1835,10 @@ void MainWindow::setFilter(const TQString& text_) {
}
// if the text contains any non-word characters, assume it's a regexp
// but \W in qt is letter, number, or '_', I want to be a bit less strict
- TQRegExp rx(TQString::tqfromLatin1("[^\\w\\s-']"));
+ TQRegExp rx(TQString::fromLatin1("[^\\w\\s-']"));
if(text.find(rx) == -1) {
// split by whitespace, and add rules for each word
- TQStringList tokens = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s")), text);
+ TQStringList tokens = TQStringList::split(TQRegExp(TQString::fromLatin1("\\s")), text);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
// an empty field string means check every field
filter->append(new FilterRule(fieldName, *it, FilterRule::FuncContains));
@@ -1909,12 +1909,12 @@ void MainWindow::slotFileImport(int format_) {
if(checkURL) {
bool ok = !url.isEmpty() && url.isValid() && KIO::NetAccess::exists(url, true, this);
if(!ok) {
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return;
}
}
importFile(format, url);
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotFileExport(int format_) {
@@ -1924,7 +1924,7 @@ void MainWindow::slotFileExport(int format_) {
ExportDialog dlg(format, Data::Document::self()->collection(), this, "exportdialog");
if(dlg.exec() == TQDialog::Rejected) {
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return;
}
@@ -1939,12 +1939,12 @@ void MainWindow::slotFileExport(int format_) {
case Export::File:
{
- KFileDialog fileDlg(TQString::tqfromLatin1(":export"), dlg.fileFilter(), this, "filedialog", true);
+ KFileDialog fileDlg(TQString::fromLatin1(":export"), dlg.fileFilter(), this, "filedialog", true);
fileDlg.setCaption(i18n("Export As"));
fileDlg.setOperationMode(KFileDialog::Saving);
if(fileDlg.exec() == TQDialog::Rejected) {
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
return;
}
@@ -1957,7 +1957,7 @@ void MainWindow::slotFileExport(int format_) {
break;
}
- StatusBar::self()->cleartqStatus();
+ StatusBar::self()->clearStatus();
}
void MainWindow::slotShowStringMacroDialog() {
@@ -2032,9 +2032,9 @@ void MainWindow::slotConvertToBibliography() {
}
void MainWindow::slotCiteEntry(int action_) {
- StatusBar::self()->settqStatus(i18n("Creating citations..."));
+ StatusBar::self()->setStatus(i18n("Creating citations..."));
Cite::ActionManager::self()->cite(static_cast