diff --git a/src/knowit.cpp b/src/knowit.cpp index beeeac2..040fe3e 100644 --- a/src/knowit.cpp +++ b/src/knowit.cpp @@ -326,7 +326,7 @@ bool Knowit::open(const KURL& fname) TQFile file(fname.path()); if (!file.open(IO_ReadOnly)) { KMessageBox::error(0, i18n("Cannot open file
%1
") - .tqarg(fname.url())); + .arg(fname.url())); if (filename == fname) filename = ""; return false; @@ -376,7 +376,7 @@ bool Knowit::open(const KURL& fname) slotNoteChanged(active); Edit->setModified(false); actionRecent->addURL(filename); - slotStatusMsg(i18n("File %1 opened.").tqarg(filename.fileName())); + slotStatusMsg(i18n("File %1 opened.").arg(filename.fileName())); slotActionUpdate(); file.close(); @@ -392,7 +392,7 @@ bool Knowit::save(const KURL& fname) TQFile file(fname.path()); if (!file.open(IO_WriteOnly)) { KMessageBox::error(0, i18n("Cannot save file
%1
") - .tqarg(fname.url())); + .arg(fname.url())); return false; } if (Items->prevItem && Edit->isModified()) @@ -407,7 +407,7 @@ bool Knowit::save(const KURL& fname) Notes.modified = false; Edit->setModified(false); actionRecent->addURL(filename); - slotStatusMsg(i18n("File %1 saved.").tqarg(filename.fileName())); + slotStatusMsg(i18n("File %1 saved.").arg(filename.fileName())); if (Options.autosave) AutosaveTimer->start(Options.autosave * 60 * 1000, true); return true; @@ -443,13 +443,13 @@ bool Knowit::queryClose() else if (Options.unconditionalSave) { slotFileSave(); return shuttingDown = filename.isEmpty() || !modified() || (KMessageBox::questionYesNo(0, - i18n("File %1
\ncannot be saved. Quit anyway?
").tqarg(filename.fileName())) + i18n("File %1
\ncannot be saved. Quit anyway?
").arg(filename.fileName())) == KMessageBox::Yes); } else switch (KMessageBox::questionYesNoCancel(0, i18n("File %1
\nwas modified. Do you want to save it?
") - .tqarg(filename.isEmpty() ? Untitled : filename.fileName()))) { + .arg(filename.isEmpty() ? Untitled : filename.fileName()))) { case KMessageBox::Yes: slotFileSave(); return shuttingDown = !modified(); @@ -491,7 +491,7 @@ void Knowit::find(TQListViewItem* start) } it++; } - KMessageBox::information(0, i18n("Sought text:
%1
not found.
").tqarg(soughtText)); + KMessageBox::information(0, i18n("Sought text:
%1
not found.
").arg(soughtText)); } @@ -671,7 +671,7 @@ void Knowit::slotNoteRemove() i18n("Are you sure you want to delete note
%1
" "and its subnotes?
") : i18n("Are you sure you want to delete note
%1?
"); - if (KMessageBox::questionYesNo(0, msg.tqarg(elt->text(0))) == KMessageBox::Yes) { + if (KMessageBox::questionYesNo(0, msg.arg(elt->text(0))) == KMessageBox::Yes) { TQListViewItem* parent = elt->parent(); Notes.removeNote(elt); if (!Notes.count()) @@ -884,7 +884,7 @@ void Knowit::slotFileSaveAs() TQFileInfo fileinfo(url.path()); if (fileinfo.exists() && KMessageBox::questionYesNo(0, i18n("File
%1
already exists. Overwrite it?
") - .tqarg(url.path())) == KMessageBox::No) + .arg(url.path())) == KMessageBox::No) return; save(url); } @@ -901,8 +901,8 @@ void Knowit::slotFileInfo() } KMessageBox::information(0, i18n("

%1

" "Document path: %2
" - "Number of notes: %3
").tqarg(filename.fileName()) - .tqarg(filename.path()).tqarg(count)); + "Number of notes: %3").arg(filename.fileName()) + .arg(filename.path()).arg(count)); } @@ -976,7 +976,7 @@ void Knowit::slotFileExport() TQFileInfo fileinfo(url.path()); if (fileinfo.exists() && KMessageBox::questionYesNo(0, i18n("File
%1
already exists. Overwrite it?
") - .tqarg(url.path())) == KMessageBox::No) + .arg(url.path())) == KMessageBox::No) return; int choice = ChooserDlg.getChoice(); TQListViewItem* start = (choice & KnowitChooser::SaveAll) ? @@ -985,8 +985,8 @@ void Knowit::slotFileExport() TQString style; if (choice & KnowitChooser::Style) style = TQString("body {font-family: \"%1\"; color: %2; background-color: %3}") - .tqarg(Edit->family()).tqarg(Edit->paletteForegroundColor().name()) - .tqarg(Edit->paletteBackgroundColor().name()); + .arg(Edit->family()).arg(Edit->paletteForegroundColor().name()) + .arg(Edit->paletteBackgroundColor().name()); Notes.find(start)->saveHTML(url, origname, style, choice); Options.exportFlags = choice; } @@ -1114,7 +1114,7 @@ void Knowit::slotEditInsertDate() Edit->setUnderline(Options.insertDateUnderline); Edit->setColor(TQColor(Options.insertDateColor)); Edit->insert(TQString("%1") - .tqarg(TQDateTime::currentDateTime().toString(Options.insertDateFormat))); + .arg(TQDateTime::currentDateTime().toString(Options.insertDateFormat))); Edit->setItalic(ii); Edit->setBold(ib); Edit->setUnderline(iu); @@ -1134,7 +1134,7 @@ void Knowit::slotEditInsertFile() TQFile file(url.path()); if (!file.open(IO_ReadOnly)) { KMessageBox::error(0, i18n("Cannot open file
%1
") - .tqarg(url.url())); + .arg(url.url())); return; } TQTextStream ts(&file); @@ -1165,10 +1165,10 @@ void Knowit::slotEditChanged() actionBold->setChecked(Edit->bold()); actionItalic->setChecked(Edit->italic()); actionUnderline->setChecked(Edit->underline()); - actionEditAlignLeft->setChecked(Edit->tqalignment() == TQt::AlignLeft); - actionEditAlignRight->setChecked(Edit->tqalignment() == TQt::AlignRight); - actionEditAlignCenter->setChecked(Edit->tqalignment() == TQt::AlignCenter); - actionEditAlignJustify->setChecked(Edit->tqalignment() == TQt::AlignJustify); + actionEditAlignLeft->setChecked(Edit->alignment() == TQt::AlignLeft); + actionEditAlignRight->setChecked(Edit->alignment() == TQt::AlignRight); + actionEditAlignCenter->setChecked(Edit->alignment() == TQt::AlignCenter); + actionEditAlignJustify->setChecked(Edit->alignment() == TQt::AlignJustify); } void Knowit::slotEditCursorChanged(int, int) @@ -1277,7 +1277,7 @@ void Knowit::slotLinkRemove() { TQString msg = i18n("Are you sure you want to remove link:
%1?
"); if (Links->currentItem() != -1 && KMessageBox::questionYesNo(0, - msg.tqarg(Links->currentText())) == KMessageBox::Yes) { + msg.arg(Links->currentText())) == KMessageBox::Yes) { currentNote()->removeLink(Links->currentItem()); Links->removeItem(Links->currentItem()); if (!Links->count()) diff --git a/src/knowit.h b/src/knowit.h index e89fe29..9cae51c 100644 --- a/src/knowit.h +++ b/src/knowit.h @@ -180,11 +180,11 @@ class Knowit : public KMainWindow void slotEditUnderline(); /** Changes color of selected/current text */ void slotEditColor(); - /** Changes vertical tqalignment to superscript */ + /** Changes vertical alignment to superscript */ void slotEditSuperscript(); - /** Changes vertical tqalignment to subscript */ + /** Changes vertical alignment to subscript */ void slotEditSubscript(); - /** Restores normal vertical tqalignment */ + /** Restores normal vertical alignment */ void slotEditNormal(); /** Prompts for text and shows note containing it */ void slotEditFind(); diff --git a/src/knowitchooser.cpp b/src/knowitchooser.cpp index a17bbd8..5f6c755 100644 --- a/src/knowitchooser.cpp +++ b/src/knowitchooser.cpp @@ -36,7 +36,7 @@ KnowitChooser::KnowitChooser(int flags) tqlayout->addWidget(notes = new KComboBox(plainPage(), "Notes")); l1->setBuddy(notes); notes->insertItem(i18n("All")); - notes->insertItem(i18n("Current with tqchildren")); + notes->insertItem(i18n("Current with children")); notes->insertItem(i18n("Current only")); tqlayout->addWidget(l2 = new TQLabel(i18n("&Encoding:"), plainPage())); diff --git a/src/knowitpref.cpp b/src/knowitpref.cpp index 217b4ab..6324600 100644 --- a/src/knowitpref.cpp +++ b/src/knowitpref.cpp @@ -379,7 +379,7 @@ void KnowitPreferences::slotUpdateDatePreview() if(insertDateItalicButton->isOn()) str +=""; if(insertDateUnderlineButton->isOn()) str += ""; str += "color().name()+"\">"; - str += TQString("%1").tqarg(TQDateTime::currentDateTime().toString(insertDateFormatEdit->text())); + str += TQString("%1").arg(TQDateTime::currentDateTime().toString(insertDateFormatEdit->text())); str += ""; if(insertDateUnderlineButton->isOn()) str += ""; if(insertDateItalicButton->isOn()) str +=""; diff --git a/src/notes.cpp b/src/notes.cpp index 733f7f2..1bc32d8 100644 --- a/src/notes.cpp +++ b/src/notes.cpp @@ -51,8 +51,8 @@ TQString TNoteLink::text(int fmt) const if (fmt == LinkOnly || description.isEmpty()) return link; else if (fmt == DescriptionOnly) return description; else if (fmt == LinkDescription) - return TQString("%1 (%2)").tqarg(link).tqarg(description); - else return TQString("%1 (%2)").tqarg(description).tqarg(link); + return TQString("%1 (%2)").arg(link).arg(description); + else return TQString("%1 (%2)").arg(description).arg(link); } TQPixmap TNoteLink::icon() const @@ -238,7 +238,7 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString ts << "\n" "\n\n " << i18n("KnowIt document") << TQString("\n \n").tqarg(ts.codec()->mimeName()); + "content=\"text/html; charset=%1\">\n").arg(ts.codec()->mimeName()); if (!style.isEmpty()) ts << " \n"; ts << "\n\n\n"; @@ -246,7 +246,7 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString TQValueVector Depths; Depths.append(0); if (flags & TOC) { - ts << TQString("

%1

\n").tqarg(i18n("Table of contents")); + ts << TQString("

%1

\n").arg(i18n("Table of contents")); saveHTMLTocEntry(ts, Depths, flags); ts << "\n\n"; } @@ -256,9 +256,9 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString saveHTMLBuf(ts, Depths, flags); TQString epilog = i18n("Exported from %1 by KnowIt %2, %3."); - ts << "


" << epilog.tqarg(origname) - .tqarg(VERSION) - .tqarg(TQDateTime::currentDateTime().toString()) << "\n\n"; + ts << "


" << epilog.arg(origname) + .arg(VERSION) + .arg(TQDateTime::currentDateTime().toString()) << "\n\n"; ts << "\n\n\n"; return true; } @@ -272,12 +272,12 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector& depths, else if (hlevel > 3) hlevel = 3; TQString id, number; for (uint i=0; i%3%4").tqarg(hlevel).tqarg(id).tqarg(number) - .tqarg(item->text(0)).tqarg(hlevel); + ts << TQString("%3%4").arg(hlevel).arg(id).arg(number) + .arg(item->text(0)).arg(hlevel); TQString htmltext = text; int begin = htmltext.find("= 0) begin = htmltext.find(">", begin); @@ -289,14 +289,14 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector& depths, /* save links */ for (TQValueList::Iterator LinkList = links.begin(); LinkList != links.end(); ++LinkList) - ts << TQString("%2
\n").tqarg((*LinkList).link) - .tqarg((*LinkList).text(TNoteLink::DescriptionOnly)); + ts << TQString("%2
\n").arg((*LinkList).link) + .arg((*LinkList).text(TNoteLink::DescriptionOnly)); /* save rule */ if (flags & AddRule) ts << "
\n\n"; else ts << "\n\n"; - /* save tqchildren */ + /* save children */ if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); collection->find(item->firstChild())->saveHTMLBuf(ts, depths, flags); @@ -321,11 +321,11 @@ bool TNote::saveHTMLTocEntry(TQTextStream& ts, TQValueVector& depths, int f TQString id, number; for (uint i=0; i%2%3\n").tqarg(id).tqarg(number). + ts << TQString("
%2%3
\n").arg(id).arg(number). arg(item->text(0)); if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); @@ -397,9 +397,9 @@ void TNote::save(TQTextStream& ts, bool current) const TQString activeheader = "\\CurrentEntry %1 %2\n"; if (current) - ts << activeheader.tqarg(item->depth()).tqarg(item->text(0)); + ts << activeheader.arg(item->depth()).arg(item->text(0)); else - ts << header.tqarg(item->depth()).tqarg(item->text(0)); + ts << header.arg(item->depth()).arg(item->text(0)); for (TQValueList::Iterator LinkList = links.begin(); LinkList != links.end(); ++LinkList) (*LinkList).save(ts);