diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 12:01:04 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 12:01:04 -0600 |
commit | 84c989c19db5daab602a67f47ca0f5fd7a2b53d2 (patch) | |
tree | dc5875bd392dce2d636a94bebcf5c44a270fac6d /quanta/utility | |
parent | 9445f97b426e97c6ce46de18fba4030da45d56df (diff) | |
download | tdewebdev-84c989c19db5daab602a67f47ca0f5fd7a2b53d2.tar.gz tdewebdev-84c989c19db5daab602a67f47ca0f5fd7a2b53d2.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'quanta/utility')
-rw-r--r-- | quanta/utility/qpevents.cpp | 12 | ||||
-rw-r--r-- | quanta/utility/quantabookmarks.cpp | 10 | ||||
-rw-r--r-- | quanta/utility/quantacommon.cpp | 12 | ||||
-rw-r--r-- | quanta/utility/quantanetaccess.cpp | 8 | ||||
-rw-r--r-- | quanta/utility/tagaction.cpp | 24 | ||||
-rw-r--r-- | quanta/utility/toolbartabwidget.cpp | 12 |
6 files changed, 39 insertions, 39 deletions
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp index f7597225..3426b83f 100644 --- a/quanta/utility/qpevents.cpp +++ b/quanta/utility/qpevents.cpp @@ -85,11 +85,11 @@ void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1 EventAction ev = *it; if (ev.type == EventAction::Internal) { - if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An internal action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").tqarg(ev.action).tqarg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about internal actions") == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An internal action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").arg(ev.action).arg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about internal actions") == KMessageBox::Cancel) return; } else { - if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An external action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").tqarg(ev.action).tqarg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about external actions") == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An external action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").arg(ev.action).arg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about external actions") == KMessageBox::Cancel) return; } KURL url = KURL::fromPathOrURL(argument1); @@ -221,7 +221,7 @@ void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1 } } if (!m_eventNames.contains(name)) - KMessageBox::sorry(0L, i18n("<qt>Unsupported event <b>%1</b>.</qt>").tqarg(name), i18n("Event Handling Error")); + KMessageBox::sorry(0L, i18n("<qt>Unsupported event <b>%1</b>.</qt>").arg(name), i18n("Event Handling Error")); } bool QPEvents::handleEvent(const EventAction& ev) @@ -309,11 +309,11 @@ bool QPEvents::handleEvent(const EventAction& ev) } if (!result) { - KMessageBox::sorry(0L, i18n("<qt>Logging failed. Check that you have write access to <i>%1</i>.").tqarg(url.path())); + KMessageBox::sorry(0L, i18n("<qt>Logging failed. Check that you have write access to <i>%1</i>.").arg(url.path())); return false; } } else - KMessageBox::sorry(0L, i18n("<qt>Unsupported internal event action : <b>%1</b>.</qt>").tqarg(ev.action)); + KMessageBox::sorry(0L, i18n("<qt>Unsupported internal event action : <b>%1</b>.</qt>").arg(ev.action)); } else if (ev.type == EventAction::External) { @@ -336,7 +336,7 @@ bool QPEvents::handleEvent(const EventAction& ev) { action->activate(); } else - KMessageBox::sorry(0L, i18n("<qt>The <b>%1</b> script action was not found on your system.</qt>").tqarg(name), i18n("Action Execution Error")); + KMessageBox::sorry(0L, i18n("<qt>The <b>%1</b> script action was not found on your system.</qt>").arg(name), i18n("Action Execution Error")); } else KMessageBox::sorry(0L, i18n("Unsupported external event action.")); } else diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp index 3208a874..e5329b8a 100644 --- a/quanta/utility/quantabookmarks.cpp +++ b/quanta/utility/quantabookmarks.cpp @@ -196,7 +196,7 @@ int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool inse } menu.insertItem( - TQString("%1 - \"%2\"").tqarg( (*it)->line+1 ).tqarg( bText ), + TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ), 0, (*it)->line, idx ); insertedItems++; @@ -219,15 +219,15 @@ int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool inse idx = ++old_menu_count; if ( next ) { - m_goNext->setText( i18n("&Next: %1 - \"%2\"").tqarg( next->line + 1 ) - .tqarg( KStringHandler::rsqueeze( doc->editIf->textLine( next->line ), 24 ) ) ); + m_goNext->setText( i18n("&Next: %1 - \"%2\"").arg( next->line + 1 ) + .arg( KStringHandler::rsqueeze( doc->editIf->textLine( next->line ), 24 ) ) ); m_goNext->plug( &menu, idx ); idx++; } if ( prev ) { - m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").tqarg(prev->line + 1 ) - .tqarg( KStringHandler::rsqueeze( doc->editIf->textLine( prev->line ), 24 ) ) ); + m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").arg(prev->line + 1 ) + .arg( KStringHandler::rsqueeze( doc->editIf->textLine( prev->line ), 24 ) ) ); m_goPrevious->plug( &menu, idx ); idx++; } diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp index e50e55da..7eb8402d 100644 --- a/quanta/utility/quantacommon.cpp +++ b/quanta/utility/quantacommon.cpp @@ -382,8 +382,8 @@ TQString QuantaCommon::qUrl(const KURL &url) void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url) { KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>") - .tqarg(url.prettyURL(0, KURL::StripFileProtocol)) - .tqarg(url.protocol()+"://"+url.user()+"@"+url.host()));} + .arg(url.prettyURL(0, KURL::StripFileProtocol)) + .arg(url.protocol()+"://"+url.user()+"@"+url.host()));} /** Adds the backslash before the special chars (like ?, *, . ) so the returned @@ -596,7 +596,7 @@ DCOPReply QuantaCommon::callDCOPMethod(const TQString& interface, const TQString if (!kapp->inherits("KUniqueApplication")) { pid_t pid = ::getpid(); - app += TQString("-%1").tqarg(pid); + app += TQString("-%1").arg(pid); } DCOPRef quantaRef(app.utf8(), interface.utf8()); DCOPReply reply; @@ -707,7 +707,7 @@ bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window) if (QExtFileInfo::exists(url, false, window)) { if (KMessageBox::warningContinueCancel(window, - i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), i18n("Overwrite")) == KMessageBox::Cancel) + i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), i18n("Overwrite")) == KMessageBox::Cancel) result = false; } @@ -746,8 +746,8 @@ TQString QuantaCommon::encodedChar(uint code) { if (replacementMap.contains(code)) - return TQString("%1;").tqarg(replacementMap[code]); + return TQString("%1;").arg(replacementMap[code]); else - return TQString("&#%1;").tqarg(code); + return TQString("&#%1;").arg(code); } diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp index 69ddd0d5..375f6f6d 100644 --- a/quanta/utility/quantanetaccess.cpp +++ b/quanta/utility/quantanetaccess.cpp @@ -182,7 +182,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, b { TQString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path(); nice = KStringHandler::lsqueeze(nice, 60); - if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").tqarg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") ) + if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").arg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") ) { return; } @@ -207,7 +207,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool { TQString nice = QExtFileInfo::toRelative(url, baseURL).path(); nice = KStringHandler::lsqueeze(nice, 60); - if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").tqarg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") ) + if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") ) { return false; } @@ -230,7 +230,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool co { TQString nice = url.prettyURL(0, KURL::StripFileProtocol); nice = KStringHandler::csqueeze(nice, 60); - if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").tqarg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") ) + if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").arg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") ) { return false; } @@ -243,7 +243,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool co if (confirm) { TQString nice = url.prettyURL(0, KURL::StripFileProtocol); nice = KStringHandler::csqueeze(nice, 60); - return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").tqarg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") ); + return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").arg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") ); } return true; } diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp index f782ea9e..1db14cf1 100644 --- a/quanta/utility/tagaction.cpp +++ b/quanta/utility/tagaction.cpp @@ -338,10 +338,10 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto pid_t pid = ::getpid(); if (kapp->inherits("KUniqueApplication")) { - command.replace("%pid", TQString("unique %1").tqarg(pid)); + command.replace("%pid", TQString("unique %1").arg(pid)); } else { - command.replace("%pid", TQString("%1").tqarg(pid)); + command.replace("%pid", TQString("%1").arg(pid)); } TQString buffer; TQString inputType = script.attribute("input","none"); @@ -461,7 +461,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto if (proc->start(KProcess::NotifyOnExit, KProcess::All)) { emit clearMessages(); - emit showMessage(i18n("The \"%1\" script started.\n").tqarg(actionText()), false); + emit showMessage(i18n("The \"%1\" script started.\n").arg(actionText()), false); if (!m_useInputFile) { if ( inputType == "current" || inputType == "selected" ) @@ -472,7 +472,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto proc->closeStdin(); } else { - KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").tqarg(command + " " + args).tqarg(command), i18n("Script Not Found")); + KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").arg(command + " " + args).arg(command), i18n("Script Not Found")); ViewManager::ref()->activeView()->setFocus(); if (loopStarted) { @@ -592,10 +592,10 @@ bool TagAction::slotActionActivated() pid_t pid = ::getpid(); if (kapp->inherits("KUniqueApplication")) { - command.replace("%pid", TQString("unique %1").tqarg(pid)); + command.replace("%pid", TQString("unique %1").arg(pid)); } else { - command.replace("%pid", TQString("%1").tqarg(pid)); + command.replace("%pid", TQString("%1").arg(pid)); } TQString buffer; TQString inputType = script.attribute("input","none"); @@ -715,7 +715,7 @@ bool TagAction::slotActionActivated() if (proc->start(KProcess::NotifyOnExit, KProcess::All)) { emit clearMessages(); - emit showMessage(i18n("The \"%1\" script started.\n").tqarg(actionText()), false); + emit showMessage(i18n("The \"%1\" script started.\n").arg(actionText()), false); if (!m_useInputFile) { if ( inputType == "current" || inputType == "selected" ) @@ -726,7 +726,7 @@ bool TagAction::slotActionActivated() proc->closeStdin(); } else { - KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").tqarg(command + " " + args).tqarg(command), i18n("Script Not Found")); + KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").arg(command + " " + args).arg(command), i18n("Script Not Found")); ViewManager::ref()->activeView()->setFocus(); if (loopStarted) { @@ -787,7 +787,7 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen ) if ( firstOutput ) { emit showMessagesView(); - emit showMessage(i18n("The \"%1\" script output:\n").tqarg(actionText()), false); + emit showMessage(i18n("The \"%1\" script output:\n").arg(actionText()), false); } emit showMessage(text, true); } else @@ -847,7 +847,7 @@ void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen ) if ( firstError ) { emit showMessagesView(); - emit showMessage(i18n("The \"%1\" script output:\n").tqarg(actionText()), false); + emit showMessage(i18n("The \"%1\" script output:\n").arg(actionText()), false); } emit showMessage(text, true); } @@ -970,7 +970,7 @@ void TagAction::slotProcessExited(KProcess *process) tqApp->exit_loop(); loopStarted = false; } - emit showMessage(i18n("The \"%1\" script has exited.").tqarg(actionText()), false); + emit showMessage(i18n("The \"%1\" script has exited.").arg(actionText()), false); delete process; } @@ -1008,7 +1008,7 @@ void TagAction::execute(bool blocking) /** Timeout occurred while waiting for some network function to return. */ void TagAction::slotTimeout() { - if ((m_killCount == 0) && (KMessageBox::questionYesNo(m_parentMainWindow, i18n("<qt>The filtering action <b>%1</b> seems to be locked.<br>Do you want to terminate it?</qt>").tqarg(actionText()), i18n("Action Not Responding"), i18n("Terminate"), i18n("Keep Running")) == KMessageBox::Yes)) + if ((m_killCount == 0) && (KMessageBox::questionYesNo(m_parentMainWindow, i18n("<qt>The filtering action <b>%1</b> seems to be locked.<br>Do you want to terminate it?</qt>").arg(actionText()), i18n("Action Not Responding"), i18n("Terminate"), i18n("Keep Running")) == KMessageBox::Yes)) { if (::kill(-proc->pid(), SIGTERM)) { diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp index 5331413a..0104c745 100644 --- a/quanta/utility/toolbartabwidget.cpp +++ b/quanta/utility/toolbartabwidget.cpp @@ -307,18 +307,18 @@ void QuantaToolBar::mousePressEvent(TQMouseEvent *e) m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - " + i18n(m_toolbarTab->tabUnderMouseLabel.utf8())); m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, TQT_SIGNAL(newAction())); - TQObjectList* tqchildrenList = queryList("KToolBarButton"); - for (uint i = 0; i < tqchildrenList->count(); i++) + TQObjectList* childrenList = queryList("KToolBarButton"); + for (uint i = 0; i < childrenList->count(); i++) { - KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(tqchildrenList->at(i))); + KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(childrenList->at(i))); TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos()); TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height()); if (TQRect(p1, p2).contains(p)) { currentActionName = w->textLabel(); TQString actionName = currentActionName; - m_popupMenu->insertItem(i18n("Remove Action - %1").tqarg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction())); - m_popupMenu->insertItem(i18n("Edit Action - %1").tqarg(actionName), this, TQT_SLOT(slotEditAction())); + m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction())); + m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction())); break; } } @@ -341,7 +341,7 @@ void QuantaToolBar::slotEditAction() void QuantaToolBar::slotRemoveAction() { - if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").tqarg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) { emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName); } |