Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent 8d9b90ca79
commit 26f93a7d91

@ -200,7 +200,7 @@ void CalendarHandler::populateTodo(KCal::Todo* todo_, Data::LoanPtr loan_) {
todo_->setDtDue(loan_->dueDate()); todo_->setDtDue(loan_->dueDate());
todo_->setHasDueDate(true); todo_->setHasDueDate(true);
TQString person = loan_->borrower()->name(); TQString person = loan_->borrower()->name();
TQString summary = i18n("Tellico: %1 is due to return \"%2\"").tqarg(person).tqarg(loan_->entry()->title()); TQString summary = i18n("Tellico: %1 is due to return \"%2\"").arg(person).arg(loan_->entry()->title());
todo_->setSummary(summary); todo_->setSummary(summary);
TQString note = loan_->note(); TQString note = loan_->note();
if(note.isEmpty()) { if(note.isEmpty()) {

@ -47,7 +47,7 @@ bool Lyxpipe::cite(Data::EntryVec entries_) {
lyxpipe += TQString::fromLatin1(".in"); lyxpipe += TQString::fromLatin1(".in");
// myDebug() << "Lyxpipe::cite() - " << lyxpipe << endl; // myDebug() << "Lyxpipe::cite() - " << lyxpipe << endl;
TQString errorStr = i18n("<qt>Tellico is unable to write to the server pipe at <b>%1</b>.</qt>").tqarg(lyxpipe); TQString errorStr = i18n("<qt>Tellico is unable to write to the server pipe at <b>%1</b>.</qt>").arg(lyxpipe);
TQFile file(lyxpipe); TQFile file(lyxpipe);
if(!file.exists()) { if(!file.exists()) {

@ -258,9 +258,9 @@ bool Collection::modifyField(FieldPtr newField_) {
// keep track of if the entry groups will need to be reset // keep track of if the entry groups will need to be reset
bool resetGroups = false; bool resetGroups = false;
// if format is different, go ahead and tqinvalidate all formatted entry values // if format is different, go ahead and invalidate all formatted entry values
if(oldField->formatFlag() != newField_->formatFlag()) { if(oldField->formatFlag() != newField_->formatFlag()) {
// tqinvalidate cached format strings of all entry attributes of this name // invalidate cached format strings of all entry attributes of this name
for(EntryVecIt it = m_entries.begin(); it != m_entries.end(); ++it) { for(EntryVecIt it = m_entries.begin(); it != m_entries.end(); ++it) {
it->invalidateFormattedFieldValue(fieldName); it->invalidateFormattedFieldValue(fieldName);
} }

@ -320,7 +320,7 @@ void CollectionFieldsDialog::applyChanges() {
i18n("<qt>Removing allowed values from the <i>%1</i> field which " i18n("<qt>Removing allowed values from the <i>%1</i> field which "
"currently exist in the collection may cause data corruption. " "currently exist in the collection may cause data corruption. "
"Do you want to keep your modified values or cancel and revert " "Do you want to keep your modified values or cancel and revert "
"to the current ones?</qt>").tqarg(field->title()), "to the current ones?</qt>").arg(field->title()),
TQString(), TQString(),
i18n("Keep modified values")); i18n("Keep modified values"));
if(ret != KMessageBox::Continue) { if(ret != KMessageBox::Continue) {
@ -406,10 +406,10 @@ void CollectionFieldsDialog::slotNew() {
TQString name = TQString::fromLatin1("custom") + TQString::number(m_newFields.count()+1); TQString name = TQString::fromLatin1("custom") + TQString::number(m_newFields.count()+1);
int count = m_newFields.count() + 1; int count = m_newFields.count() + 1;
TQString title = i18n("New Field") + TQString::fromLatin1(" %1").tqarg(count); TQString title = i18n("New Field") + TQString::fromLatin1(" %1").arg(count);
while(m_fieldsBox->findItem(title)) { while(m_fieldsBox->findItem(title)) {
++count; ++count;
title = i18n("New Field") + TQString::fromLatin1(" %1").tqarg(count); title = i18n("New Field") + TQString::fromLatin1(" %1").arg(count);
} }
Data::FieldPtr field = new Data::Field(name, title); Data::FieldPtr field = new Data::Field(name, title);
@ -744,7 +744,7 @@ void CollectionFieldsDialog::slotDefault() {
TQString caption = i18n("Revert Field Properties"); TQString caption = i18n("Revert Field Properties");
TQString text = i18n("<qt><p>Do you really want to revert the properties for the <em>%1</em> " TQString text = i18n("<qt><p>Do you really want to revert the properties for the <em>%1</em> "
"field back to their default values?</p></qt>").tqarg(m_currentField->title()); "field back to their default values?</p></qt>").arg(m_currentField->title());
TQString dontAsk = TQString::fromLatin1("RevertFieldProperties"); TQString dontAsk = TQString::fromLatin1("RevertFieldProperties");
int ret = KMessageBox::warningContinueCancel(this, text, caption, i18n("Revert"), dontAsk); int ret = KMessageBox::warningContinueCancel(this, text, caption, i18n("Revert"), dontAsk);
if(ret != KMessageBox::Continue) { if(ret != KMessageBox::Continue) {

@ -60,5 +60,5 @@ void AddEntries::unexecute() {
TQString AddEntries::name() const { TQString AddEntries::name() const {
return m_entries.count() > 1 ? i18n("Add Entries") return m_entries.count() > 1 ? i18n("Add Entries")
: i18n("Add (Entry Title)", "Add %1").tqarg(m_entries.begin()->title()); : i18n("Add (Entry Title)", "Add %1").arg(m_entries.begin()->title());
} }

@ -106,5 +106,5 @@ void AddLoans::unexecute() {
TQString AddLoans::name() const { TQString AddLoans::name() const {
return m_loans.count() > 1 ? i18n("Check-out Items") return m_loans.count() > 1 ? i18n("Check-out Items")
: i18n("Check-out (Entry Title)", "Check-out %1").tqarg(m_loans.begin()->entry()->title()); : i18n("Check-out (Entry Title)", "Check-out %1").arg(m_loans.begin()->entry()->title());
} }

@ -101,11 +101,11 @@ void FieldCommand::unexecute() {
TQString FieldCommand::name() const { TQString FieldCommand::name() const {
switch(m_mode) { switch(m_mode) {
case FieldAdd: case FieldAdd:
return i18n("Add %1 Field").tqarg(m_activeField->title()); return i18n("Add %1 Field").arg(m_activeField->title());
case FieldModify: case FieldModify:
return i18n("Modify %1 Field").tqarg(m_activeField->title()); return i18n("Modify %1 Field").arg(m_activeField->title());
case FieldRemove: case FieldRemove:
return i18n("Delete %1 Field").tqarg(m_activeField->title()); return i18n("Delete %1 Field").arg(m_activeField->title());
} }
// hush warnings // hush warnings
return TQString(); return TQString();

@ -70,7 +70,7 @@ void ModifyEntries::unexecute() {
TQString ModifyEntries::name() const { TQString ModifyEntries::name() const {
return m_entries.count() > 1 ? i18n("Modify Entries") return m_entries.count() > 1 ? i18n("Modify Entries")
: i18n("Modify (Entry Title)", "Modify %1").tqarg(m_entries.begin()->title()); : i18n("Modify (Entry Title)", "Modify %1").arg(m_entries.begin()->title());
} }
void ModifyEntries::swapValues() { void ModifyEntries::swapValues() {

@ -46,5 +46,5 @@ void RemoveEntries::unexecute() {
TQString RemoveEntries::name() const { TQString RemoveEntries::name() const {
return m_entries.count() > 1 ? i18n("Delete Entries") return m_entries.count() > 1 ? i18n("Delete Entries")
: i18n("Delete (Entry Title)", "Delete %1").tqarg(m_entries.begin()->title()); : i18n("Delete (Entry Title)", "Delete %1").arg(m_entries.begin()->title());
} }

@ -77,5 +77,5 @@ void RemoveLoans::unexecute() {
TQString RemoveLoans::name() const { TQString RemoveLoans::name() const {
return m_loans.count() > 1 ? i18n("Check-in Entries") return m_loans.count() > 1 ? i18n("Check-in Entries")
: i18n("Check-in (Entry Title)", "Check-in %1").tqarg(m_loans.begin()->entry()->title()); : i18n("Check-in (Entry Title)", "Check-in %1").arg(m_loans.begin()->entry()->title());
} }

@ -47,7 +47,7 @@ private:
} }
UpdateEntries::UpdateEntries(Data::CollPtr coll_, Data::EntryPtr oldEntry_, Data::EntryPtr newEntry_, bool overWrite_) UpdateEntries::UpdateEntries(Data::CollPtr coll_, Data::EntryPtr oldEntry_, Data::EntryPtr newEntry_, bool overWrite_)
: Group(i18n("Modify (Entry Title)", "Modify %1").tqarg(newEntry_->title())) : Group(i18n("Modify (Entry Title)", "Modify %1").arg(newEntry_->title()))
, m_coll(coll_) , m_coll(coll_)
, m_oldEntry(oldEntry_) , m_oldEntry(oldEntry_)
, m_newEntry(newEntry_) , m_newEntry(newEntry_)

@ -707,7 +707,7 @@ void ConfigDialog::saveConfiguration() {
continue; continue;
} }
m_newStuffConfigWidgets.removeRef(cw); m_newStuffConfigWidgets.removeRef(cw);
TQString group = TQString::fromLatin1("Data Source %1").tqarg(count); TQString group = TQString::fromLatin1("Data Source %1").arg(count);
// in case we later change the order, clear the group now // in case we later change the order, clear the group now
masterConfig->deleteGroup(group); masterConfig->deleteGroup(group);
KConfigGroup configGroup(masterConfig, group); KConfigGroup configGroup(masterConfig, group);
@ -724,11 +724,11 @@ void ConfigDialog::saveConfiguration() {
KConfigGroup sourceGroup(masterConfig, "Data Sources"); KConfigGroup sourceGroup(masterConfig, "Data Sources");
sourceGroup.writeEntry("Sources Count", count); sourceGroup.writeEntry("Sources Count", count);
// and purge old config groups // and purge old config groups
TQString group = TQString::fromLatin1("Data Source %1").tqarg(count); TQString group = TQString::fromLatin1("Data Source %1").arg(count);
while(masterConfig->hasGroup(group)) { while(masterConfig->hasGroup(group)) {
masterConfig->deleteGroup(group); masterConfig->deleteGroup(group);
++count; ++count;
group = TQString::fromLatin1("Data Source %1").tqarg(count); group = TQString::fromLatin1("Data Source %1").arg(count);
} }
masterConfig->sync(); masterConfig->sync();

@ -82,15 +82,15 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
m_imageColumns.clear(); m_imageColumns.clear();
// myDebug() << "DetailedListView::addCollection()" << endl; // myDebug() << "DetailedListView::addCollection()" << endl;
KConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").tqarg(coll_->typeName())); KConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString configN; TQString configN;
if(coll_->type() == Data::Collection::Base) { if(coll_->type() == Data::Collection::Base) {
KURL url = Kernel::self()->URL(); KURL url = Kernel::self()->URL();
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) { for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
KURL u = config.readEntry(TQString::fromLatin1("URL_%1").tqarg(i)); KURL u = config.readEntry(TQString::fromLatin1("URL_%1").arg(i));
if(u == url) { if(u == url) {
configN = TQString::fromLatin1("_%1").tqarg(i); configN = TQString::fromLatin1("_%1").arg(i);
break; break;
} }
} }
@ -747,16 +747,16 @@ void DetailedListView::slotUpdatePixmap() {
} }
void DetailedListView::saveConfig(Tellico::Data::CollPtr coll_, int configIndex_) { void DetailedListView::saveConfig(Tellico::Data::CollPtr coll_, int configIndex_) {
KConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").tqarg(coll_->typeName())); KConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
// all of this is to have custom settings on a per file basis // all of this is to have custom settings on a per file basis
TQString configN; TQString configN;
if(coll_->type() == Data::Collection::Base) { if(coll_->type() == Data::Collection::Base) {
TQValueList<ConfigInfo> info; TQValueList<ConfigInfo> info;
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) { for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
KURL u = config.readEntry(TQString::fromLatin1("URL_%1").tqarg(i)); KURL u = config.readEntry(TQString::fromLatin1("URL_%1").arg(i));
if(!u.isEmpty() && static_cast<int>(i) != configIndex_) { if(!u.isEmpty() && static_cast<int>(i) != configIndex_) {
configN = TQString::fromLatin1("_%1").tqarg(i); configN = TQString::fromLatin1("_%1").arg(i);
ConfigInfo ci; ConfigInfo ci;
ci.cols = config.readListEntry("ColumnNames" + configN); ci.cols = config.readListEntry("ColumnNames" + configN);
ci.widths = config.readIntListEntry("ColumnWidths" + configN); ci.widths = config.readIntListEntry("ColumnWidths" + configN);
@ -772,7 +772,7 @@ void DetailedListView::saveConfig(Tellico::Data::CollPtr coll_, int configIndex_
uint limit = TQMIN(info.count(), Config::maxCustomURLSettings()-1); uint limit = TQMIN(info.count(), Config::maxCustomURLSettings()-1);
for(uint i = 0; i < limit; ++i) { for(uint i = 0; i < limit; ++i) {
// starts at one since the current config will be written below // starts at one since the current config will be written below
configN = TQString::fromLatin1("_%1").tqarg(i+1); configN = TQString::fromLatin1("_%1").arg(i+1);
config.writeEntry("ColumnNames" + configN, info[i].cols); config.writeEntry("ColumnNames" + configN, info[i].cols);
config.writeEntry("ColumnWidths" + configN, info[i].widths); config.writeEntry("ColumnWidths" + configN, info[i].widths);
config.writeEntry("ColumnOrder" + configN, info[i].order); config.writeEntry("ColumnOrder" + configN, info[i].order);

@ -332,7 +332,7 @@ bool Entry::isOwned() {
return (m_coll && m_id > -1 && m_coll->entryCount() > 0 && m_coll->entries().contains(this)); return (m_coll && m_id > -1 && m_coll->entryCount() > 0 && m_coll->entries().contains(this));
} }
// a null string means tqinvalidate all // a null string means invalidate all
void Entry::invalidateFormattedFieldValue(const TQString& name_) { void Entry::invalidateFormattedFieldValue(const TQString& name_) {
if(name_.isNull()) { if(name_.isNull()) {
m_formattedFields.clear(); m_formattedFields.clear();

@ -211,7 +211,7 @@ public:
* Removes the formatted value of the field from the map. This should be used when * Removes the formatted value of the field from the map. This should be used when
* the field's format flag has changed. * the field's format flag has changed.
* *
* @param name The name of the field that changed. TQString() means tqinvalidate all fields. * @param name The name of the field that changed. TQString() means invalidate all fields.
*/ */
void invalidateFormattedFieldValue(const TQString& name=TQString()); void invalidateFormattedFieldValue(const TQString& name=TQString());

@ -250,7 +250,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// I don't want anything to be hidden, Keramik has a bug if I don't do this // I don't want anything to be hidden, Keramik has a bug if I don't do this
it.current()->setMinimumHeight(it.current()->sizeHint().height()); it.current()->setMinimumHeight(it.current()->sizeHint().height());
// the parent of the grid is the page that got added to the tabs // the parent of the grid is the page that got added to the tabs
it.current()->parentWidget()->tqlayout()->tqinvalidate(); it.current()->parentWidget()->tqlayout()->invalidate();
it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->sizeHint().height()); it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->sizeHint().height());
} }
@ -258,7 +258,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// this doesn't seem to work // this doesn't seem to work
// setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum); // setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
// so do this instead // so do this instead
tqlayout()->tqinvalidate(); // needed so the sizeHint() gets recalculated tqlayout()->invalidate(); // needed so the sizeHint() gets recalculated
m_tabs->setMinimumHeight(m_tabs->minimumSizeHint().height()); m_tabs->setMinimumHeight(m_tabs->minimumSizeHint().height());
m_tabs->setMinimumWidth(m_tabs->sizeHint().width()); m_tabs->setMinimumWidth(m_tabs->sizeHint().width());

@ -34,7 +34,7 @@ namespace Tellico {
class EntryItem : public GUI::ListViewItem { class EntryItem : public GUI::ListViewItem {
public: public:
/** /**
* This constructor is for items which are direct tqchildren of a ListView object, * This constructor is for items which are direct children of a ListView object,
* which is just the @ref DetailedListView. * which is just the @ref DetailedListView.
* *
* @param parent A pointer to the parent * @param parent A pointer to the parent

@ -47,8 +47,8 @@ EntryMerger::EntryMerger(Data::EntryVec entries_, TQObject* parent_)
void EntryMerger::slotStartNext() { void EntryMerger::slotStartNext() {
TQString statusMsg = i18n("Total merged/scanned entries: %1/%2") TQString statusMsg = i18n("Total merged/scanned entries: %1/%2")
.tqarg(m_entriesToRemove.count()) .arg(m_entriesToRemove.count())
.tqarg(m_origCount - m_entriesToCheck.count()); .arg(m_origCount - m_entriesToCheck.count());
StatusBar::self()->setStatus(statusMsg); StatusBar::self()->setStatus(statusMsg);
ProgressManager::self()->setProgress(this, m_origCount - m_entriesToCheck.count()); ProgressManager::self()->setProgress(this, m_origCount - m_entriesToCheck.count());

@ -78,7 +78,7 @@ void EntryUpdater::init() {
m_origEntryCount = m_entriesToUpdate.count(); m_origEntryCount = m_entriesToUpdate.count();
TQString label; TQString label;
if(m_entriesToUpdate.count() == 1) { if(m_entriesToUpdate.count() == 1) {
label = i18n("Updating %1...").tqarg(m_entriesToUpdate.front()->title()); label = i18n("Updating %1...").arg(m_entriesToUpdate.front()->title());
} else { } else {
label = i18n("Updating entries..."); label = i18n("Updating entries...");
} }
@ -96,7 +96,7 @@ void EntryUpdater::init() {
} }
void EntryUpdater::slotStartNext() { void EntryUpdater::slotStartNext() {
StatusBar::self()->setStatus(i18n("Updating <b>%1</b>...").tqarg(m_entriesToUpdate.front()->title())); StatusBar::self()->setStatus(i18n("Updating <b>%1</b>...").arg(m_entriesToUpdate.front()->title()));
ProgressManager::self()->setProgress(this, m_fetchers.count() * (m_origEntryCount - m_entriesToUpdate.count()) + m_fetchIndex); ProgressManager::self()->setProgress(this, m_fetchers.count() * (m_origEntryCount - m_entriesToUpdate.count()) + m_fetchIndex);
Fetch::Fetcher::Ptr f = m_fetchers[m_fetchIndex]; Fetch::Fetcher::Ptr f = m_fetchers[m_fetchIndex];
@ -216,8 +216,8 @@ Tellico::EntryUpdater::UpdateResult EntryUpdater::askUser(ResultList results) {
icon->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::fromLatin1("network"), KIcon::Panel, 64)); icon->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::fromLatin1("network"), KIcon::Panel, 64));
TQString s = i18n("<qt><b>%1</b> returned multiple results which could match <b>%2</b>, " TQString s = i18n("<qt><b>%1</b> returned multiple results which could match <b>%2</b>, "
"the entry currently in the collection. Please select the correct match.</qt>") "the entry currently in the collection. Please select the correct match.</qt>")
.tqarg(m_fetchers[m_fetchIndex]->source()) .arg(m_fetchers[m_fetchIndex]->source())
.tqarg(m_entriesToUpdate.front()->field(TQString::fromLatin1("title"))); .arg(m_entriesToUpdate.front()->field(TQString::fromLatin1("title")));
GUI::RichTextLabel* l = new GUI::RichTextLabel(s, hbox); GUI::RichTextLabel* l = new GUI::RichTextLabel(s, hbox);
hbox->setStretchFactor(l, 100); hbox->setStretchFactor(l, 100);

@ -260,7 +260,7 @@ void EntryView::setXSLTFile(const TQString& file_) {
void EntryView::slotRefresh() { void EntryView::slotRefresh() {
setXSLTFile(m_xsltFile); setXSLTFile(m_xsltFile);
showEntry(m_entry); showEntry(m_entry);
view()->tqrepaint(); view()->repaint();
} }
// do some contortions in case the url is relative // do some contortions in case the url is relative
@ -340,10 +340,10 @@ void EntryView::resetColors() {
// this is a rather bad hack to get around the fact that the image cache is not reloaded when // this is a rather bad hack to get around the fact that the image cache is not reloaded when
// the gradient files are changed on disk. Setting the URLArgs for write() calls doesn't seem to // the gradient files are changed on disk. Setting the URLArgs for write() calls doesn't seem to
// work. So force a reload with a temp file, then catch the completed signal and tqrepaint // work. So force a reload with a temp file, then catch the completed signal and repaint
TQString s = TQString::fromLatin1("<html><body><img src=\"%1\"><img src=\"%2\"></body></html>") TQString s = TQString::fromLatin1("<html><body><img src=\"%1\"><img src=\"%2\"></body></html>")
.tqarg(dir + TQString::fromLatin1("gradient_bg.png")) .arg(dir + TQString::fromLatin1("gradient_bg.png"))
.tqarg(dir + TQString::fromLatin1("gradient_header.png")); .arg(dir + TQString::fromLatin1("gradient_header.png"));
delete m_tempFile; delete m_tempFile;
m_tempFile = new KTempFile; m_tempFile = new KTempFile;

@ -66,7 +66,7 @@ ExportDialog::ExportDialog(Export::Format format_, Data::CollPtr coll_, TQWidget
m_encodeUTF8 = new TQRadioButton(i18n("Encode in Unicode (UTF-8)"), bg); m_encodeUTF8 = new TQRadioButton(i18n("Encode in Unicode (UTF-8)"), bg);
m_encodeUTF8->setChecked(true); m_encodeUTF8->setChecked(true);
TQWhatsThis::add(m_encodeUTF8, i18n("Encode the exported file in Unicode (UTF-8).")); TQWhatsThis::add(m_encodeUTF8, i18n("Encode the exported file in Unicode (UTF-8)."));
TQString localStr = i18n("Encode in user locale (%1)").tqarg( TQString localStr = i18n("Encode in user locale (%1)").arg(
TQString::fromLatin1(TQTextCodec::codecForLocale()->name())); TQString::fromLatin1(TQTextCodec::codecForLocale()->name()));
m_encodeLocale = new TQRadioButton(localStr, bg); m_encodeLocale = new TQRadioButton(localStr, bg);
TQWhatsThis::add(m_encodeLocale, i18n("Encode the exported file in the local encoding.")); TQWhatsThis::add(m_encodeLocale, i18n("Encode the exported file in the local encoding."));

@ -189,7 +189,7 @@ void AmazonFetcher::doSearch() {
case Data::Collection::Base: case Data::Collection::Base:
case Data::Collection::Card: case Data::Collection::Card:
default: default:
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(); stop();
return; return;
} }
@ -219,7 +219,7 @@ void AmazonFetcher::doSearch() {
} else if(type == Data::Collection::Game) { } else if(type == Data::Collection::Game) {
u.addQueryItem(TQString::fromLatin1("Manufacturer"), value, mib); u.addQueryItem(TQString::fromLatin1("Manufacturer"), value, mib);
} else { // books and bibtex } else { // books and bibtex
TQString s = TQString::fromLatin1("author:%1 or publisher:%2").tqarg(value, value); TQString s = TQString::fromLatin1("author:%1 or publisher:%2").arg(value, value);
// u.addQueryItem(TQString::fromLatin1("Author"), value, mib); // u.addQueryItem(TQString::fromLatin1("Author"), value, mib);
// u.addQueryItem(TQString::fromLatin1("Publisher"), value, mib); // u.addQueryItem(TQString::fromLatin1("Publisher"), value, mib);
u.addQueryItem(TQString::fromLatin1("Power"), s, mib); u.addQueryItem(TQString::fromLatin1("Power"), s, mib);
@ -357,7 +357,7 @@ void AmazonFetcher::slotComplete(KIO::Job* job_) {
#if 0 #if 0
kdWarning() << "Remove debug from amazonfetcher.cpp" << endl; kdWarning() << "Remove debug from amazonfetcher.cpp" << endl;
TQFile f(TQString::fromLatin1("/tmp/test%1.xml").tqarg(m_page)); TQFile f(TQString::fromLatin1("/tmp/test%1.xml").arg(m_page));
if(f.open(IO_WriteOnly)) { if(f.open(IO_WriteOnly)) {
TQTextStream t(&f); TQTextStream t(&f);
t.setEncoding(TQTextStream::UnicodeUTF8); t.setEncoding(TQTextStream::UnicodeUTF8);
@ -559,7 +559,7 @@ void AmazonFetcher::slotComplete(KIO::Job* job_) {
const int currentTotal = TQMIN(m_total, m_limit); const int currentTotal = TQMIN(m_total, m_limit);
if(m_page * AMAZON_RETURNS_PER_REQUEST < currentTotal) { if(m_page * AMAZON_RETURNS_PER_REQUEST < currentTotal) {
int foundCount = (m_page-1) * AMAZON_RETURNS_PER_REQUEST + coll->entryCount(); int foundCount = (m_page-1) * AMAZON_RETURNS_PER_REQUEST + coll->entryCount();
message(i18n("Results from %1: %2/%3").tqarg(source()).tqarg(foundCount).tqarg(m_total), MessageHandler::Status); message(i18n("Results from %1: %2/%3").arg(source()).arg(foundCount).arg(m_total), MessageHandler::Status);
++m_page; ++m_page;
m_countOffset = 0; m_countOffset = 0;
doSearch(); doSearch();

@ -72,7 +72,7 @@ void AnimeNfoFetcher::search(FetchKey key_, const TQString& value_) {
u.addQueryItem(TQString::fromLatin1("queryin"), TQString::fromLatin1("anime_titles")); u.addQueryItem(TQString::fromLatin1("queryin"), TQString::fromLatin1("anime_titles"));
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -316,7 +316,7 @@ Tellico::Data::EntryPtr AnimeNfoFetcher::parseEntry(const TQString& str_) {
// image // image
TQRegExp imgRx(TQString::fromLatin1("<img\\s+[^>]*src\\s*=\\s*[\"']([^>]*)[\"']\\s+[^>]*alt\\s*=\\s*[\"']%1[\"']") TQRegExp imgRx(TQString::fromLatin1("<img\\s+[^>]*src\\s*=\\s*[\"']([^>]*)[\"']\\s+[^>]*alt\\s*=\\s*[\"']%1[\"']")
.tqarg(entry->field(TQString::fromLatin1("title"))), false); .arg(entry->field(TQString::fromLatin1("title"))), false);
imgRx.setMinimal(true); imgRx.setMinimal(true);
int pos = imgRx.search(s); int pos = imgRx.search(s);
if(pos > -1) { if(pos > -1) {

@ -80,7 +80,7 @@ void ArxivFetcher::continueSearch() {
void ArxivFetcher::doSearch() { void ArxivFetcher::doSearch() {
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -258,16 +258,16 @@ KURL ArxivFetcher::searchURL(FetchKey key_, const TQString& value_) const {
TQString quotedValue = '"' + value_ + '"'; TQString quotedValue = '"' + value_ + '"';
switch(key_) { switch(key_) {
case Title: case Title:
u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("ti:%1").tqarg(quotedValue)); u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("ti:%1").arg(quotedValue));
break; break;
case Person: case Person:
u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("au:%1").tqarg(quotedValue)); u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("au:%1").arg(quotedValue));
break; break;
case Keyword: case Keyword:
// keyword gets to use all the words without being quoted // keyword gets to use all the words without being quoted
u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("all:%1").tqarg(value_)); u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("all:%1").arg(value_));
break; break;
case ArxivID: case ArxivID:
@ -276,7 +276,7 @@ KURL ArxivFetcher::searchURL(FetchKey key_, const TQString& value_) const {
TQString value = value_; TQString value = value_;
value.remove(TQRegExp(TQString::fromLatin1("^arxiv:"), false)); value.remove(TQRegExp(TQString::fromLatin1("^arxiv:"), false));
value.remove(TQRegExp(TQString::fromLatin1("v\\d+$"))); value.remove(TQRegExp(TQString::fromLatin1("v\\d+$")));
u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("id:%1").tqarg(value)); u.addQueryItem(TQString::fromLatin1("search_query"), TQString::fromLatin1("id:%1").arg(value));
} }
break; break;

@ -63,7 +63,7 @@ void BibsonomyFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true; m_started = true;
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -160,11 +160,11 @@ KURL BibsonomyFetcher::searchURL(FetchKey key_, const TQString& value_) const {
switch(key_) { switch(key_) {
case Person: case Person:
u.addPath(TQString::fromLatin1("author/%1").tqarg(value_)); u.addPath(TQString::fromLatin1("author/%1").arg(value_));
break; break;
case Keyword: case Keyword:
u.addPath(TQString::fromLatin1("search/%1").tqarg(value_)); u.addPath(TQString::fromLatin1("search/%1").arg(value_));
break; break;
default: default:

@ -64,7 +64,7 @@ void CitebaseFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true; m_started = true;
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -176,7 +176,7 @@ KURL CitebaseFetcher::searchURL(FetchKey key_, const TQString& value_) const {
TQString value = value_; TQString value = value_;
value.remove(TQRegExp(TQString::fromLatin1("^arxiv:"), false)); value.remove(TQRegExp(TQString::fromLatin1("^arxiv:"), false));
value.remove(TQRegExp(TQString::fromLatin1("v\\d+$"))); value.remove(TQRegExp(TQString::fromLatin1("v\\d+$")));
u.addQueryItem(TQString::fromLatin1("rft_id"), TQString::fromLatin1("oai:arXiv.org:%1").tqarg(value)); u.addQueryItem(TQString::fromLatin1("rft_id"), TQString::fromLatin1("oai:arXiv.org:%1").arg(value));
} }
break; break;

@ -82,13 +82,13 @@ void CrossRefFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true; m_started = true;
if(m_user.isEmpty() || m_password.isEmpty()) { if(m_user.isEmpty() || m_password.isEmpty()) {
message(i18n("%1 requires a username and password.").tqarg(source()), MessageHandler::Warning); message(i18n("%1 requires a username and password.").arg(source()), MessageHandler::Warning);
stop(); stop();
return; return;
} }
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -250,11 +250,11 @@ KURL CrossRefFetcher::searchURL(FetchKey key_, const TQString& value_) const {
#ifdef CROSSREF_USE_UNIXREF #ifdef CROSSREF_USE_UNIXREF
u.addQueryItem(TQString::fromLatin1("format"), TQString::fromLatin1("unixref")); u.addQueryItem(TQString::fromLatin1("format"), TQString::fromLatin1("unixref"));
#endif #endif
u.addQueryItem(TQString::fromLatin1("req_dat"), TQString::fromLatin1("ourl_%1:%2").tqarg(m_user, m_password)); u.addQueryItem(TQString::fromLatin1("req_dat"), TQString::fromLatin1("ourl_%1:%2").arg(m_user, m_password));
switch(key_) { switch(key_) {
case DOI: case DOI:
u.addQueryItem(TQString::fromLatin1("rft_id"), TQString::fromLatin1("info:doi/%1").tqarg(value_)); u.addQueryItem(TQString::fromLatin1("rft_id"), TQString::fromLatin1("info:doi/%1").arg(value_));
break; break;
default: default:

@ -94,7 +94,7 @@ void DiscogsFetcher::doSearch() {
u.addQueryItem(TQString::fromLatin1("api_key"), m_apiKey); u.addQueryItem(TQString::fromLatin1("api_key"), m_apiKey);
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -107,7 +107,7 @@ void DiscogsFetcher::doSearch() {
break; break;
case Person: case Person:
u.setPath(TQString::fromLatin1("/artist/%1").tqarg(m_value)); u.setPath(TQString::fromLatin1("/artist/%1").arg(m_value));
break; break;
case Keyword: case Keyword:
@ -256,7 +256,7 @@ Tellico::Data::EntryPtr DiscogsFetcher::fetchEntry(uint uid_) {
KURL u(TQString::fromLatin1("/home/robby/discogs-release.xml")); KURL u(TQString::fromLatin1("/home/robby/discogs-release.xml"));
#else #else
KURL u(TQString::fromLatin1(DISCOGS_API_URL)); KURL u(TQString::fromLatin1(DISCOGS_API_URL));
u.setPath(TQString::fromLatin1("/release/%1").tqarg(release)); u.setPath(TQString::fromLatin1("/release/%1").arg(release));
u.addQueryItem(TQString::fromLatin1("f"), TQString::fromLatin1("xml")); u.addQueryItem(TQString::fromLatin1("f"), TQString::fromLatin1("xml"));
u.addQueryItem(TQString::fromLatin1("api_key"), m_apiKey); u.addQueryItem(TQString::fromLatin1("api_key"), m_apiKey);
#endif #endif

@ -270,7 +270,7 @@ void EntrezFetcher::summaryResults() {
return; return;
} }
// top child is eSummaryResult // top child is eSummaryResult
// all tqchildren are DocSum // all children are DocSum
for(TQDomNode n = dom.documentElement().firstChild(); !n.isNull(); n = n.nextSibling()) { for(TQDomNode n = dom.documentElement().firstChild(); !n.isNull(); n = n.nextSibling()) {
TQDomElement e = n.toElement(); TQDomElement e = n.toElement();
if(e.isNull() || e.tagName() != Latin1Literal("DocSum")) { if(e.isNull() || e.tagName() != Latin1Literal("DocSum")) {
@ -292,7 +292,7 @@ void EntrezFetcher::summaryResults() {
} else if(nodes.item(j).toElement().attribute(TQString::fromLatin1("Name")) == Latin1Literal("AuthorList")) { } else if(nodes.item(j).toElement().attribute(TQString::fromLatin1("Name")) == Latin1Literal("AuthorList")) {
TQStringList list; TQStringList list;
for(TQDomNode aNode = nodes.item(j).firstChild(); !aNode.isNull(); aNode = aNode.nextSibling()) { for(TQDomNode aNode = nodes.item(j).firstChild(); !aNode.isNull(); aNode = aNode.nextSibling()) {
// lazy, assume all tqchildren Items are authors // lazy, assume all children Items are authors
if(aNode.nodeName() == Latin1Literal("Item")) { if(aNode.nodeName() == Latin1Literal("Item")) {
list << aNode.toElement().text(); list << aNode.toElement().text();
} }

@ -146,7 +146,7 @@ void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
TQString args = m_args[key_]; TQString args = m_args[key_];
TQRegExp rx2(TQString::fromLatin1("['\"]%1\\1")); TQRegExp rx2(TQString::fromLatin1("['\"]%1\\1"));
args.replace(rx2, TQString::fromLatin1("%1")); args.replace(rx2, TQString::fromLatin1("%1"));
startSearch(parseArguments(args.tqarg(value))); // replace %1 with search value startSearch(parseArguments(args.arg(value))); // replace %1 with search value
} }
void ExecExternalFetcher::startSearch(const TQStringList& args_) { void ExecExternalFetcher::startSearch(const TQStringList& args_) {

@ -98,7 +98,7 @@ void Manager::loadFetchers() {
KConfigGroup configGroup(config, TQString::fromLatin1("Data Sources")); KConfigGroup configGroup(config, TQString::fromLatin1("Data Sources"));
int nSources = configGroup.readNumEntry("Sources Count", 0); int nSources = configGroup.readNumEntry("Sources Count", 0);
for(int i = 0; i < nSources; ++i) { for(int i = 0; i < nSources; ++i) {
TQString group = TQString::fromLatin1("Data Source %1").tqarg(i); TQString group = TQString::fromLatin1("Data Source %1").arg(i);
Fetcher::Ptr f = createFetcher(config, group); Fetcher::Ptr f = createFetcher(config, group);
if(f) { if(f) {
m_configMap.insert(f, group); m_configMap.insert(f, group);
@ -374,7 +374,7 @@ Tellico::Fetch::FetcherVec Manager::createUpdateFetchers(int collType_) {
KConfigGroup config(KGlobal::config(), "Data Sources"); KConfigGroup config(KGlobal::config(), "Data Sources");
int nSources = config.readNumEntry("Sources Count", 0); int nSources = config.readNumEntry("Sources Count", 0);
for(int i = 0; i < nSources; ++i) { for(int i = 0; i < nSources; ++i) {
TQString group = TQString::fromLatin1("Data Source %1").tqarg(i); TQString group = TQString::fromLatin1("Data Source %1").arg(i);
// needs the KConfig* // needs the KConfig*
Fetcher::Ptr f = createFetcher(KGlobal::config(), group); Fetcher::Ptr f = createFetcher(KGlobal::config(), group);
if(f && f->canFetch(collType_) && f->canUpdate()) { if(f && f->canFetch(collType_) && f->canUpdate()) {

@ -61,7 +61,7 @@ GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
int x = versionRx.cap(1).toInt(); int x = versionRx.cap(1).toInt();
int y = versionRx.cap(2).toInt(); int y = versionRx.cap(2).toInt();
int z = versionRx.cap(3).toInt(); // ok to be empty int z = versionRx.cap(3).toInt(); // ok to be empty
myDebug() << TQString::fromLatin1("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 // --list-plugins argument was added for 1.3 release
pluginParse = (x >= 1 && y >=3) ? New : Old; pluginParse = (x >= 1 && y >=3) ? New : Old;
} }

@ -85,7 +85,7 @@ void GoogleScholarFetcher::doSearch() {
// myDebug() << "GoogleScholarFetcher::search() - value = " << value_ << endl; // myDebug() << "GoogleScholarFetcher::search() - value = " << value_ << endl;
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -95,7 +95,7 @@ void GoogleScholarFetcher::doSearch() {
switch(m_key) { switch(m_key) {
case Title: case Title:
u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("allintitle:%1").tqarg(m_value)); u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("allintitle:%1").arg(m_value));
break; break;
case Keyword: case Keyword:
@ -103,7 +103,7 @@ void GoogleScholarFetcher::doSearch() {
break; break;
case Person: case Person:
u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("author:%1").tqarg(m_value)); u.addQueryItem(TQString::fromLatin1("q"), TQString::fromLatin1("author:%1").arg(m_value));
break; break;
default: default:

@ -69,7 +69,7 @@ void IBSFetcher::search(FetchKey key_, const TQString& value_) {
KURL u(TQString::fromLatin1(IBS_BASE_URL)); KURL u(TQString::fromLatin1(IBS_BASE_URL));
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -305,7 +305,7 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
Data::EntryPtr entry = new Data::Entry(coll); Data::EntryPtr entry = new Data::Entry(coll);
for(TQMap<TQString, TQString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it) { for(TQMap<TQString, TQString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it) {
TQRegExp infoRx(pat.tqarg(it.key())); TQRegExp infoRx(pat.arg(it.key()));
pos = infoRx.search(str_); pos = infoRx.search(str_);
if(pos > -1) { if(pos > -1) {
if(it.data() == Latin1Literal("edition")) { if(it.data() == Latin1Literal("edition")) {
@ -326,14 +326,14 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
if(!isbn.isEmpty()) { if(!isbn.isEmpty()) {
entry->setField(TQString::fromLatin1("isbn"), isbn); entry->setField(TQString::fromLatin1("isbn"), isbn);
#if 1 #if 1
TQString imgURL = TQString::fromLatin1("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; myLog() << "IBSFetcher() - cover = " << imgURL << endl;
TQString id = ImageFactory::addImage(imgURL, true, TQString::fromLatin1("http://internetbookshop.it")); TQString id = ImageFactory::addImage(imgURL, true, TQString::fromLatin1("http://internetbookshop.it"));
if(!id.isEmpty()) { if(!id.isEmpty()) {
entry->setField(TQString::fromLatin1("cover"), id); entry->setField(TQString::fromLatin1("cover"), id);
} }
#else #else
TQRegExp imgRx(TQString::fromLatin1("<img\\s+[^>]*\\s*src\\s*=\\s*\"(http://[^/]*\\.ibs\\.it/[^\"]+e=%1)").tqarg(isbn)); TQRegExp imgRx(TQString::fromLatin1("<img\\s+[^>]*\\s*src\\s*=\\s*\"(http://[^/]*\\.ibs\\.it/[^\"]+e=%1)").arg(isbn));
imgRx.setMinimal(true); imgRx.setMinimal(true);
pos = imgRx.search(str_); pos = imgRx.search(str_);
if(pos > -1) { if(pos > -1) {

@ -538,7 +538,7 @@ void IMDBFetcher::parseMultipleNameResults() {
} }
nameMap.insert(s, nameMap[s] + 1); nameMap.insert(s, nameMap[s] + 1);
// check for duplicate names // check for duplicate names
s += TQString::fromLatin1("(%1) ").tqarg(nameMap[s]); s += TQString::fromLatin1("(%1) ").arg(nameMap[s]);
} else { } else {
nameMap.insert(s, 1); nameMap.insert(s, 1);
} }
@ -561,7 +561,7 @@ void IMDBFetcher::parseMultipleNameResults() {
} }
nameMap.insert(s, nameMap[s] + 1); nameMap.insert(s, nameMap[s] + 1);
// check for duplicate names // check for duplicate names
s += TQString::fromLatin1(" (%1)").tqarg(nameMap[s]); s += TQString::fromLatin1(" (%1)").arg(nameMap[s]);
} else { } else {
nameMap.insert(s, 1); nameMap.insert(s, 1);
} }

@ -76,7 +76,7 @@ void ISBNdbFetcher::search(FetchKey key_, const TQString& value_) {
m_countOffset = 0; m_countOffset = 0;
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -244,7 +244,7 @@ void ISBNdbFetcher::slotComplete(KIO::Job* job_) {
const int currentTotal = TQMIN(m_total, m_limit); const int currentTotal = TQMIN(m_total, m_limit);
if(m_page * ISBNDB_RETURNS_PER_REQUEST < currentTotal) { if(m_page * ISBNDB_RETURNS_PER_REQUEST < currentTotal) {
int foundCount = (m_page-1) * ISBNDB_RETURNS_PER_REQUEST + coll->entryCount(); 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::Status); message(i18n("Results from %1: %2/%3").arg(source()).arg(foundCount).arg(m_total), MessageHandler::Status);
++m_page; ++m_page;
m_countOffset = 0; m_countOffset = 0;
doSearch(); doSearch();

@ -453,7 +453,7 @@ SRUConfigWidget::SRUConfigWidget(TQWidget* parent_, const SRUFetcher* fetcher_ /
m_portSpinBox = new KIntSpinBox(0, 999999, 1, SRU_DEFAULT_PORT, 10, optionsWidget()); m_portSpinBox = new KIntSpinBox(0, 999999, 1, SRU_DEFAULT_PORT, 10, optionsWidget());
connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified())); connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified()));
l->addWidget(m_portSpinBox, row, 1); 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(label, w);
TQWhatsThis::add(m_portSpinBox, w); TQWhatsThis::add(m_portSpinBox, w);
label->setBuddy(m_portSpinBox); label->setBuddy(m_portSpinBox);

@ -91,7 +91,7 @@ void YahooFetcher::doSearch() {
u.addQueryItem(TQString::fromLatin1("results"), TQString::number(YAHOO_MAX_RETURNS_TOTAL)); u.addQueryItem(TQString::fromLatin1("results"), TQString::number(YAHOO_MAX_RETURNS_TOTAL));
if(!canFetch(Kernel::self()->collectionType())) { 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(); stop();
return; return;
} }
@ -237,7 +237,7 @@ Tellico::Data::EntryPtr YahooFetcher::fetchEntry(uint uid_) {
TQString id = ImageFactory::addImage(imageURL, true); TQString id = ImageFactory::addImage(imageURL, true);
if(id.isEmpty()) { if(id.isEmpty()) {
// rich text causes tqlayout issues // rich text causes tqlayout issues
// emit signalStatus(i18n("<qt>The cover image for <i>%1</i> could not be loaded.</qt>").tqarg( // emit signalStatus(i18n("<qt>The cover image for <i>%1</i> could not be loaded.</qt>").arg(
// entry->field(TQString::fromLatin1("title")))); // entry->field(TQString::fromLatin1("title"))));
message(i18n("The cover image could not be loaded."), MessageHandler::Warning); message(i18n("The cover image could not be loaded."), MessageHandler::Warning);
} else { } else {

@ -170,7 +170,7 @@ void Z3950Connection::run() {
ZOOM_query_destroy(query); ZOOM_query_destroy(query);
m_connected = false; 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()) { if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")"; s += " (" + toString(addinfo) + ")";
} }
@ -342,7 +342,7 @@ bool Z3950Connection::makeConnection() {
ZOOM_connection_destroy(d->conn); ZOOM_connection_destroy(d->conn);
m_connected = false; 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()) { if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")"; s += " (" + toString(addinfo) + ")";
} }

@ -541,7 +541,7 @@ Z3950Fetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const Z3950Fetcher*
m_portSpinBox = new KIntSpinBox(0, 999999, 1, Z3950_DEFAULT_PORT, 10, optionsWidget()); m_portSpinBox = new KIntSpinBox(0, 999999, 1, Z3950_DEFAULT_PORT, 10, optionsWidget());
connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified())); connect(m_portSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetModified()));
l->addWidget(m_portSpinBox, row, 1); 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(label, w);
TQWhatsThis::add(m_portSpinBox, w); TQWhatsThis::add(m_portSpinBox, w);
label->setBuddy(m_portSpinBox); label->setBuddy(m_portSpinBox);

@ -442,7 +442,7 @@ void FetchDialog::slotAddEntry() {
Fetch::SearchResult* r = item->m_result; Fetch::SearchResult* r = item->m_result;
Data::EntryPtr entry = m_entries[r->uid]; Data::EntryPtr entry = m_entries[r->uid];
if(!entry) { if(!entry) {
setStatus(i18n("Fetching %1...").tqarg(r->title)); setStatus(i18n("Fetching %1...").arg(r->title));
startProgress(); startProgress();
entry = r->fetchEntry(); entry = r->fetchEntry();
if(!entry) { if(!entry) {
@ -494,7 +494,7 @@ void FetchDialog::slotShowEntry() {
SearchResultItem* item = static_cast<SearchResultItem*>(items.getFirst()); SearchResultItem* item = static_cast<SearchResultItem*>(items.getFirst());
Fetch::SearchResult* r = item->m_result; Fetch::SearchResult* r = item->m_result;
setStatus(i18n("Fetching %1...").tqarg(r->title)); setStatus(i18n("Fetching %1...").arg(r->title));
Data::EntryPtr entry = m_entries[r->uid]; Data::EntryPtr entry = m_entries[r->uid];
if(!entry) { if(!entry) {
GUI::CursorSaver cs; GUI::CursorSaver cs;

@ -398,7 +398,7 @@ TQString Field::capitalize(TQString str_) {
return str_; return str_;
} }
// first letter is always capitalized // 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 // 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) { for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) { if(word.lower().startsWith(*it)) {
uint l = (*it).length(); uint l = (*it).length();
str_.replace(l, 1, str_.tqat(l).upper()); str_.replace(l, 1, str_.at(l).upper());
break; break;
} }
} }
@ -435,7 +435,7 @@ TQString Field::capitalize(TQString str_) {
for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) { for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) { if(word.lower().startsWith(*it)) {
uint l = (*it).length(); 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; aposMatch = true;
break; break;
} }
@ -444,7 +444,7 @@ TQString Field::capitalize(TQString str_) {
if(!aposMatch) { if(!aposMatch) {
wordRx.setPattern(TQChar('^') + TQRegExp::escape(word) + TQChar('$')); wordRx.setPattern(TQChar('^') + TQRegExp::escape(word) + TQChar('$'));
if(notCap.grep(wordRx).isEmpty() && nextPos-pos > 1) { 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());
} }
} }

@ -65,7 +65,7 @@ FileHandler::FileRef::FileRef(const KURL& url_, bool quiet_, bool allowCompresse
myDebug() << s << endl; myDebug() << s << endl;
} }
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
} }
return; return;
} }
@ -107,7 +107,7 @@ bool FileHandler::FileRef::open(bool quiet_) {
if(!quiet_) { if(!quiet_) {
KURL u; KURL u;
u.setPath(fileName()); u.setPath(fileName());
Kernel::self()->sorry(i18n(errorLoad).tqarg(u.fileName())); Kernel::self()->sorry(i18n(errorLoad).arg(u.fileName()));
} }
delete m_device; delete m_device;
m_device = 0; 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(!doc.setContent(f.file(), processNamespace_, &errorMsg, &errorLine, &errorColumn)) {
if(!quiet_) { if(!quiet_) {
TQString details = i18n("There is an XML parsing error in line %1, column %2.").tqarg(errorLine).tqarg(errorColumn); TQString details = i18n("There is an XML parsing error in line %1, column %2.").arg(errorLine).arg(errorColumn);
details += TQString::fromLatin1("\n"); details += TQString::fromLatin1("\n");
details += i18n("The error message from TQt is:"); details += i18n("The error message from TQt is:");
details += TQString::fromLatin1("\n\t") + errorMsg; details += TQString::fromLatin1("\n\t") + errorMsg;
GUI::CursorSaver cs(TQt::arrowCursor); 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(); return TQDomDocument();
} }
@ -188,7 +188,7 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_,
if(!KIO::NetAccess::synchronousRun(job, Kernel::self()->widget())) { if(!KIO::NetAccess::synchronousRun(job, Kernel::self()->widget())) {
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
} }
return 0; return 0;
} }
@ -203,7 +203,7 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_)
Data::Image* img = new Data::Image(f.fileName()); Data::Image* img = new Data::Image(f.fileName());
if(img->isNull() && !quiet_) { 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); Kernel::self()->sorry(str);
} }
return img; return img;
@ -218,7 +218,7 @@ bool FileHandler::queryExists(const KURL& url_) {
if(url_ != Kernel::self()->URL()) { if(url_ != Kernel::self()->URL()) {
GUI::CursorSaver cs(TQt::arrowCursor); GUI::CursorSaver cs(TQt::arrowCursor);
TQString str = i18n("A file named \"%1\" already exists. " 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, int want_continue = KMessageBox::warningContinueCancel(Kernel::self()->widget(), str,
i18n("Overwrite File?"), i18n("Overwrite File?"),
i18n("Overwrite")); i18n("Overwrite"));
@ -259,7 +259,7 @@ bool FileHandler::queryExists(const KURL& url_) {
false /* resume */, Kernel::self()->widget()); false /* resume */, Kernel::self()->widget());
} }
if(!success) { if(!success) {
Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName() + '~')); Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName() + '~'));
} }
return success; return success;
} }
@ -288,7 +288,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
KSaveFile f(url_.path()); KSaveFile f(url_.path());
if(f.status() != 0) { if(f.status() != 0) {
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
} }
return false; return false;
} }
@ -307,7 +307,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
if(f.status() != 0) { if(f.status() != 0) {
tempfile.unlink(); tempfile.unlink();
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
} }
return false; return false;
} }
@ -318,7 +318,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc
if(!uploaded) { if(!uploaded) {
tempfile.unlink(); tempfile.unlink();
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorUpload).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorUpload).arg(url_.fileName()));
} }
success = false; success = false;
} }
@ -369,7 +369,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
KSaveFile f(url_.path()); KSaveFile f(url_.path());
if(f.status() != 0) { if(f.status() != 0) {
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
} }
return false; return false;
} }
@ -387,7 +387,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
KSaveFile f(tempfile.name()); KSaveFile f(tempfile.name());
if(f.status() != 0) { if(f.status() != 0) {
if(!quiet_) { if(!quiet_) {
Kernel::self()->sorry(i18n(errorWrite).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorWrite).arg(url_.fileName()));
} }
return false; return false;
} }
@ -396,7 +396,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool
if(success) { if(success) {
success = KIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget()); success = KIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget());
if(!success && !quiet_) { if(!success && !quiet_) {
Kernel::self()->sorry(i18n(errorUpload).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorUpload).arg(url_.fileName()));
} }
} }
tempfile.unlink(); tempfile.unlink();

@ -122,7 +122,7 @@ void FilterView::modifyEntry(Data::EntryPtr entry_) {
for(TQListViewItem* item = firstChild(); item; item = item->nextSibling()) { for(TQListViewItem* item = firstChild(); item; item = item->nextSibling()) {
bool hasEntry = false; bool hasEntry = false;
TQListViewItem* entryItem = 0; 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()) { for(TQListViewItem* i = item->firstChild(); i; i = i->nextSibling()) {
if(static_cast<EntryItem*>(i)->entry() == entry_) { if(static_cast<EntryItem*>(i)->entry() == entry_) {
i->setText(0, entry_->title()); i->setText(0, entry_->title());
@ -146,7 +146,7 @@ void FilterView::modifyEntry(Data::EntryPtr entry_) {
void FilterView::removeEntries(Data::EntryVec entries_) { void FilterView::removeEntries(Data::EntryVec entries_) {
// the group modified signal gets handles separately, this is just for filters // the group modified signal gets handles separately, this is just for filters
for(TQListViewItem* item = firstChild(); item; item = item->nextSibling()) { 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(); TQListViewItem* c1 = item->firstChild();
while(c1) { while(c1) {
if(entries_.contains(static_cast<EntryItem*>(c1)->entry())) { if(entries_.contains(static_cast<EntryItem*>(c1)->entry())) {

@ -17,7 +17,7 @@
using Tellico::GroupIterator; using Tellico::GroupIterator;
GroupIterator::GroupIterator(const TQListView* view_) { 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<GUI::ListViewItem*>(view_->firstChild()); m_item = static_cast<GUI::ListViewItem*>(view_->firstChild());
} }

@ -463,7 +463,7 @@ void GroupView::updateHeader(Data::FieldPtr field_/*=0*/) {
if(sortStyle() == ListView::SortByText) { if(sortStyle() == ListView::SortByText) {
setColumnText(0, t); setColumnText(0, t);
} else { } else {
setColumnText(0, i18n("%1 (Sort by Count)").tqarg(t)); setColumnText(0, i18n("%1 (Sort by Count)").arg(t));
} }
} }

@ -73,7 +73,7 @@ public:
*/ */
void addCollection(Data::CollPtr coll); 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 * @param coll A pointer to the collection
*/ */

@ -73,7 +73,7 @@ void CountedItem::paintCell(TQPainter* p_, const TQColorGroup& cg_,
} }
TQFontMetrics fm = p_->fontMetrics(); TQFontMetrics fm = p_->fontMetrics();
TQString numText = TQString::fromLatin1(" (%1)").tqarg(count()); TQString numText = TQString::fromLatin1(" (%1)").arg(count());
// don't call CountedListViewItem::width() because that includes the count already // don't call CountedListViewItem::width() because that includes the count already
int w = ListViewItem::width(fm, listView(), column_); int w = ListViewItem::width(fm, listView(), column_);
int countWidth = fm.width(numText); 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 // show count is only for first column
if(column_ == 0) { if(column_ == 0) {
TQString numText = TQString::fromLatin1(" (%1)").tqarg(count()); TQString numText = TQString::fromLatin1(" (%1)").arg(count());
w += fm_.width(numText) + 2; // add a little pad w += fm_.width(numText) + 2; // add a little pad
} }
return w; return w;

@ -98,7 +98,7 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n
} }
Data::Field::Type type = field_->type(); 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) { if(type == Data::Field::URL) {
// set URL to null for now // set URL to null for now
m_label = new KURLLabel(TQString(), s, this); m_label = new KURLLabel(TQString(), s, this);
@ -192,7 +192,7 @@ void FieldWidget::registerWidget() {
void FieldWidget::updateField(Data::FieldPtr oldField_, Data::FieldPtr newField_) { void FieldWidget::updateField(Data::FieldPtr oldField_, Data::FieldPtr newField_) {
m_field = 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(); updateGeometry();
TQWhatsThis::add(this, newField_->description()); TQWhatsThis::add(this, newField_->description());
updateFieldHook(oldField_, newField_); updateFieldHook(oldField_, newField_);

@ -179,7 +179,7 @@ void ImageWidget::mousePressEvent(TQMouseEvent* event_) {
if(event_->button() == Qt::LeftButton) { if(event_->button() == Qt::LeftButton) {
// Store the position of the mouse press. // Store the position of the mouse press.
// check if position is inside the label // 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(); m_dragStart = event_->pos();
} else { } else {
m_dragStart = TQPoint(); m_dragStart = TQPoint();

@ -34,25 +34,25 @@ LineEdit::LineEdit(TQWidget* parent_, const char* name_) : KLineEdit(parent_, na
void LineEdit::clear() { void LineEdit::clear() {
KLineEdit::clear(); KLineEdit::clear();
m_drawHint = true; m_drawHint = true;
tqrepaint(); repaint();
} }
void LineEdit::setText(const TQString& text_) { void LineEdit::setText(const TQString& text_) {
m_drawHint = text_.isEmpty(); m_drawHint = text_.isEmpty();
tqrepaint(); repaint();
KLineEdit::setText(text_); KLineEdit::setText(text_);
} }
void LineEdit::setHint(const TQString& hint_) { void LineEdit::setHint(const TQString& hint_) {
m_hint = hint_; m_hint = hint_;
m_drawHint = text().isEmpty(); m_drawHint = text().isEmpty();
tqrepaint(); repaint();
} }
void LineEdit::focusInEvent(TQFocusEvent* event_) { void LineEdit::focusInEvent(TQFocusEvent* event_) {
if(m_drawHint) { if(m_drawHint) {
m_drawHint = false; m_drawHint = false;
tqrepaint(); repaint();
} }
KLineEdit::focusInEvent(event_); KLineEdit::focusInEvent(event_);
} }
@ -60,7 +60,7 @@ void LineEdit::focusInEvent(TQFocusEvent* event_) {
void LineEdit::focusOutEvent(TQFocusEvent* event_) { void LineEdit::focusOutEvent(TQFocusEvent* event_) {
if(text().isEmpty()) { if(text().isEmpty()) {
m_drawHint = true; m_drawHint = true;
tqrepaint(); repaint();
} }
KLineEdit::focusOutEvent(event_); KLineEdit::focusOutEvent(event_);
} }

@ -147,7 +147,7 @@ int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem
void ListView::setShadeSortColumn(bool shade_) { void ListView::setShadeSortColumn(bool shade_) {
if(m_shadeSortColumn != shade_) { if(m_shadeSortColumn != shade_) {
m_shadeSortColumn = shade_; m_shadeSortColumn = shade_;
tqrepaint(); repaint();
} }
} }
#endif #endif
@ -181,7 +181,7 @@ void ListView::slotUpdateColors() {
} }
#endif #endif
Tellico::updateContrastColor(viewport()->colorGroup()); Tellico::updateContrastColor(viewport()->colorGroup());
tqrepaint(); repaint();
} }
void ListView::slotSelectionChanged() { void ListView::slotSelectionChanged() {
@ -196,7 +196,7 @@ void ListView::slotSelectionChanged() {
m_isClear = false; m_isClear = false;
Data::EntryVec entries; 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) { for(GUI::ListViewItemListIt it(m_selectedItems); it.current(); ++it) {
Data::EntryVec more = it.current()->entries(); Data::EntryVec more = it.current()->entries();
for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) { for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) {
@ -214,8 +214,8 @@ void ListView::slotDoubleClicked(TQListViewItem* item_) {
return; return;
} }
// if it has tqchildren, just open it // if it has children, just open it
// but some items delay tqchildren creation // but some items delay children creation
if(static_cast<ListViewItem*>(item_)->realChildCount() > 0) { if(static_cast<ListViewItem*>(item_)->realChildCount() > 0) {
item_->setOpen(!item_->isOpen()); item_->setOpen(!item_->isOpen());
} }
@ -234,8 +234,8 @@ void ListView::drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy,
/* ****************** ListViewItem ********************* */ /* ****************** ListViewItem ********************* */
ListViewItem::~ListViewItem() { ListViewItem::~ListViewItem() {
// I think there's a bug in qt where the tqchildren of this item are deleted after the item itself // 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 tqchildren, that obvious causes // 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! // a problem with updating the selection. So we MUST call clear() here ourselves!
clear(); clear();
// be sure to remove from selected list when it's deleted // be sure to remove from selected list when it's deleted

@ -162,7 +162,7 @@ public:
*/ */
virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!! virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!!
virtual void paintCell(TQPainter* painter, const TQColorGroup& colorGroup, virtual void paintCell(TQPainter* painter, const TQColorGroup& colorGroup,
int column, int width, int tqalignment); int column, int width, int alignment);
ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); } ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); }

@ -43,7 +43,7 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) {
return *pixmaps[n]; return *pixmaps[n];
} }
TQString picName = TQString::fromLatin1("stars%1").tqarg(n); TQString picName = TQString::fromLatin1("stars%1").arg(n);
TQPixmap* pix = new TQPixmap(UserIcon(picName)); TQPixmap* pix = new TQPixmap(UserIcon(picName));
pixmaps.insert(n, pix); pixmaps.insert(n, pix);
return *pix; return *pix;

@ -182,7 +182,7 @@ void TableFieldWidget::slotRenameColumn() {
name, &ok, this); name, &ok, this);
if(ok && !newName.isEmpty()) { if(ok && !newName.isEmpty()) {
Data::FieldPtr newField = new Data::Field(*m_field); Data::FieldPtr newField = new Data::Field(*m_field);
newField->setProperty(TQString::fromLatin1("column%1").tqarg(m_col+1), newName); newField->setProperty(TQString::fromLatin1("column%1").arg(m_col+1), newName);
if(Kernel::self()->modifyField(newField)) { if(Kernel::self()->modifyField(newField)) {
m_field = newField; m_field = newField;
labelColumns(m_field); labelColumns(m_field);
@ -201,9 +201,9 @@ bool TableFieldWidget::emptyRow(int row_) const {
void TableFieldWidget::labelColumns(Data::FieldPtr field_) { void TableFieldWidget::labelColumns(Data::FieldPtr field_) {
for(int i = 0; i < m_columns; ++i) { for(int i = 0; i < m_columns; ++i) {
TQString s = field_->property(TQString::fromLatin1("column%1").tqarg(i+1)); TQString s = field_->property(TQString::fromLatin1("column%1").arg(i+1));
if(s.isEmpty()) { if(s.isEmpty()) {
s = i18n("Column %1").tqarg(i+1); s = i18n("Column %1").arg(i+1);
} }
m_table->horizontalHeader()->setLabel(i, s); m_table->horizontalHeader()->setLabel(i, s);
} }

@ -923,7 +923,7 @@ void MainWindow::saveOptions() {
} }
void MainWindow::readCollectionOptions(Data::CollPtr coll_) { void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
KConfigGroup group(KGlobal::config(), TQString::fromLatin1("Options - %1").tqarg(coll_->typeName())); KConfigGroup group(KGlobal::config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString defaultGroup = coll_->defaultGroupField(); TQString defaultGroup = coll_->defaultGroupField();
TQString entryGroup; TQString entryGroup;
@ -932,9 +932,9 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
} else { } else {
KURL url = Kernel::self()->URL(); KURL url = Kernel::self()->URL();
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) { for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
KURL u = group.readEntry(TQString::fromLatin1("URL_%1").tqarg(i)); KURL u = group.readEntry(TQString::fromLatin1("URL_%1").arg(i));
if(url == u) { if(url == u) {
entryGroup = group.readEntry(TQString::fromLatin1("Group By_%1").tqarg(i), defaultGroup); entryGroup = group.readEntry(TQString::fromLatin1("Group By_%1").arg(i), defaultGroup);
break; break;
} }
} }
@ -965,7 +965,7 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
} }
int configIndex = -1; int configIndex = -1;
KConfigGroup config(KGlobal::config(), TQString::fromLatin1("Options - %1").tqarg(coll_->typeName())); KConfigGroup config(KGlobal::config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString groupName; TQString groupName;
if(m_entryGrouping->currentItem() > -1 && if(m_entryGrouping->currentItem() > -1 &&
static_cast<int>(coll_->entryGroups().count()) > m_entryGrouping->currentItem()) { static_cast<int>(coll_->entryGroups().count()) > m_entryGrouping->currentItem()) {
@ -981,8 +981,8 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
TQValueList<KURL> urls = TQValueList<KURL>() << url; TQValueList<KURL> urls = TQValueList<KURL>() << url;
TQStringList groupBys = TQStringList() << groupName; TQStringList groupBys = TQStringList() << groupName;
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) { for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
KURL u = config.readEntry(TQString::fromLatin1("URL_%1").tqarg(i)); KURL u = config.readEntry(TQString::fromLatin1("URL_%1").arg(i));
TQString g = config.readEntry(TQString::fromLatin1("Group By_%1").tqarg(i)); TQString g = config.readEntry(TQString::fromLatin1("Group By_%1").arg(i));
if(!u.isEmpty() && url != u) { if(!u.isEmpty() && url != u) {
urls.append(u); urls.append(u);
groupBys.append(g); groupBys.append(g);
@ -992,8 +992,8 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
} }
uint limit = TQMIN(urls.count(), Config::maxCustomURLSettings()); uint limit = TQMIN(urls.count(), Config::maxCustomURLSettings());
for(uint i = 0; i < limit; ++i) { for(uint i = 0; i < limit; ++i) {
config.writeEntry(TQString::fromLatin1("URL_%1").tqarg(i), urls[i].url()); config.writeEntry(TQString::fromLatin1("URL_%1").arg(i), urls[i].url());
config.writeEntry(TQString::fromLatin1("Group By_%1").tqarg(i), groupBys[i]); config.writeEntry(TQString::fromLatin1("Group By_%1").arg(i), groupBys[i]);
} }
} }
m_detailedView->saveConfig(coll_, configIndex); m_detailedView->saveConfig(coll_, configIndex);
@ -1531,20 +1531,20 @@ void MainWindow::slotEntryCount() {
} }
int count = coll->entryCount(); 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 selectCount = Controller::self()->selectedEntries().count();
int filterCount = m_detailedView->visibleItems(); int filterCount = m_detailedView->visibleItems();
// if more than one book is selected, add the number of selected books // if more than one book is selected, add the number of selected books
if(filterCount < count && selectCount > 1) { if(filterCount < count && selectCount > 1) {
text += TQChar(' '); 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) { } else if(filterCount < count) {
text += TQChar(' '); text += TQChar(' ');
text += i18n("(%1 filtered)").tqarg(filterCount); text += i18n("(%1 filtered)").arg(filterCount);
} else if(selectCount > 1) { } else if(selectCount > 1) {
text += TQChar(' '); text += TQChar(' ');
text += i18n("(%1 selected)").tqarg(selectCount); text += i18n("(%1 selected)").arg(selectCount);
} }
m_statusBar->setCount(text); m_statusBar->setCount(text);
@ -1591,7 +1591,7 @@ void MainWindow::slotHandleConfigChange() {
nocaps != Config::noCapitalizationList() || nocaps != Config::noCapitalizationList() ||
suffixes != Config::nameSuffixList() || suffixes != Config::nameSuffixList() ||
prefixes != Config::surnamePrefixList()) { prefixes != Config::surnamePrefixList()) {
// tqinvalidate all groups // invalidate all groups
Data::Document::self()->collection()->invalidateGroups(); Data::Document::self()->collection()->invalidateGroups();
// refreshing the title causes the group view to refresh // refreshing the title causes the group view to refresh
Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(TQString::fromLatin1("title"))); Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(TQString::fromLatin1("title")));
@ -1650,7 +1650,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
KComboBox* cb = tb->getCombo(m_entryGrouping->itemId(i)); KComboBox* cb = tb->getCombo(m_entryGrouping->itemId(i));
if(cb) { if(cb) {
// qt caches the combobox size and never recalculates the sizeHint() // qt caches the combobox size and never recalculates the sizeHint()
// the source code recommends calling setFont to tqinvalidate the sizeHint // the source code recommends calling setFont to invalidate the sizeHint
cb->setFont(cb->font()); cb->setFont(cb->font());
cb->updateGeometry(); cb->updateGeometry();
} }
@ -1712,7 +1712,7 @@ void MainWindow::doPrint(const TQString& html_) {
#else #else
KPrinter* printer = new KPrinter(TQPrinter::PrinterResolution); 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->setFullPage(false);
printer->setCreator(TQString::fromLatin1("Tellico")); printer->setCreator(TQString::fromLatin1("Tellico"));
printer->setDocName(Data::Document::self()->URL().prettyURL()); printer->setDocName(Data::Document::self()->URL().prettyURL());
@ -1745,7 +1745,7 @@ void MainWindow::doPrint(const TQString& html_) {
p->setPen(TQt::black); p->setPen(TQt::black);
p->setFont(headerFont); 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::AlignLeft, headerLeft);
p->drawText(0, 0, pageWidth, lspace, TQt::AlignRight, headerRight); p->drawText(0, 0, pageWidth, lspace, TQt::AlignRight, headerRight);
@ -2064,7 +2064,7 @@ bool MainWindow::importFile(Import::Format format_, const KURL& url_, Import::Ac
if(!url_.isEmpty() && url_.isValid() && KIO::NetAccess::exists(url_, true, this)) { if(!url_.isEmpty() && url_.isValid() && KIO::NetAccess::exists(url_, true, this)) {
coll = ImportDialog::importURL(format_, url_); coll = ImportDialog::importURL(format_, url_);
} else { } else {
Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
failed = true; failed = true;
} }
@ -2288,7 +2288,7 @@ void MainWindow::updateEntrySources() {
for(Fetch::FetcherVec::Iterator it = vec.begin(); it != vec.end(); ++it) { for(Fetch::FetcherVec::Iterator it = vec.begin(); it != vec.end(); ++it) {
KAction* action = new KAction(actionCollection()); KAction* action = new KAction(actionCollection());
action->setText(it->source()); action->setText(it->source());
action->setToolTip(i18n("Update entry data from %1").tqarg(it->source())); action->setToolTip(i18n("Update entry data from %1").arg(it->source()));
action->setIconSet(Fetch::Manager::fetcherIcon(it.data())); action->setIconSet(Fetch::Manager::fetcherIcon(it.data()));
connect(action, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map())); connect(action, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()));
mapper->setMapping(action, it->source()); mapper->setMapping(action, it->source());
@ -2308,7 +2308,7 @@ void MainWindow::importFile(Import::Format format_, const KURL::List& urls_) {
KURL u = urls_.front(); KURL u = urls_.front();
TQString url = u.isLocalFile() ? u.path() : u.prettyURL(); TQString url = u.isLocalFile() ? u.path() : u.prettyURL();
Kernel::self()->sorry(i18n("Tellico can only import one file of this type at a time. " Kernel::self()->sorry(i18n("Tellico can only import one file of this type at a time. "
"Only %1 will be imported.").tqarg(url)); "Only %1 will be imported.").arg(url));
urls.clear(); urls.clear();
urls = u; urls = u;
} }

@ -299,7 +299,7 @@ public slots:
private: private:
/** /**
* Saves the general options like all toolbar positions and status as well as the * Saves the general options like all toolbar positions and status as well as the
* tqgeometry and the recent file list to the configuration file. * geometry and the recent file list to the configuration file.
*/ */
void saveOptions(); void saveOptions();
/** /**

@ -379,7 +379,7 @@ void Dialog::slotSelected(TQListViewItem* item_) {
if(!license.isEmpty()) { if(!license.isEmpty()) {
license.prepend('(').append(')'); license.prepend('(').append(')');
} }
TQString name = TQString::fromLatin1("%1 %2").tqarg(ENTRYNAME(entry)).tqarg(license); TQString name = TQString::fromLatin1("%1 %2").arg(ENTRYNAME(entry)).arg(license);
TQFont font = m_nameLabel->font(); TQFont font = m_nameLabel->font();
font.setBold(true); font.setBold(true);
font.setItalic(false); font.setItalic(false);

@ -103,7 +103,7 @@ ReportDialog::ReportDialog(TQWidget* parent_, const char* name_/*=0*/)
TQString text = TQString::fromLatin1("<html><style>p{font-weight:bold;width:50%;" TQString text = TQString::fromLatin1("<html><style>p{font-weight:bold;width:50%;"
"margin:20% auto auto auto;text-align:center;" "margin:20% auto auto auto;text-align:center;"
"background:white;color:%1;}</style><body><p>").tqarg(contrastColor.name()) "background:white;color:%1;}</style><body><p>").arg(contrastColor.name())
+ i18n("Select a report template and click <em>Generate</em>.") + ' ' + i18n("Select a report template and click <em>Generate</em>.") + ' '
+ i18n("Some reports may take several seconds to generate for large collections."); + i18n("Some reports may take several seconds to generate for large collections.");
+ TQString::fromLatin1("</p></body></html>"); + TQString::fromLatin1("</p></body></html>");

@ -384,20 +384,20 @@ int Kernel::askAndMerge(Data::EntryPtr entry1_, Data::EntryPtr entry2_, Data::Fi
value2_ = entry2_->field(field_); value2_ = entry2_->field(field_);
} }
TQString text = TQString::fromLatin1("<qt>") TQString text = TQString::fromLatin1("<qt>")
+ i18n("Conflicting values for %1 were found while merging entries.").tqarg(field_->title()) + i18n("Conflicting values for %1 were found while merging entries.").arg(field_->title())
+ TQString::fromLatin1("<br/><center><table><tr>" + TQString::fromLatin1("<br/><center><table><tr>"
"<th>%1</th>" "<th>%1</th>"
"<th>%2</th></tr>").tqarg(title1, title2) "<th>%2</th></tr>").arg(title1, title2)
+ TQString::fromLatin1("<tr><td><em>%1</em></td>").tqarg(value1_) + TQString::fromLatin1("<tr><td><em>%1</em></td>").arg(value1_)
+ TQString::fromLatin1("<td><em>%1</em></td></tr></table></center>").tqarg(value2_) + TQString::fromLatin1("<td><em>%1</em></td></tr></table></center>").arg(value2_)
+ i18n("Please choose which value to keep.") + i18n("Please choose which value to keep.")
+ TQString::fromLatin1("</qt>"); + TQString::fromLatin1("</qt>");
int ret = KMessageBox::warningYesNoCancel(Kernel::self()->widget(), int ret = KMessageBox::warningYesNoCancel(Kernel::self()->widget(),
text, text,
i18n("Merge Entries"), i18n("Merge Entries"),
i18n("Select value from %1").tqarg(title1), i18n("Select value from %1").arg(title1),
i18n("Select value from %1").tqarg(title2)); i18n("Select value from %1").arg(title2));
switch(ret) { switch(ret) {
case KMessageBox::Cancel: return 0; case KMessageBox::Cancel: return 0;
case KMessageBox::Yes: return -1; // keep original value case KMessageBox::Yes: return -1; // keep original value

@ -66,7 +66,7 @@ bool AlexandriaExporter::exec() {
int ret = KMessageBox::warningContinueCancel(Kernel::self()->widget(), int ret = KMessageBox::warningContinueCancel(Kernel::self()->widget(),
i18n("<qt>An Alexandria library called <i>%1</i> already exists. " i18n("<qt>An Alexandria library called <i>%1</i> already exists. "
"Any existing books in that library could be overwritten.</qt>") "Any existing books in that library could be overwritten.</qt>")
.tqarg(coll->title())); .arg(coll->title()));
if(ret == KMessageBox::Cancel) { if(ret == KMessageBox::Cancel) {
return false; return false;
} }

@ -155,9 +155,9 @@ Tellico::Data::CollPtr AudioFileImporter::collection() {
continue; continue;
} }
int disc = discNumber(f); int disc = discNumber(f);
if(disc > 1 && !m_coll->hasField(TQString::fromLatin1("track%1").tqarg(disc))) { if(disc > 1 && !m_coll->hasField(TQString::fromLatin1("track%1").arg(disc))) {
Data::FieldPtr f2 = new Data::Field(TQString::fromLatin1("track%1").tqarg(disc), Data::FieldPtr f2 = new Data::Field(TQString::fromLatin1("track%1").arg(disc),
i18n("Tracks (Disc %1)").tqarg(disc), i18n("Tracks (Disc %1)").arg(disc),
Data::Field::Table); Data::Field::Table);
f2->setFormatFlag(Data::Field::FormatTitle); f2->setFormatFlag(Data::Field::FormatTitle);
f2->setProperty(TQString::fromLatin1("columns"), TQChar('3')); f2->setProperty(TQString::fromLatin1("columns"), TQChar('3'));
@ -167,7 +167,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() {
m_coll->addField(f2); m_coll->addField(f2);
if(changeTrackTitle) { if(changeTrackTitle) {
Data::FieldPtr newTrack = new Data::Field(*m_coll->fieldByName(track)); Data::FieldPtr newTrack = new Data::Field(*m_coll->fieldByName(track));
newTrack->setTitle(i18n("Tracks (Disc %1)").tqarg(1)); newTrack->setTitle(i18n("Tracks (Disc %1)").arg(1));
m_coll->modifyField(newTrack); m_coll->modifyField(newTrack);
changeTrackTitle = false; changeTrackTitle = false;
} }

@ -236,7 +236,7 @@ TQWidget* BibtexExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
} }
void BibtexExporter::readOptions(KConfig* config_) { void BibtexExporter::readOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_expandMacros = group.readBoolEntry("Expand Macros", m_expandMacros); m_expandMacros = group.readBoolEntry("Expand Macros", m_expandMacros);
m_packageURL = group.readBoolEntry("URL Package", m_packageURL); m_packageURL = group.readBoolEntry("URL Package", m_packageURL);
m_skipEmptyKeys = group.readBoolEntry("Skip Empty Keys", m_skipEmptyKeys); m_skipEmptyKeys = group.readBoolEntry("Skip Empty Keys", m_skipEmptyKeys);
@ -249,7 +249,7 @@ void BibtexExporter::readOptions(KConfig* config_) {
} }
void BibtexExporter::saveOptions(KConfig* config_) { void BibtexExporter::saveOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_expandMacros = m_checkExpandMacros->isChecked(); m_expandMacros = m_checkExpandMacros->isChecked();
group.writeEntry("Expand Macros", m_expandMacros); group.writeEntry("Expand Macros", m_expandMacros);
m_packageURL = m_checkPackageURL->isChecked(); m_packageURL = m_checkPackageURL->isChecked();

@ -95,7 +95,7 @@ Tellico::Data::CollPtr BibtexImporter::collection() {
} }
Data::CollPtr coll = readCollection(text, count); Data::CollPtr coll = readCollection(text, count);
if(!coll || coll->entryCount() == 0) { if(!coll || coll->entryCount() == 0) {
setStatusMessage(i18n("No valid bibtex entries were found in file - %1").tqarg(url().fileName())); setStatusMessage(i18n("No valid bibtex entries were found in file - %1").arg(url().fileName()));
continue; continue;
} }
m_coll->addEntries(coll->entries()); m_coll->addEntries(coll->entries());
@ -289,7 +289,7 @@ TQWidget* BibtexImporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
TQButtonGroup* box = new TQVButtonGroup(i18n("Bibtex Options"), m_widget); TQButtonGroup* box = new TQVButtonGroup(i18n("Bibtex Options"), m_widget);
m_readUTF8 = new TQRadioButton(i18n("Use Unicode (UTF-8) encoding"), box); m_readUTF8 = new TQRadioButton(i18n("Use Unicode (UTF-8) encoding"), box);
TQWhatsThis::add(m_readUTF8, i18n("Read the imported file in Unicode (UTF-8).")); TQWhatsThis::add(m_readUTF8, i18n("Read the imported file in Unicode (UTF-8)."));
TQString localStr = i18n("Use user locale (%1) encoding").tqarg( TQString localStr = i18n("Use user locale (%1) encoding").arg(
TQString::fromLatin1(TQTextCodec::codecForLocale()->name())); TQString::fromLatin1(TQTextCodec::codecForLocale()->name()));
m_readLocale = new TQRadioButton(localStr, box); m_readLocale = new TQRadioButton(localStr, box);
m_readLocale->setChecked(true); m_readLocale->setChecked(true);

@ -40,7 +40,7 @@ Tellico::Data::CollPtr BibtexmlImporter::collection() {
void BibtexmlImporter::loadDomDocument() { void BibtexmlImporter::loadDomDocument() {
TQDomElement root = domDocument().documentElement(); TQDomElement root = domDocument().documentElement();
if(root.isNull() || root.localName() != Latin1Literal("file")) { if(root.isNull() || root.localName() != Latin1Literal("file")) {
setStatusMessage(i18n(errorLoad).tqarg(url().fileName())); setStatusMessage(i18n(errorLoad).arg(url().fileName()));
return; return;
} }

@ -144,7 +144,7 @@ zzfree_ast(AST *tree)
} }
/* build a tree (root child1 child2 ... NULL) /* build a tree (root child1 child2 ... NULL)
* If root is NULL, simply make the tqchildren siblings and return ptr * If root is NULL, simply make the children siblings and return ptr
* to 1st sibling (child1). If root is not single node, return NULL. * to 1st sibling (child1). If root is not single node, return NULL.
* *
* Siblings that are actually siblins lists themselves are handled * Siblings that are actually siblins lists themselves are handled

@ -464,7 +464,7 @@ bt_postprocess_entry (AST * top, ushort options)
"invalid node type (not entry root)"); "invalid node type (not entry root)");
strlwr (top->text); /* downcase entry type */ strlwr (top->text); /* downcase entry type */
if (top->down == NULL) return; /* no tqchildren at all */ if (top->down == NULL) return; /* no children at all */
cur = top->down; cur = top->down;
if (cur->nodetype == BTAST_KEY) if (cur->nodetype == BTAST_KEY)

@ -165,7 +165,7 @@ TQWidget* CSVExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
} }
void CSVExporter::readOptions(KConfig* config_) { void CSVExporter::readOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_includeTitles = group.readBoolEntry("Include Titles", m_includeTitles); m_includeTitles = group.readBoolEntry("Include Titles", m_includeTitles);
m_delimiter = group.readEntry("Delimiter", m_delimiter); m_delimiter = group.readEntry("Delimiter", m_delimiter);
} }
@ -182,7 +182,7 @@ void CSVExporter::saveOptions(KConfig* config_) {
m_delimiter = m_editOther->text(); m_delimiter = m_editOther->text();
} }
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
group.writeEntry("Include Titles", m_includeTitles); group.writeEntry("Include Titles", m_includeTitles);
group.writeEntry("Delimiter", m_delimiter); group.writeEntry("Delimiter", m_delimiter);
} }

@ -81,7 +81,7 @@ void FreeDBImporter::readCDROM() {
#ifdef HAVE_KCDDB #ifdef HAVE_KCDDB
TQString drivePath = m_driveCombo->currentText(); TQString drivePath = m_driveCombo->currentText();
if(drivePath.isEmpty()) { if(drivePath.isEmpty()) {
setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").tqarg(drivePath)); setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").arg(drivePath));
myDebug() << "FreeDBImporter::readCDROM() - no drive!" << endl; myDebug() << "FreeDBImporter::readCDROM() - no drive!" << endl;
return; return;
} }
@ -167,7 +167,7 @@ void FreeDBImporter::readCDROM() {
#endif #endif
if(list.isEmpty()) { if(list.isEmpty()) {
setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").tqarg(drivePath)); setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").arg(drivePath));
return; return;
} }
// myDebug() << KCDDB::CDDB::trackOffsetListToId(list) << endl; // myDebug() << KCDDB::CDDB::trackOffsetListToId(list) << endl;
@ -185,9 +185,9 @@ void FreeDBImporter::readCDROM() {
TQStringList list; TQStringList list;
KCDDB::CDInfoList infoList = client.lookupResponse(); KCDDB::CDInfoList infoList = client.lookupResponse();
for(KCDDB::CDInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it) { for(KCDDB::CDInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it) {
list.append(TQString::fromLatin1("%1, %2, %3").tqarg((*it).artist) list.append(TQString::fromLatin1("%1, %2, %3").arg((*it).artist)
.tqarg((*it).title) .arg((*it).title)
.tqarg((*it).genre)); .arg((*it).genre));
} }
// switch back to pointer cursor // switch back to pointer cursor

@ -317,7 +317,7 @@ void HTMLExporter::setFormattingOptions(Data::CollPtr coll) {
} else { } else {
s = coll->fieldTitleByName(m_groupBy[0]); s = coll->fieldTitleByName(m_groupBy[0]);
} }
sortString = i18n("(grouped by %1)").tqarg(s); sortString = i18n("(grouped by %1)").arg(s);
TQString groupFields; TQString groupFields;
for(TQStringList::ConstIterator it = m_groupBy.begin(); it != m_groupBy.end(); ++it) { for(TQStringList::ConstIterator it = m_groupBy.begin(); it != m_groupBy.end(); ++it) {
@ -484,7 +484,7 @@ TQWidget* HTMLExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
} }
void HTMLExporter::readOptions(KConfig* config_) { void HTMLExporter::readOptions(KConfig* config_) {
KConfigGroup exportConfig(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup exportConfig(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_printHeaders = exportConfig.readBoolEntry("Print Field Headers", m_printHeaders); m_printHeaders = exportConfig.readBoolEntry("Print Field Headers", m_printHeaders);
m_printGrouped = exportConfig.readBoolEntry("Print Grouped", m_printGrouped); m_printGrouped = exportConfig.readBoolEntry("Print Grouped", m_printGrouped);
m_exportEntryFiles = exportConfig.readBoolEntry("Export Entry Files", m_exportEntryFiles); m_exportEntryFiles = exportConfig.readBoolEntry("Export Entry Files", m_exportEntryFiles);
@ -496,7 +496,7 @@ void HTMLExporter::readOptions(KConfig* config_) {
} }
void HTMLExporter::saveOptions(KConfig* config_) { void HTMLExporter::saveOptions(KConfig* config_) {
KConfigGroup cfg(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup cfg(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_printHeaders = m_checkPrintHeaders->isChecked(); m_printHeaders = m_checkPrintHeaders->isChecked();
cfg.writeEntry("Print Field Headers", m_printHeaders); cfg.writeEntry("Print Field Headers", m_printHeaders);
m_printGrouped = m_checkPrintGrouped->isChecked(); m_printGrouped = m_checkPrintGrouped->isChecked();
@ -735,7 +735,7 @@ bool HTMLExporter::writeEntryFiles() {
TQStringList dataImages; TQStringList dataImages;
dataImages << TQString::fromLatin1("checkmark.png"); dataImages << TQString::fromLatin1("checkmark.png");
for(uint i = 1; i <= 10; ++i) { for(uint i = 1; i <= 10; ++i) {
dataImages << TQString::fromLatin1("stars%1.png").tqarg(i); dataImages << TQString::fromLatin1("stars%1.png").arg(i);
} }
KURL dataDir; KURL dataDir;
dataDir.setPath(KGlobal::dirs()->findResourceDir("appdata", TQString::fromLatin1("pics/tellico.png")) + "pics/"); dataDir.setPath(KGlobal::dirs()->findResourceDir("appdata", TQString::fromLatin1("pics/tellico.png")) + "pics/");

@ -98,7 +98,7 @@ public:
* Returns a string useful for the ProgressManager * Returns a string useful for the ProgressManager
*/ */
TQString progressLabel() const { TQString progressLabel() const {
if(url().isEmpty()) return i18n("Loading data..."); else return i18n("Loading %1...").tqarg(url().fileName()); if(url().isEmpty()) return i18n("Loading data..."); else return i18n("Loading %1...").arg(url().fileName());
} }
public slots: public slots:

@ -185,14 +185,14 @@ TQWidget* ONIXExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
} }
void ONIXExporter::readOptions(KConfig* config_) { void ONIXExporter::readOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_includeImages = group.readBoolEntry("Include Images", m_includeImages); m_includeImages = group.readBoolEntry("Include Images", m_includeImages);
} }
void ONIXExporter::saveOptions(KConfig* config_) { void ONIXExporter::saveOptions(KConfig* config_) {
m_includeImages = m_checkIncludeImages->isChecked(); m_includeImages = m_checkIncludeImages->isChecked();
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
group.writeEntry("Include Images", m_includeImages); group.writeEntry("Include Images", m_includeImages);
} }

@ -58,7 +58,7 @@ bool PilotDBExporter::exec() {
TQTextCodec* codec = 0; TQTextCodec* codec = 0;
{ {
// Latin1 is default // Latin1 is default
KConfigGroup group(KGlobal::config(), TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(KGlobal::config(), TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
codec = KGlobal::charsets()->codecForName(group.readEntry("Charset")); codec = KGlobal::charsets()->codecForName(group.readEntry("Charset"));
} }
if(!codec) { if(!codec) {
@ -219,12 +219,12 @@ TQWidget* PilotDBExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
} }
void PilotDBExporter::readOptions(KConfig* config_) { void PilotDBExporter::readOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_backup = group.readBoolEntry("Backup", m_backup); m_backup = group.readBoolEntry("Backup", m_backup);
} }
void PilotDBExporter::saveOptions(KConfig* config_) { void PilotDBExporter::saveOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_backup = m_checkBackup->isChecked(); m_backup = m_checkBackup->isChecked();
group.writeEntry("Backup", m_backup); group.writeEntry("Backup", m_backup);
} }

@ -56,11 +56,11 @@ const TQString Tellico::XML::nsZing = TQString::fromLatin1("http://www.loc.gov/z
const TQString Tellico::XML::nsZingDiag = TQString::fromLatin1("http://www.loc.gov/zing/srw/diagnostic/"); const TQString Tellico::XML::nsZingDiag = TQString::fromLatin1("http://www.loc.gov/zing/srw/diagnostic/");
TQString Tellico::XML::pubTellico(int version) { TQString Tellico::XML::pubTellico(int version) {
return TQString::fromLatin1("-//Robby Stephenson/DTD Tellico V%1.0//EN").tqarg(version); return TQString::fromLatin1("-//Robby Stephenson/DTD Tellico V%1.0//EN").arg(version);
} }
TQString Tellico::XML::dtdTellico(int version) { TQString Tellico::XML::dtdTellico(int version) {
return TQString::fromLatin1("http://periapsis.org/tellico/dtd/v%1/tellico.dtd").tqarg(version); return TQString::fromLatin1("http://periapsis.org/tellico/dtd/v%1/tellico.dtd").arg(version);
} }
bool Tellico::XML::validXMLElementName(const TQString& name_) { bool Tellico::XML::validXMLElementName(const TQString& name_) {

@ -109,8 +109,8 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
TQString errorMsg; TQString errorMsg;
int errorLine, errorColumn; int errorLine, errorColumn;
if(!dom.setContent(data_, true, &errorMsg, &errorLine, &errorColumn)) { if(!dom.setContent(data_, true, &errorMsg, &errorLine, &errorColumn)) {
TQString str = i18n(errorLoad).tqarg(url().fileName()) + TQChar('\n'); TQString str = i18n(errorLoad).arg(url().fileName()) + TQChar('\n');
str += i18n("There is an XML parsing error in line %1, column %2.").tqarg(errorLine).tqarg(errorColumn); str += i18n("There is an XML parsing error in line %1, column %2.").arg(errorLine).arg(errorColumn);
str += TQString::fromLatin1("\n"); str += TQString::fromLatin1("\n");
str += i18n("The error message from TQt is:"); str += i18n("The error message from TQt is:");
str += TQString::fromLatin1("\n\t") + errorMsg; str += TQString::fromLatin1("\n\t") + errorMsg;
@ -130,7 +130,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
syntaxVersion = root.attribute(TQString::fromLatin1("version")).toInt(); syntaxVersion = root.attribute(TQString::fromLatin1("version")).toInt();
} else { } else {
if(!url().isEmpty()) { if(!url().isEmpty()) {
setStatusMessage(i18n(errorLoad).tqarg(url().fileName())); setStatusMessage(i18n(errorLoad).arg(url().fileName()));
} }
m_format = Error; m_format = Error;
return; return;
@ -140,7 +140,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
if((syntaxVersion > 6 && root.tagName() != Latin1Literal("tellico")) if((syntaxVersion > 6 && root.tagName() != Latin1Literal("tellico"))
|| (syntaxVersion < 7 && root.tagName() != Latin1Literal("bookcase"))) { || (syntaxVersion < 7 && root.tagName() != Latin1Literal("bookcase"))) {
if(!url().isEmpty()) { if(!url().isEmpty()) {
setStatusMessage(i18n(errorLoad).tqarg(url().fileName())); setStatusMessage(i18n(errorLoad).arg(url().fileName()));
} }
m_format = Error; m_format = Error;
return; return;
@ -148,7 +148,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
if(syntaxVersion > XML::syntaxVersion) { if(syntaxVersion > XML::syntaxVersion) {
if(!url().isEmpty()) { if(!url().isEmpty()) {
TQString str = i18n(errorLoad).tqarg(url().fileName()) + TQChar('\n'); TQString str = i18n(errorLoad).arg(url().fileName()) + TQChar('\n');
str += i18n("It is from a future version of Tellico."); str += i18n("It is from a future version of Tellico.");
myDebug() << str << endl; myDebug() << str << endl;
setStatusMessage(str); setStatusMessage(str);
@ -211,7 +211,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
if(!addFields) { if(!addFields) {
TQString name = fieldelems.item(0).toElement().attribute(TQString::fromLatin1("name")); TQString name = fieldelems.item(0).toElement().attribute(TQString::fromLatin1("name"));
addFields = (name == Latin1Literal("_default")); addFields = (name == Latin1Literal("_default"));
// removeChild only works for immediate tqchildren // removeChild only works for immediate children
// remove _default field // remove _default field
if(addFields) { if(addFields) {
fieldelems.item(0).parentNode().removeChild(fieldelems.item(0)); fieldelems.item(0).parentNode().removeChild(fieldelems.item(0));
@ -458,7 +458,7 @@ void TellicoImporter::readField(uint syntaxVersion_, const TQDomElement& elem_)
Data::Field::convertOldRating(field); // does all its own checking Data::Field::convertOldRating(field); // does all its own checking
} }
m_coll->addField(field); m_coll->addField(field);
// myDebug() << TQString(" Added field: %1, %2").tqarg(field->name()).tqarg(field->title()) << endl; // myDebug() << TQString(" Added field: %1, %2").arg(field->name()).arg(field->title()) << endl;
} }
void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryElem_) { void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryElem_) {
@ -472,7 +472,7 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl
bool oldMusic = (syntaxVersion_ < 9 && m_coll->type() == Data::Collection::Album); bool oldMusic = (syntaxVersion_ < 9 && m_coll->type() == Data::Collection::Album);
// iterate over all field value tqchildren // iterate over all field value children
for(TQDomNode node = entryElem_.firstChild(); !node.isNull(); node = node.nextSibling()) { for(TQDomNode node = entryElem_.firstChild(); !node.isNull(); node = node.nextSibling()) {
TQDomElement elem = node.toElement(); TQDomElement elem = node.toElement();
if(elem.isNull()) { if(elem.isNull()) {
@ -493,7 +493,7 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl
Data::FieldPtr f = m_coll->fieldByName(name); Data::FieldPtr f = m_coll->fieldByName(name);
// if the first child of the node is a text node, just set the attribute text // if the first child of the node is a text node, just set the attribute text
// otherwise, recurse over the node's tqchildren // otherwise, recurse over the node's children
// this is the case for <authors><author>..</author></authors> // this is the case for <authors><author>..</author></authors>
// but if there's nothing but white space, then it's a BaseNode for some reason // but if there's nothing but white space, then it's a BaseNode for some reason
// if(node.firstChild().nodeType() == TQDomNode::TextNode) { // if(node.firstChild().nodeType() == TQDomNode::TextNode) {
@ -586,7 +586,7 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl
} }
entry->setField(name, value); entry->setField(name, value);
} }
} else { // if no field by the tag name, then it has tqchildren, iterate through them } else { // if no field by the tag name, then it has children, iterate through them
// the field name has the final 's', so remove it // the field name has the final 's', so remove it
name.truncate(name.length() - 1); name.truncate(name.length() - 1);
f = m_coll->fieldByName(name); f = m_coll->fieldByName(name);
@ -776,7 +776,7 @@ void TellicoImporter::loadZipData() {
m_zip = new KZip(TQT_TQIODEVICE(m_buffer)); m_zip = new KZip(TQT_TQIODEVICE(m_buffer));
} }
if(!m_zip->open(IO_ReadOnly)) { if(!m_zip->open(IO_ReadOnly)) {
setStatusMessage(i18n(errorLoad).tqarg(url().fileName())); setStatusMessage(i18n(errorLoad).arg(url().fileName()));
m_format = Error; m_format = Error;
delete m_zip; delete m_zip;
m_zip = 0; m_zip = 0;
@ -787,7 +787,7 @@ void TellicoImporter::loadZipData() {
const KArchiveDirectory* dir = m_zip->directory(); const KArchiveDirectory* dir = m_zip->directory();
if(!dir) { if(!dir) {
TQString str = i18n(errorLoad).tqarg(url().fileName()) + TQChar('\n'); TQString str = i18n(errorLoad).arg(url().fileName()) + TQChar('\n');
str += i18n("The file is empty."); str += i18n("The file is empty.");
setStatusMessage(str); setStatusMessage(str);
m_format = Error; m_format = Error;
@ -805,7 +805,7 @@ void TellicoImporter::loadZipData() {
entry = dir->entry(TQString::fromLatin1("bookcase.xml")); entry = dir->entry(TQString::fromLatin1("bookcase.xml"));
} }
if(!entry || !entry->isFile()) { if(!entry || !entry->isFile()) {
TQString str = i18n(errorLoad).tqarg(url().fileName()) + TQChar('\n'); TQString str = i18n(errorLoad).arg(url().fileName()) + TQChar('\n');
str += i18n("The file contains no collection data."); str += i18n("The file contains no collection data.");
setStatusMessage(str); setStatusMessage(str);
m_format = Error; m_format = Error;
@ -913,7 +913,7 @@ bool TellicoImporter::loadAllImages(const KURL& url_) {
KZip zip(url_.path()); KZip zip(url_.path());
if(!zip.open(IO_ReadOnly)) { if(!zip.open(IO_ReadOnly)) {
if(u != url_) { if(u != url_) {
Kernel::self()->sorry(i18n(errorImageLoad).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorImageLoad).arg(url_.fileName()));
} }
u = url_; u = url_;
return false; return false;
@ -922,7 +922,7 @@ bool TellicoImporter::loadAllImages(const KURL& url_) {
const KArchiveDirectory* dir = zip.directory(); const KArchiveDirectory* dir = zip.directory();
if(!dir) { if(!dir) {
if(u != url_) { if(u != url_) {
Kernel::self()->sorry(i18n(errorImageLoad).tqarg(url_.fileName())); Kernel::self()->sorry(i18n(errorImageLoad).arg(url_.fileName()));
} }
u = url_; u = url_;
zip.close(); zip.close();

@ -380,7 +380,7 @@ void TellicoXMLExporter::exportImageXML(TQDomDocument& dom_, TQDomElement& paren
void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& parent_) const { void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& parent_) const {
Data::EntryVec vec = entries(); // need a copy for ::contains(); Data::EntryVec vec = entries(); // need a copy for ::contains();
bool exportAll = collection()->entries().count() == vec.count(); bool exportAll = collection()->entries().count() == vec.count();
// iterate over each group, which are the first tqchildren // iterate over each group, which are the first children
for(GroupIterator gIt = Controller::self()->groupIterator(); gIt.group(); ++gIt) { for(GroupIterator gIt = Controller::self()->groupIterator(); gIt.group(); ++gIt) {
if(gIt.group()->isEmpty()) { if(gIt.group()->isEmpty()) {
continue; continue;
@ -491,14 +491,14 @@ TQWidget* TellicoXMLExporter::widget(TQWidget* parent_, const char* name_/*=0*/)
} }
void TellicoXMLExporter::readOptions(KConfig* config_) { void TellicoXMLExporter::readOptions(KConfig* config_) {
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
m_includeImages = group.readBoolEntry("Include Images", m_includeImages); m_includeImages = group.readBoolEntry("Include Images", m_includeImages);
} }
void TellicoXMLExporter::saveOptions(KConfig* config_) { void TellicoXMLExporter::saveOptions(KConfig* config_) {
m_includeImages = m_checkIncludeImages->isChecked(); m_includeImages = m_checkIncludeImages->isChecked();
KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
group.writeEntry("Include Images", m_includeImages); group.writeEntry("Include Images", m_includeImages);
} }

@ -40,7 +40,7 @@ XMLImporter::XMLImporter(const TQByteArray& data_) : Import::Importer(KURL()) {
TQString errorMsg; TQString errorMsg;
int errorLine, errorColumn; int errorLine, errorColumn;
if(!m_dom.setContent(data_, true, &errorMsg, &errorLine, &errorColumn)) { if(!m_dom.setContent(data_, true, &errorMsg, &errorLine, &errorColumn)) {
TQString str = i18n("There is an XML parsing error in line %1, column %2.").tqarg(errorLine).tqarg(errorColumn); TQString str = i18n("There is an XML parsing error in line %1, column %2.").arg(errorLine).arg(errorColumn);
str += TQString::fromLatin1("\n"); str += TQString::fromLatin1("\n");
str += i18n("The error message from TQt is:"); str += i18n("The error message from TQt is:");
str += TQString::fromLatin1("\n\t") + errorMsg; str += TQString::fromLatin1("\n\t") + errorMsg;
@ -57,7 +57,7 @@ void XMLImporter::setText(const TQString& text_) {
TQString errorMsg; TQString errorMsg;
int errorLine, errorColumn; int errorLine, errorColumn;
if(!m_dom.setContent(text_, true, &errorMsg, &errorLine, &errorColumn)) { if(!m_dom.setContent(text_, true, &errorMsg, &errorLine, &errorColumn)) {
TQString str = i18n("There is an XML parsing error in line %1, column %2.").tqarg(errorLine).tqarg(errorColumn); TQString str = i18n("There is an XML parsing error in line %1, column %2.").arg(errorLine).arg(errorColumn);
str += TQString::fromLatin1("\n"); str += TQString::fromLatin1("\n");
str += i18n("The error message from TQt is:"); str += i18n("The error message from TQt is:");
str += TQString::fromLatin1("\n\t") + errorMsg; str += TQString::fromLatin1("\n\t") + errorMsg;

Loading…
Cancel
Save