From 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:51:43 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- quanta/src/document.cpp | 30 ++++++------- quanta/src/document.h | 8 ++-- quanta/src/dtds.cpp | 24 +++++------ quanta/src/kqapp.cpp | 12 +++--- quanta/src/main.cpp | 2 +- quanta/src/quanta.cpp | 104 ++++++++++++++++++++++----------------------- quanta/src/quanta.h | 8 ++-- quanta/src/quanta_init.cpp | 54 +++++++++++------------ quanta/src/quantadoc.cpp | 24 +++++------ quanta/src/quantadoc.h | 2 +- quanta/src/quantaview.cpp | 18 ++++---- quanta/src/quantaview.h | 4 +- quanta/src/viewmanager.cpp | 36 ++++++++-------- 13 files changed, 163 insertions(+), 163 deletions(-) (limited to 'quanta/src') diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp index 0f0d9933..68fe11e9 100644 --- a/quanta/src/document.cpp +++ b/quanta/src/document.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -409,7 +409,7 @@ void Document::insertFile(const KURL& url) { if (!KIO::NetAccess::download(url, fileName, this)) { - KMessageBox::error(this, i18n("Cannot download %1.").tqarg( url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("Cannot download %1.").arg( url.prettyURL(0, KURL::StripFileProtocol))); return; } } @@ -421,7 +421,7 @@ void Document::insertFile(const KURL& url) insertText(stream.read()); file.close(); } else - KMessageBox::error(this, i18n("Cannot open %1 for reading.").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("Cannot open %1 for reading.").arg(url.prettyURL(0, KURL::StripFileProtocol))); } /** Inserts text at the current cursor position */ @@ -858,7 +858,7 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri { m_replaceLine = line; m_replaceCol = column; - m_replaceStr = QuantaCommon::encodedChar(string[0].tqunicode()); + m_replaceStr = QuantaCommon::encodedChar(string[0].unicode()); TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar())); return; } @@ -866,7 +866,7 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri } if (qConfig.replaceAccented) { - uint c = string[0].tqunicode(); + uint c = string[0].unicode(); if (c > 191) { m_replaceLine = line; @@ -1303,7 +1303,7 @@ TQValueList* Document::getTagCompletions(int line, { if (!parentTQTag || (parentTQTag && parentTQTag->isChild(tagName))) { - tagName = tag->name() + TQString("%1").tqarg(i, 10); + tagName = tag->name() + TQString("%1").arg(i, 10); tagNameList += tagName; comments.insert(tagName, tag->comment); i++; @@ -1319,7 +1319,7 @@ TQValueList* Document::getTagCompletions(int line, if ((tag->className == classStr || isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word)) { - tagName = tag->name() + TQString("%1").tqarg(i, 10); + tagName = tag->name() + TQString("%1").arg(i, 10); tagNameList += tagName; comments.insert(tagName, tag->comment); @@ -2212,7 +2212,7 @@ void Document::slotCompletionAborted() } /** Ask for user confirmation if the file was changed outside. */ -void Document::checkDirtytqStatus() +void Document::checkDirtyStatus() { TQString fileName; if (url().isLocalFile()) @@ -2576,9 +2576,9 @@ bool Document::hasChanged() return b; } -void Document::setChanged(bool newtqStatus) +void Document::setChanged(bool newStatus) { - changed = newtqStatus; + changed = newStatus; } void Document::paste() @@ -2614,7 +2614,7 @@ TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bo TQString s = text(bl, bc, el, ec); if (includeCoordinates) { - s.prepend(TQString("%1,%2,%3,%4\n").tqarg(bl).tqarg(bc).tqarg(el).tqarg(ec)); + s.prepend(TQString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec)); } result += s; if (skipFoundContent) @@ -3043,7 +3043,7 @@ void Document::processDTD(const TQString& documentType) if (!isUntitled()) { - quantaApp->messageOutput()->showMessage(i18n("\"%1\" is used for \"%2\".\n").tqarg(DTDs::ref()->getDTDNickNameFromName(dtdName)).tqarg(url().prettyURL(0, KURL::StripFileProtocol))); + quantaApp->messageOutput()->showMessage(i18n("\"%1\" is used for \"%2\".\n").arg(DTDs::ref()->getDTDNickNameFromName(dtdName)).arg(url().prettyURL(0, KURL::StripFileProtocol))); } quantaApp->slotLoadToolbarForDTD(dtdName); StructTreeView::ref()->useOpenLevelSetting = true; @@ -3056,10 +3056,10 @@ void Document::slotFileDirty(const TQString& fileName) { if ( url().path() == fileName && !dirty() ) { - setDirtytqStatus(true); + setDirtyStatus(true); if (this == ViewManager::ref()->activeDocument()) { - checkDirtytqStatus(); + checkDirtyStatus(); } } } diff --git a/quanta/src/document.h b/quanta/src/document.h index ff76fbb3..a7fda743 100644 --- a/quanta/src/document.h +++ b/quanta/src/document.h @@ -143,9 +143,9 @@ work correctly. */ void codeCompletionHintRequested(); /** Returns the dirty status. */ bool dirty() const {return m_dirty;}; - void setDirtytqStatus(bool status) {m_dirty = status;}; + void setDirtyStatus(bool status) {m_dirty = status;}; /** Ask for user confirmation if the file was changed outside. */ - void checkDirtytqStatus(); + void checkDirtyStatus(); /** Save the document and reset the dirty status. */ void save(); /** Save the document under a new name and calculate the new md5sum. */ @@ -159,7 +159,7 @@ work correctly. */ /** Returns the changed status since the last query. Resets changed.*/ bool hasChanged(); /** Sets the changed status.*/ - void setChanged(bool newtqStatus); + void setChanged(bool newStatus); /** Paste the contents of clipboard into the document */ void paste(); @@ -170,7 +170,7 @@ work correctly. */ /** returns all the areas that are between tag and it's closing pair */ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent); - /** disable/enable the tqrepaint of the Kate view */ + /** disable/enable the repaint of the Kate view */ void activateRepaintView(bool activation); bool RepaintViewActivated() {return repaintEnabled;} diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp index 7a6538f6..c378bd05 100644 --- a/quanta/src/dtds.cpp +++ b/quanta/src/dtds.cpp @@ -272,10 +272,10 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString dirName = dirURL.path(1); if (TQFile::exists(dirName + "common.tag")) readTagFile(dirName + "common.tag", dtd, 0L); - //bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false); + //bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false); emit enableIdleTimer(false); KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L); - //quantaApp->slotEnableIdleTimer(idleTimertqStatus); + //quantaApp->slotEnableIdleTimer(idleTimerStatus); emit enableIdleTimer(true); TQString tmpStr; KURL::List::ConstIterator end_f = files.constEnd(); @@ -533,7 +533,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString tagStr; for (uint index = 1; index <= structGroupsCount; index++) { - dtdConfig->setGroup(TQString("StructGroup_%1").tqarg(index)); + dtdConfig->setGroup(TQString("StructGroup_%1").arg(index)); //new code group.name = dtdConfig->readEntry("Name").stripWhiteSpace(); group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace(); @@ -583,7 +583,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString tagName; for (uint index = 1; index <= structGroupsCount; index++) { - dtdConfig->setGroup(TQString("StructGroup_%1").tqarg(index)); + dtdConfig->setGroup(TQString("StructGroup_%1").arg(index)); group.name = dtdConfig->readEntry("Name").stripWhiteSpace(); group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace(); group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace(); @@ -685,7 +685,7 @@ uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, TQTagList if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol )) { emit hideSplash(); - KMessageBox::error(0L, i18n("The DTD tag file %1 is not valid.
The error message is: %2 in line %3, column %4.
").tqarg(fileName).tqarg(errorMsg).tqarg(errorLine).tqarg(errorCol), + KMessageBox::error(0L, i18n("The DTD tag file %1 is not valid.
The error message is: %2 in line %3, column %4.
").arg(fileName).arg(errorMsg).arg(errorLine).arg(errorCol), i18n("Invalid Tag File")); kdWarning() << fileName << ": " << errorMsg << ": " << errorLine << "," << errorCol << endl; } @@ -794,7 +794,7 @@ void DTDs::setAttributes(TQDomNode *dom, TQTag* tag, bool &common) for ( TQDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() ) { tmpStr = n.nodeName(); - if (tmpStr == "tqchildren") + if (tmpStr == "children") { TQDomElement el = n.toElement(); TQDomElement item = el.firstChild().toElement(); @@ -914,7 +914,7 @@ void DTDs::slotLoadDTD() TQString nickName = dtdcfg.readEntry("NickName", dtdName); DTDStruct * dtd = m_dict->find(dtdName) ; if (dtd && - KMessageBox::warningYesNo(0L, i18n("Do you want to replace the existing %1 DTD?").tqarg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) + KMessageBox::warningYesNo(0L, i18n("Do you want to replace the existing %1 DTD?").arg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) { return; } @@ -924,7 +924,7 @@ void DTDs::slotLoadDTD() TQString family = dtdcfg.readEntry("Family", "1"); Document *w = ViewManager::ref()->activeDocument(); if (family == "1" && w && - KMessageBox::questionYesNo(0L, i18n("Use the newly loaded %1 DTD for the current document?").tqarg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) + KMessageBox::questionYesNo(0L, i18n("Use the newly loaded %1 DTD for the current document?").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) { w->setDTDIdentifier(dtdName); emit loadToolbarForDTD(w->getDTDIdentifier()); @@ -946,18 +946,18 @@ void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload) TQString nickName = dtdcfg.readEntry("NickName", dtdName); DTDStruct * dtd = m_dict->find(dtdName) ; if ( dtd && - KMessageBox::warningYesNo(0L, i18n("Do you want to replace the existing %1 DTD?").tqarg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) + KMessageBox::warningYesNo(0L, i18n("Do you want to replace the existing %1 DTD?").arg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) { return; } removeDTD(dtd); if (!readTagDir(dirName)) { - KMessageBox::error(0L, i18n("Cannot read the DTEP from %1. Check that the folder contains a valid DTEP (description.rc and *.tag files).").tqarg(dirName), i18n("Error Loading DTEP")); + KMessageBox::error(0L, i18n("Cannot read the DTEP from %1. Check that the folder contains a valid DTEP (description.rc and *.tag files).").arg(dirName), i18n("Error Loading DTEP")); } else { TQString family = dtdcfg.readEntry("Family", "1"); - if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("Autoload the %1 DTD in the future?").tqarg(nickName), TQString(), i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes) + if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("Autoload the %1 DTD in the future?").arg(nickName), TQString(), i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes) { KURL src; src.setPath(dirName); @@ -968,7 +968,7 @@ void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload) } Document *w = ViewManager::ref()->activeDocument(); if (family == "1" && w && - KMessageBox::questionYesNo(0L, i18n("Use the newly loaded %1 DTD for the current document?").tqarg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) + KMessageBox::questionYesNo(0L, i18n("Use the newly loaded %1 DTD for the current document?").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) { w->setDTDIdentifier(dtdName); emit loadToolbarForDTD(w->getDTDIdentifier()); diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp index 212bc68f..b39b0c46 100644 --- a/quanta/src/kqapp.cpp +++ b/quanta/src/kqapp.cpp @@ -80,12 +80,12 @@ KQApplication::KQApplication() KConfig *config = kapp->config(); config->setGroup("General Options"); int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode); - TQString tqlayout = config->readEntry("Window tqlayout", "Default"); - if (tqlayout == "Default" || args->isSet("resettqlayout")) + TQString layout = config->readEntry("Window layout", "Default"); + if (layout == "Default" || args->isSet("resetlayout")) { mdiMode = KMdi::IDEAlMode; config->writeEntry("MDI mode", KMdi::IDEAlMode); - config->writeEntry("Window tqlayout", "Default"); + config->writeEntry("Window layout", "Default"); } quantaApp = new QuantaApp(mdiMode); config->setGroup("General Options"); @@ -151,11 +151,11 @@ int KQUniqueApplication::newInstance() KConfig *config = kapp->config(); config->setGroup("General Options"); int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode); - TQString tqlayout = config->readEntry("Window tqlayout", "Default"); - if (tqlayout == "Default" || args->isSet("resettqlayout")) + TQString layout = config->readEntry("Window layout", "Default"); + if (layout == "Default" || args->isSet("resetlayout")) { mdiMode = KMdi::IDEAlMode; - config->writeEntry("Window tqlayout", "Default"); + config->writeEntry("Window layout", "Default"); config->writeEntry("MDI mode", KMdi::IDEAlMode); } quantaApp = new QuantaApp(mdiMode); diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp index 75d6918e..3e11bacb 100644 --- a/quanta/src/main.cpp +++ b/quanta/src/main.cpp @@ -56,7 +56,7 @@ static KCmdLineOptions options[] = { "+[File]", I18N_NOOP("File to open"), 0 }, { "unique", I18N_NOOP("Whether we start as a one-instance application"), 0 }, { "nologo", I18N_NOOP("Do not show the nice logo during startup"), 0 }, - { "resettqlayout", I18N_NOOP("Reset the tqlayout of the user interface to the default"), 0}, + { "resetlayout", I18N_NOOP("Reset the layout of the user interface to the default"), 0}, KCmdLineLastOption // INSERT YOUR COMMANDLINE OPTIONS HERE }; diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp index ee054cbe..e74240ca 100644 --- a/quanta/src/quanta.cpp +++ b/quanta/src/quanta.cpp @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( m_parserEnabled = true; cursorLine = 0; cursorCol = 0; - emit eventHappened("quanta_start", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString()); + emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString()); setAcceptDrops(true); tabWidget()->installEventFilter(this); } @@ -375,7 +375,7 @@ void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding) { if (!QExtFileInfo::exists(*i, true, this)) { - KMessageBox::error(this, i18n("The file %1 does not exist or is not a recognized mime type.").tqarg((*i).prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("The file %1 does not exist or is not a recognized mime type.").arg((*i).prettyURL(0, KURL::StripFileProtocol))); } else { @@ -412,7 +412,7 @@ void QuantaApp::slotFileOpenRecent(const KURL &url) if (!QExtFileInfo::exists(url, true, this)) { if (KMessageBox::questionYesNo(this, - i18n("The file %1 does not exist.\n Do you want to remove it from the list?").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::del(), i18n("Keep")) + i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::del(), i18n("Keep")) == KMessageBox::Yes) { fileRecent->removeURL(url); @@ -433,7 +433,7 @@ void QuantaApp::slotFileSave() Document *w = view->document(); if (w) { - w->checkDirtytqStatus(); + w->checkDirtyStatus(); if (w->isUntitled()) slotFileSaveAs(); else @@ -457,7 +457,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave) if (w) { KURL oldURL = w->url(); - w->checkDirtytqStatus(); + w->checkDirtyStatus(); if (!w->isUntitled() && oldURL.isLocalFile()) { fileWatcher->removeFile(oldURL.path()); @@ -523,7 +523,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave) { oldURL = saveUrl; if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) && - KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("Do you want to add the
%1
file to project?
").tqarg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::add(), i18n("Do Not Add")) + KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("Do you want to add the
%1
file to project?
").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::add(), i18n("Do Not Add")) ) { if (saveUrl.isLocalFile()) @@ -557,7 +557,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) KURL url; int query; KURL projectTemplateURL; - w->checkDirtytqStatus(); + w->checkDirtyStatus(); TQString localTemplateDir = locateLocal("data", resourceDir + "templates/"); do { @@ -584,7 +584,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) { if (projectTemplate) localTemplateDir = projectTemplateURL.path(1); - KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").tqarg(localTemplateDir)); + KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").arg(localTemplateDir)); query = KMessageBox::No; } } while (query != KMessageBox::Yes); @@ -603,7 +603,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) tempFile->file()->flush(); tempFile->close(); if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this)) - KMessageBox::error(this, i18n("There was an error while creating the template file.
Check that you have write access to %1.
").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); + KMessageBox::error(this, i18n("There was an error while creating the template file.
Check that you have write access to %1.
").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); delete tempFile; } else { @@ -684,7 +684,7 @@ void QuantaApp::slotFileCloseAll() part->write(" "); part->end(); - slotNewtqStatus(); + slotNewStatus(); } void QuantaApp::slotFileQuit() @@ -710,12 +710,12 @@ void QuantaApp::slotStatusMsg(const TQString &msg) { statusbarTimer->stop(); statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS); - statusBar()->tqrepaint(); - kapp->tqprocessEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); + statusBar()->repaint(); + kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); statusbarTimer->start(10000, true); } -/** tqrepaint preview */ +/** repaint preview */ void QuantaApp::slotRepaintPreview() { Document *w = ViewManager::ref()->activeDocument(); @@ -915,7 +915,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo) } } -void QuantaApp::slotNewtqStatus() +void QuantaApp::slotNewStatus() { fileRecent->setEnabled(true); actionCollection()->action("project_open_recent")->setEnabled(true); @@ -1348,7 +1348,7 @@ void QuantaApp::slotOptions() if (previewSettingsChanged) slotShowPreviewWidget(true); qConfig.docPosition = uiOptions->docPosition(); - qConfig.windowLayout = uiOptions->tqlayout(); + qConfig.windowLayout = uiOptions->layout(); m_htmlPart->closeURL(); m_htmlPart->begin( Project::ref()->projectBaseURL()); @@ -1356,7 +1356,7 @@ void QuantaApp::slotOptions() m_htmlPart->end(); reparse(true); - slotNewtqStatus(); + slotNewStatus(); } m_config->sync(); @@ -1437,7 +1437,7 @@ void QuantaApp::slotShowPreviewWidget(bool show) } } -void QuantaApp::slotChangePreviewtqStatus() +void QuantaApp::slotChangePreviewStatus() { if (qConfig.previewPosition == "Editor") { @@ -1446,7 +1446,7 @@ void QuantaApp::slotChangePreviewtqStatus() if (m_previewToolView && m_htmlPart->view()->isVisible()) { //hiding the preview when it's in a toolview means that the current tab has changed, - //so we just tqrepaint the content and restore the document on the disc. + //so we just repaint the content and restore the document on the disc. m_previewVisible = true; if (m_previewedDocument) { @@ -1511,7 +1511,7 @@ void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int colu startIdleTimer(); // updateTreeViews(); TQString linenumber; - linenumber = i18n("Line: %1 Col: %2").tqarg(lineNumber).tqarg(columnNumber); + linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber); statusBar()->changeItem(linenumber, IDS_STATUS_CLM); statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR); statusBar()->changeItem("",IDS_MODIFIED); @@ -1525,7 +1525,7 @@ void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber) void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber) { gotoFileAndLine(file, lineNumber, columnNumber); - slotNewtqStatus(); + slotNewStatus(); } void QuantaApp::slotNewLineColumn() @@ -1539,7 +1539,7 @@ void QuantaApp::slotNewLineColumn() Document *w = ViewManager::ref()->activeDocument(); if (w) w->viewCursorIf->cursorPosition(&cursorLine, &cursorCol); - linenumber = i18n("Line: %1 Col: %2").tqarg(cursorLine+1).tqarg(cursorCol+1); + linenumber = i18n("Line: %1 Col: %2").arg(cursorLine+1).arg(cursorCol+1); statusBar()->changeItem(linenumber, IDS_STATUS_CLM); } @@ -1795,7 +1795,7 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl TQWidget *w = new TQWidget(toolbarTab, TQString("ToolbarHoldingWidget" + element.attribute("name")).ascii()); QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name").ascii(), true, true); tb->loadState(element); - tb->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); + tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); //kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl; if (toolbarTab->iconText() == KToolBar::IconTextBottom) @@ -1968,7 +1968,7 @@ void QuantaApp::slotContextMenuAboutToShow() urlUnderCursor = baseUrl; QuantaCommon::setUrl(urlUnderCursor, name.stripWhiteSpace()); urlUnderCursor = QExtFileInfo::toAbsolute(urlUnderCursor, baseUrl); - action->setText(i18n("Open File: %1").tqarg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80))); + action->setText(i18n("Open File: %1").arg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80))); action->setEnabled(true); } else { @@ -2027,7 +2027,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_addwatch"); if(action) { - action->setText(i18n("Add Watch: '%1'").tqarg(word)); + action->setText(i18n("Add Watch: '%1'").arg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2038,7 +2038,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_variable_set"); if(action) { - action->setText(i18n("Set Value of '%1'").tqarg(word)); + action->setText(i18n("Set Value of '%1'").arg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2049,7 +2049,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_conditional_break"); if(action) { - action->setText(i18n("Break When '%1'...").tqarg(word)); + action->setText(i18n("Break When '%1'...").arg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2087,7 +2087,7 @@ void QuantaApp::slotOpenFileUnderCursor() } } else { - KMessageBox::error(this, i18n("The file %1 does not exist or is not a recognized mime type.").tqarg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("The file %1 does not exist or is not a recognized mime type.").arg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol))); } } @@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url) { if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower()) { - newName = origName + TQString(" (%1)").tqarg(count); - i18nName = i18n(origName.utf8()) + TQString(" (%1)").tqarg(count); + newName = origName + TQString(" (%1)").arg(count); + i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count); nameModified = true; count++; found = true; @@ -2199,7 +2199,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url) int n = 1; while (m_toolbarList.find(toolbarId) != 0L) { - toolbarId = s + TQString("%1").tqarg(n); + toolbarId = s + TQString("%1").arg(n); toolbarId.replace(rx, "_"); n++; } @@ -2438,7 +2438,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF TQString error; int el, ec; if (!dom->setContent(s, &error, &el, &ec)) - kdError(24000) << TQString("Error %1 at (%2, %3)").tqarg(error).tqarg(el).tqarg(ec)<dom = dom; TQTextStream bufferStr(&buffer); @@ -2461,7 +2461,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this)) { KMessageBox::error(this, i18n("An error happened while saving the %1 toolbar.
" - "Check that you have write permissions for
%2.

This might happen if you tried save to save a global toolbar as a simple user. Use Save As or Toolbars->Save Toolbars->Save as Local Toolbar in this case.
").tqarg(p_toolbar->name).tqarg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error")); + "Check that you have write permissions for
%2.

This might happen if you tried save to save a global toolbar as a simple user. Use Save As or Toolbars->Save Toolbars->Save as Local Toolbar in this case. ").arg(p_toolbar->name).arg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error")); tarFile = KURL(); delete p_toolbar->dom; p_toolbar->dom = oldDom; @@ -2554,7 +2554,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, co if (!localToolbar) localToolbarsDir = projectToolbarsURL.prettyURL(); KMessageBox::sorry(0,i18n("You must save the toolbars to the following folder:

%1
") - .tqarg(localToolbarsDir)); + .arg(localToolbarsDir)); query = KMessageBox::No; } } while (query != KMessageBox::Yes); @@ -2591,7 +2591,7 @@ void QuantaApp::slotSaveProjectToolbar() void QuantaApp::slotAddToolbar() { bool ok; - TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").tqarg(userToolbarsCount), &ok, this); + TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this); if (ok) { userToolbarsCount++; @@ -2600,7 +2600,7 @@ void QuantaApp::slotAddToolbar() int n = 1; while (m_toolbarList.find(toolbarId) != 0L) { - toolbarId = name + TQString("%1").tqarg(n); + toolbarId = name + TQString("%1").arg(n); n++; } toolbarId = toolbarId.lower(); @@ -2609,7 +2609,7 @@ void QuantaApp::slotAddToolbar() tempFile->setAutoDelete(true); tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8); * (tempFile->textStream()) << TQString("\n\n\n%5\n\n\n") - .tqarg(name.lower()).tqarg(name).tqarg(name).tqarg(toolbarId).tqarg(name); + .arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name); tempFile->close(); ToolbarXMLGUI * toolbarGUI = new ToolbarXMLGUI(tempFile->name()); @@ -3122,7 +3122,7 @@ void QuantaApp::focusInEvent(TQFocusEvent* e) if (w) { w->view()->setFocus(); - w->checkDirtytqStatus(); + w->checkDirtyStatus(); } } @@ -3318,12 +3318,12 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name) int result; if (p_toolbar->url.isEmpty()) { - result = KMessageBox::warningYesNoCancel(this, i18n("Toolbar %1 is new and unsaved. Do you want to save it before it is removed?").tqarg(p_toolbar->name), + result = KMessageBox::warningYesNoCancel(this, i18n("Toolbar %1 is new and unsaved. Do you want to save it before it is removed?").arg(p_toolbar->name), i18n("Save Toolbar"), KStdGuiItem::save(), KStdGuiItem::discard()); } else { FourButtonMessageBox dlg(this, 0, true); - dlg.textLabel->setText(i18n("The toolbar %1 was modified. Do you want to save it before it is removed?").tqarg(p_toolbar->name)); + dlg.textLabel->setText(i18n("The toolbar %1 was modified. Do you want to save it before it is removed?").arg(p_toolbar->name)); dlg.setCaption(i18n("Save Toolbar")); dlg.pixmapLabel->setPixmap(BarIcon("messagebox_info", KIcon::SizeMedium)); dlg.exec(); @@ -3784,7 +3784,7 @@ TQStringList QuantaApp::openedURLs() const Document *w = qView->document(); if ( w ) { - list.prepend( TQString("%1:%2").tqarg(w->editIf->editInterfaceNumber()).tqarg(w->url().url())); + list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url())); } } } @@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose() { saveOptions(); // kdDebug(24000) << "Quanta will exit" << endl; - emit eventHappened("quanta_exit", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString()); + emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString()); } else slotFileNew(); return canExit; @@ -4200,7 +4200,7 @@ void QuantaApp::saveOptions() m_config->writeEntry("Smart Tag Insertion", qConfig.smartTagInsertion); - m_config->writeEntry("Window tqlayout", qConfig.windowLayout); + m_config->writeEntry("Window layout", qConfig.windowLayout); m_config->writeEntry("Follow Cursor", StructTreeView::ref()->followCursor() ); //If user choose the timer interval, it needs to restart the timer too m_config->writeEntry("Autosave interval", qConfig.autosaveInterval); @@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag() slotEnableIdleTimer(true); if (isUnknown) { - TQString message = i18n("Unknown tag: %1").tqarg(tagName); + TQString message = i18n("Unknown tag: %1").arg(tagName); slotStatusMsg( message ); } } @@ -4840,7 +4840,7 @@ void QuantaApp::slotPasteHTMLQuoted() Document *w = ViewManager::ref()->activeDocument(); if (w) { - TQClipboard *cb = tqApp->tqclipboard(); + TQClipboard *cb = tqApp->clipboard(); TQString text = cb->text(); if ( ( !text.isNull() ) && (!text.isEmpty() ) ) @@ -4869,7 +4869,7 @@ void QuantaApp::slotPasteHTMLQuoted() int code = s.toInt(&ok); if (!ok || code < 191) continue; - text.replace(TQChar(code), TQString("&#%1;").tqarg(s)); + text.replace(TQChar(code), TQString("&#%1;").arg(s)); } } unsigned int line, col; @@ -4885,7 +4885,7 @@ void QuantaApp::slotPasteURLEncoded() Document *w = ViewManager::ref()->activeDocument(); if (w) { - TQClipboard *cb = tqApp->tqclipboard(); + TQClipboard *cb = tqApp->clipboard(); TQString text = cb->text(); if ( ( !text.isNull() ) && (!text.isEmpty() ) ) @@ -5004,14 +5004,14 @@ void QuantaApp::slotCopy() if (m_htmlPart->view()->hasFocus()) { TQString selection = m_htmlPart->selectedText(); - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); cb->setText(selection, TQClipboard::Clipboard); } else if (m_htmlPartDoc->view()->hasFocus()) { TQString selection = m_htmlPartDoc->selectedText(); - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); cb->setText(selection, TQClipboard::Clipboard); } diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h index 1b7231e4..d0216e17 100644 --- a/quanta/src/quanta.h +++ b/quanta/src/quanta.h @@ -282,11 +282,11 @@ public slots: unexpected things may happen. */ void slotStatusMsg(const TQString &text); - void slotNewtqStatus(); + void slotNewStatus(); void slotNewLineColumn(); -// void slotUpdatetqStatus(TQWidget*);FIXME: +// void slotUpdateStatus(TQWidget*);FIXME: - /** tqrepaint preview */ + /** repaint preview */ void slotRepaintPreview(); /** toggles showing the preview */ void slotToggleShowPreview(); @@ -298,7 +298,7 @@ public slots: - hide if the preview was in the editor area - update if the preview is in a toolview */ - void slotChangePreviewtqStatus(); + void slotChangePreviewStatus(); /** Called when the preview widget got or lost the focus */ void slotPreviewHasFocus(bool focus); diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp index 5239c8de..24663af3 100644 --- a/quanta/src/quanta_init.cpp +++ b/quanta/src/quanta_init.cpp @@ -22,13 +22,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -191,13 +191,13 @@ void QuantaInit::initQuanta() m_quanta->m_problemsOutputView = addToolTreeView(m_quanta->m_problemOutput, i18n("Problems"), SmallIcon("info"), KDockWidget::DockBottom); m_quanta->m_annotationOutputView = addToolTreeView(m_quanta->m_annotationOutput, i18n("Annotations"), SmallIcon("stamp"), KDockWidget::DockBottom); - // Restore the dock tqlayout + // Restore the dock layout m_config->setGroup ("General Options"); - TQString tqlayout = m_config->readEntry("Window tqlayout", "Default"); + TQString layout = m_config->readEntry("Window layout", "Default"); int mdiMode = m_config->readNumEntry("MDI mode", -1); - if (mdiMode != -1 && tqlayout != "Default") + if (mdiMode != -1 && layout != "Default") { - m_quanta->readDockConfig(m_config); //FIXME: This causes the visible widget construction on startup, but is needed to restore the window tqlayout... + m_quanta->readDockConfig(m_config); //FIXME: This causes the visible widget construction on startup, but is needed to restore the window layout... if (mdiMode != KMdi::IDEAlMode) m_quanta->setToolviewStyle(qConfig.toolviewTabs); } @@ -268,7 +268,7 @@ void QuantaInit::initQuanta() TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); m_quanta->slotFileNew(); - m_quanta->slotNewtqStatus(); + m_quanta->slotNewStatus(); initToolBars(); Project::ref()->setProjectToolbarVisible(m_quanta->factory()->container("project_toolbar", m_quanta)->isShown()); Project::ref()->slotShowProjectToolbar(Project::ref()->hasProject()); @@ -301,7 +301,7 @@ void QuantaInit::initQuanta() continue; int length = s.find(";)") - begin + 1; TQString s2 = s.mid(begin, length - 1); - replacementMap[s[0].tqunicode()] = s2; + replacementMap[s[0].unicode()] = s2; } file.close(); } @@ -356,16 +356,16 @@ void QuantaInit::initStatusBar() void QuantaInit::initDocument() { m_quanta->m_doc = new QuantaDoc(0L); - connect(m_quanta->m_doc, TQT_SIGNAL(newtqStatus()), - TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewtqStatus())); + connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()), + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewStatus())); } void QuantaInit::initProject() { Project *m_project = Project::ref(m_quanta); - connect(m_project, TQT_SIGNAL(getTreetqStatus(TQStringList *)), - pTab, TQT_SLOT(slotGetTreetqStatus(TQStringList *))); + connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)), + pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *))); connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadToolbarFile(const KURL &))); connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)), @@ -424,8 +424,8 @@ void QuantaInit::initProject() connect(m_project, TQT_SIGNAL(messages(const TQString&)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&))); - connect(m_project, TQT_SIGNAL(newtqStatus()), - TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewtqStatus())); + connect(m_project, TQT_SIGNAL(newStatus()), + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewStatus())); connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); @@ -438,10 +438,10 @@ void QuantaInit::initProject() connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)), m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&))); - connect(pTab, TQT_SIGNAL(changeUploadtqStatus(const KURL&, int)), + connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)), m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int))); - connect(pTab, TQT_SIGNAL(changeDocumentFoldertqStatus(const KURL&, bool)), - m_project, TQT_SLOT(slotChangeDocumentFoldertqStatus(const KURL&, bool))); + connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)), + m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool))); connect(m_project, TQT_SIGNAL(hideSplash()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); @@ -679,7 +679,7 @@ void QuantaInit::openLastFiles() if (w) //w==0 might happen on quick close on startup { m_quanta->setTitle(w->url().prettyURL(0, KURL::StripFileProtocol) ); -// m_quanta->slotUpdatetqStatus(w);//FIXME: +// m_quanta->slotUpdateStatus(w);//FIXME: } } @@ -963,7 +963,7 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << TQString("Error %1 at (%2, %3) in %4").tqarg(error).tqarg(el).tqarg(ec).tqarg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; f.close(); } m_quanta->m_actions->clear(); @@ -990,7 +990,7 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << TQString("Error %1 at (%2, %3) in %4").tqarg(error).tqarg(el).tqarg(ec).tqarg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; f.close(); } } else @@ -1180,9 +1180,9 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) "Backup file size: %4
" "Backup created on: %5

" "") - .tqarg(originalVersion.prettyURL(0, KURL::StripFileProtocol )) - .tqarg(KIO::convertSize(origSize)).tqarg(origTime) - .tqarg(KIO::convertSize(backupSize)).tqarg(backupTime)); + .arg(originalVersion.prettyURL(0, KURL::StripFileProtocol )) + .arg(KIO::convertSize(origSize)).arg(origTime) + .arg(KIO::convertSize(backupSize)).arg(backupTime)); w->buttonLoad->setText(i18n("&Restore the file from backup")); w->buttonIgnore->setText(i18n("Do ¬ restore the file from backup")); delete w->warningLabel; @@ -1482,13 +1482,13 @@ void QuantaInit::checkRuntimeDependencies() if (dependency.type == Dependency::Executable) { if (KStandardDirs::findExe(dependency.execName).isNull()) - errorStr += TQString(stdErrorMsg).tqarg(dependency.name).tqarg(dependency.url).tqarg(dependency.description); + errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); } else if (dependency.type == Dependency::Plugin) { if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName))) - errorStr += TQString(stdErrorMsg).tqarg(dependency.name).tqarg(dependency.url).tqarg(dependency.description); + errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); } } @@ -1500,7 +1500,7 @@ void QuantaInit::checkRuntimeDependencies() &appId); if (appId.isEmpty()) { - errorStr += TQString(stdErrorMsg).tqarg("Cervisia (cvsservice)").tqarg("http://www.kde.org/apps/cervisia").tqarg(i18n("integrated CVS management")); + errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management")); } else { CVSService::ref(m_quanta->actionCollection())->setAppId(appId); @@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas() int i = 0; for (QCStringList::iterator it = list.begin(); it != list.end(); ++it) { - if (TQString(*it).tqstartsWith("quanta", false)) + if (TQString(*it).startsWith("quanta", false)) ++i; } return i; diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp index 797c1172..3585cdb8 100644 --- a/quanta/src/quantadoc.cpp +++ b/quanta/src/quantadoc.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -132,7 +132,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting ) else // select opened if (switchToExisting) { - view->document()->checkDirtytqStatus(); + view->document()->checkDirtyStatus(); if (view != ViewManager::ref()->activeView()) { view->activate(); @@ -147,7 +147,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting ) void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, bool switchToExisting, bool readOnly) { - bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false); + bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false); KURL url = urlToOpen; if (url.isLocalFile()) { @@ -158,7 +158,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, TQString encoding = a_encoding; if (!newDocument(url, switchToExisting)) { - quantaApp->slotEnableIdleTimer(idleTimertqStatus); + quantaApp->slotEnableIdleTimer(idleTimerStatus); return; } Document *w = ViewManager::ref()->activeDocument(); @@ -211,23 +211,23 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, highlightIf->setHlMode(htmlIdx); } } - emit newtqStatus(); + emit newStatus(); } - quantaApp->slotEnableIdleTimer(idleTimertqStatus); + quantaApp->slotEnableIdleTimer(idleTimerStatus); } void QuantaDoc::slotOpeningFailed(const KURL &url) { Q_UNUSED(url); - bool signaltqStatus = signalsBlocked(); + bool signalStatus = signalsBlocked(); blockSignals(false); emit hideSplash(); //Seems to be not needed anymore since KDE 3.2, but keep until it's completely verified /* - KMessageBox::error(quantaApp, i18n("Cannot open document %1.").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(quantaApp, i18n("Cannot open document %1.").arg(url.prettyURL(0, KURL::StripFileProtocol))); */ ViewManager::ref()->removeActiveView(); - blockSignals(signaltqStatus); + blockSignals(signalStatus); } void QuantaDoc::slotOpeningCompleted(const KURL &url) @@ -240,7 +240,7 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url) quantaApp->reparse(true); if (url.isLocalFile()) quantaApp->debugger()->fileOpened(url.prettyURL(0, KURL::StripFileProtocol)); - quantaApp->slotNewtqStatus(); + quantaApp->slotNewStatus(); quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol)); Project::ref()->loadCursorPosition(w->url(), dynamic_cast(w->view())); emit eventHappened("after_open", url.url(), TQString()); @@ -272,7 +272,7 @@ void QuantaDoc::slotAttribPopup() if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) ) { - TQString caption = i18n("Attributes of <%1>").tqarg(tagName); + TQString caption = i18n("Attributes of <%1>").arg(tagName); attribMenu->insertTitle( caption ); AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName ); @@ -317,7 +317,7 @@ void QuantaDoc::slotAttribPopup() } } else { - TQString message = i18n("Unknown tag: %1").tqarg(tagName); + TQString message = i18n("Unknown tag: %1").arg(tagName); quantaApp->slotStatusMsg( message ); } } diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h index 0da3ff5e..ac7069d9 100644 --- a/quanta/src/quantadoc.h +++ b/quanta/src/quantadoc.h @@ -48,7 +48,7 @@ public slots: void slotOpeningFailed(const KURL &url); signals: - void newtqStatus(); + void newStatus(); void hideSplash(); void eventHappened(const TQString&, const TQString&, const TQString& ); diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp index cb4c8ef9..f9a0dc06 100644 --- a/quanta/src/quantaview.cpp +++ b/quanta/src/quantaview.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -208,7 +208,7 @@ void QuantaView::addDocument(Document *document) reloadUpdateTimers(); - m_currentViewsLayout = -1; //force loading of this tqlayout + m_currentViewsLayout = -1; //force loading of this layout slotSetSourceLayout(); } @@ -263,7 +263,7 @@ void QuantaView::addCustomWidget(TQWidget *widget, const TQString &label) void QuantaView::reloadLayout() { int currentViewsLayout = m_currentViewsLayout; - m_currentViewsLayout = -1; //force loading of this tqlayout + m_currentViewsLayout = -1; //force loading of this layout switch (currentViewsLayout) { case SourceOnly: @@ -395,7 +395,7 @@ void QuantaView::slotSetSourceAndVPLLayout() if (m_document->defaultDTD()->name.contains("HTML", false) == 0) { - KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").tqarg(m_document->defaultDTD()->nickName)); + KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName)); KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" ); if (ta2) ta2->setChecked(true); @@ -444,7 +444,7 @@ void QuantaView::slotSetVPLOnlyLayout() if (m_document->defaultDTD()->name.contains("HTML", false) == 0) { - KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").tqarg(m_document->defaultDTD()->nickName)); + KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName)); KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" ); if (ta2) ta2->setChecked(true); @@ -1021,7 +1021,7 @@ void QuantaView::activated() ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar); m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0); quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view()); - m_document->checkDirtytqStatus(); + m_document->checkDirtyStatus(); StructTreeView::ref()->useOpenLevelSetting = true; quantaApp->slotLoadToolbarForDTD(m_document->getDTDIdentifier()); @@ -1064,7 +1064,7 @@ bool QuantaView::saveModified(bool ask) int want_save; if (ask) want_save = KMessageBox::warningYesNoCancel(this, - i18n("The file \"%1\" has been modified.\nDo you want to save it?").tqarg(fileName), + i18n("The file \"%1\" has been modified.\nDo you want to save it?").arg(fileName), i18n("Warning"), KStdGuiItem::save(), KStdGuiItem::discard()); else want_save = KMessageBox::Yes; @@ -1125,7 +1125,7 @@ bool QuantaView::saveDocument(const KURL& url) return false; //saving to a local file failed } else //successful saving to a local file { - m_document->setDirtytqStatus(false); + m_document->setDirtyStatus(false); m_document->removeBackup(quantaApp->config()); fileWatcher->addFile(m_document->url().path()); // kdDebug(24000) << "addFile[saveDocument, 2]: " << m_document->url().path() << endl; @@ -1176,7 +1176,7 @@ void QuantaView::slotSavingFailed(const TQString &error) void QuantaView::slotSavingCompleted() { m_saveResult = true; - m_document->setDirtytqStatus(false); + m_document->setDirtyStatus(false); m_document->removeBackup(quantaApp->config()); if (m_eventLoopStarted) tqApp->exit_loop(); diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h index bf80aff1..3e34c43a 100644 --- a/quanta/src/quantaview.h +++ b/quanta/src/quantaview.h @@ -105,7 +105,7 @@ public: void reloadVPLView(bool force = false); /** reload the Quanta view from the Node Tree. Set force to true if you want to reload even if not necessary. */ void reloadSourceView(bool force = false); - /** Return the curren views tqlayout*/ + /** Return the curren views layout*/ int currentViewsLayout() {return m_currentViewsLayout;} void reloadLayout(); @@ -221,7 +221,7 @@ private: TQGuardedPtr m_kafkaDocument; TQSplitter *m_splitter; TQGridLayout *m_viewLayout; - int m_currentViewsLayout; ///< holds the current tqlayout, which can be SourceOnly, VPLOnly or SourceAndVPL + int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL int m_currentFocus; bool m_saveResult; bool m_eventLoopStarted; diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp index 6a6294e3..9446daf6 100644 --- a/quanta/src/viewmanager.cpp +++ b/quanta/src/viewmanager.cpp @@ -95,7 +95,7 @@ QuantaView* ViewManager::createView(const TQString &caption) connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn())); connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn())); connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *))); - connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewtqStatus())); + connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus())); disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 ); connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*))); connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&))); @@ -107,8 +107,8 @@ QuantaView* ViewManager::createView(const TQString &caption) void ViewManager::createNewDocument() { int i = 1; - while (isOpened(KURL("file:"+i18n("Untitled%1").tqarg(i)))) i++; - TQString fname = i18n("Untitled%1").tqarg(i); + while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++; + TQString fname = i18n("Untitled%1").arg(i); QuantaView *view = createView(fname); #ifdef ENABLE_EDITORS @@ -139,7 +139,7 @@ void ViewManager::createNewDocument() quantaApp->setFocusProxy(w->view()); w->view()->setFocusPolicy(TQ_WheelFocus); - connect( v, TQT_SIGNAL(newtqStatus()), quantaApp, TQT_SLOT(slotNewtqStatus())); + connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus())); quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active view->addDocument(w); @@ -226,7 +226,7 @@ void ViewManager::slotViewActivated(KMdiChildView *view) parser->clearGroups(); parser->setSAParserEnabled(true); quantaApp->reparse(true); //FIXME - quantaApp->slotNewtqStatus(); + quantaApp->slotNewStatus(); quantaApp->slotNewLineColumn(); typingInProgress = false; //need to reset, as it's set to true in the above slots m_lastActiveView = qView; @@ -257,16 +257,16 @@ void ViewManager::slotCloseOtherTabs() if (dynamic_cast(currentView) && !static_cast(currentView)->document()) ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false); KMdiIterator *it = quantaApp->createIterator(); - //save the tqchildren first to a list, as removing invalidates our iterator - TQValueList tqchildren; + //save the children first to a list, as removing invalidates our iterator + TQValueList children; for (it->first(); !it->isDone(); it->next()) { - tqchildren.append(it->currentItem()); + children.append(it->currentItem()); } delete it; KURL::List modifiedList; TQValueListIterator childIt; - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = *childIt; qView = dynamic_cast(view); @@ -286,7 +286,7 @@ void ViewManager::slotCloseOtherTabs() if (dlg.exec() == TQDialog::Accepted) { filesToSave = dlg.filesToSave(); - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = *childIt; qView = dynamic_cast(view); @@ -311,7 +311,7 @@ void ViewManager::slotCloseOtherTabs() } } - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = *childIt; if (view != currentView) @@ -427,16 +427,16 @@ bool ViewManager::closeAll(bool createNew) parser->setSAParserEnabled(false); KMdiIterator *it = quantaApp->createIterator(); QuantaView *view; - //save the tqchildren first to a list, as removing invalidates our iterator - TQValueList tqchildren; + //save the children first to a list, as removing invalidates our iterator + TQValueList children; for (it->first(); !it->isDone(); it->next()) { - tqchildren.append(it->currentItem()); + children.append(it->currentItem()); } delete it; KURL::List modifiedList; TQValueListIterator childIt; - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = dynamic_cast(*childIt); if (view) @@ -455,7 +455,7 @@ bool ViewManager::closeAll(bool createNew) if (dlg.exec() == TQDialog::Accepted) { filesToSave = dlg.filesToSave(); - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = dynamic_cast(*childIt); if (view) @@ -484,7 +484,7 @@ bool ViewManager::closeAll(bool createNew) disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed())); ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false); - for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) + for (childIt = children.begin(); childIt != children.end(); ++childIt) { view = dynamic_cast(*childIt); if (view) @@ -528,7 +528,7 @@ bool ViewManager::closeAll(bool createNew) if (createNew) { createNewDocument(); - quantaApp->slotNewtqStatus(); + quantaApp->slotNewStatus(); } emit filesClosed(true); return true; -- cgit v1.2.1