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/utility/qpevents.cpp | 16 ++++++++-------- quanta/utility/quantabookmarks.cpp | 10 +++++----- quanta/utility/quantacommon.cpp | 16 ++++++++-------- quanta/utility/quantanetaccess.cpp | 8 ++++---- quanta/utility/tagaction.cpp | 24 ++++++++++++------------ quanta/utility/toolbartabwidget.cpp | 14 +++++++------- 6 files changed, 44 insertions(+), 44 deletions(-) (limited to 'quanta/utility') diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp index b4d43f48..81db90c2 100644 --- a/quanta/utility/qpevents.cpp +++ b/quanta/utility/qpevents.cpp @@ -17,7 +17,7 @@ //qt includes #include #include -#include +#include //kde includes #include @@ -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("An internal action (%1) associated with an event (%2) will be executed. Do you want to allow the execution of this action?").tqarg(ev.action).tqarg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about internal actions") == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0L, i18n("An internal action (%1) associated with an event (%2) will be executed. Do you want to allow the execution of this action?").arg(ev.action).arg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about internal actions") == KMessageBox::Cancel) return; } else { - if (KMessageBox::warningContinueCancel(0L, i18n("An external action (%1) associated with an event (%2) will be executed. Do you want to allow the execution of this action?").tqarg(ev.action).tqarg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about external actions") == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0L, i18n("An external action (%1) associated with an event (%2) will be executed. Do you want to allow the execution of this action?").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("Unsupported event %1.").tqarg(name), i18n("Event Handling Error")); + KMessageBox::sorry(0L, i18n("Unsupported event %1.").arg(name), i18n("Event Handling Error")); } bool QPEvents::handleEvent(const EventAction& ev) @@ -294,7 +294,7 @@ bool QPEvents::handleEvent(const EventAction& ev) TQTextStream stream(&file); stream.setEncoding(TQTextStream::UnicodeUTF8); //Note: the log text should not be translated. - TQString s = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + ": "; + TQString s = TQDateTime::currentDateTime().toString(Qt::ISODate) + ": "; s.append( "Event : " + m_eventName + " : "); s.append( "Action: " + ev.action + " : "); if (ev.arguments[1] == "full") @@ -309,11 +309,11 @@ bool QPEvents::handleEvent(const EventAction& ev) } if (!result) { - KMessageBox::sorry(0L, i18n("Logging failed. Check that you have write access to %1.").tqarg(url.path())); + KMessageBox::sorry(0L, i18n("Logging failed. Check that you have write access to %1.").arg(url.path())); return false; } } else - KMessageBox::sorry(0L, i18n("Unsupported internal event action : %1.").tqarg(ev.action)); + KMessageBox::sorry(0L, i18n("Unsupported internal event action : %1.").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("The %1 script action was not found on your system.").tqarg(name), i18n("Action Execution Error")); + KMessageBox::sorry(0L, i18n("The %1 script action was not found on your system.").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..7d86f59e 100644 --- a/quanta/utility/quantacommon.cpp +++ b/quanta/utility/quantacommon.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include //kde includes @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include "qextfileinfo.h" @@ -382,8 +382,8 @@ TQString QuantaCommon::qUrl(const KURL &url) void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url) { KMessageBox::error(widget, i18n("Cannot create folder
%1.
Check that you have write permission in the parent folder or that the connection to
%2
is valid.
") - .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( "The file %1 already exists.
Do you want to overwrite it?
" ).tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), i18n("Overwrite")) == KMessageBox::Cancel) + i18n( "The file %1 already exists.
Do you want to overwrite it?
" ).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("Do you want to add
%1
to the project?
").tqarg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") ) + if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("Do you want to add
%1
to the project?
").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("Do you really want to remove
%1
from the project?
").tqarg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") ) + if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("Do you really want to remove
%1
from the project?
").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("Do you really want to delete
%1
and remove it from the project?
").tqarg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") ) + if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("Do you really want to delete
%1
and remove it from the project?
").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("Do you really want to delete
%1?
").tqarg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") ); + return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("Do you really want to delete
%1?
").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("There was an error running %1.
Check that you have the %2 executable installed and it is accessible.
").tqarg(command + " " + args).tqarg(command), i18n("Script Not Found")); + KMessageBox::error(m_parentMainWindow, i18n("There was an error running %1.
Check that you have the %2 executable installed and it is accessible.
").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("There was an error running %1.
Check that you have the %2 executable installed and it is accessible.
").tqarg(command + " " + args).tqarg(command), i18n("Script Not Found")); + KMessageBox::error(m_parentMainWindow, i18n("There was an error running %1.
Check that you have the %2 executable installed and it is accessible.
").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("The filtering action %1 seems to be locked.
Do you want to terminate it?
").tqarg(actionText()), i18n("Action Not Responding"), i18n("Terminate"), i18n("Keep Running")) == KMessageBox::Yes)) + if ((m_killCount == 0) && (KMessageBox::questionYesNo(m_parentMainWindow, i18n("The filtering action %1 seems to be locked.
Do you want to terminate it?
").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..b3e58d56 100644 --- a/quanta/utility/toolbartabwidget.cpp +++ b/quanta/utility/toolbartabwidget.cpp @@ -14,7 +14,7 @@ //qt includes #include -#include +#include #include #include #include @@ -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(TQT_TQWIDGET(tqchildrenList->at(i))); + KToolBarButton *w = static_cast(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("Are you sure you want to remove the %1 action?").tqarg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove the %1 action?").arg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) { emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName); } -- cgit v1.2.1