summaryrefslogtreecommitdiffstats
path: root/quanta/utility
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 10:00:36 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 10:00:36 -0600
commit1fffbdafa12271a1a635caf46777fb8acfb6f31b (patch)
tree707785bd058e254fd865ca30ed35f37f206aebbc /quanta/utility
parent2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 (diff)
downloadtdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.tar.gz
tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076.
Diffstat (limited to 'quanta/utility')
-rw-r--r--quanta/utility/qpevents.cpp16
-rw-r--r--quanta/utility/quantabookmarks.cpp10
-rw-r--r--quanta/utility/quantacommon.cpp16
-rw-r--r--quanta/utility/quantanetaccess.cpp8
-rw-r--r--quanta/utility/tagaction.cpp24
-rw-r--r--quanta/utility/toolbartabwidget.cpp14
6 files changed, 44 insertions, 44 deletions
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
index 81db90c2..b4d43f48 100644
--- a/quanta/utility/qpevents.cpp
+++ b/quanta/utility/qpevents.cpp
@@ -17,7 +17,7 @@
//qt includes
#include <tqdatetime.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
//kde includes
#include <kapplication.h>
@@ -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>").arg(ev.action).arg(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>").tqarg(ev.action).tqarg(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>").arg(ev.action).arg(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>").tqarg(ev.action).tqarg(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>").arg(name), i18n("Event Handling Error"));
+ KMessageBox::sorry(0L, i18n("<qt>Unsupported event <b>%1</b>.</qt>").tqarg(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::currentDateTime().toString(Qt::ISODate) + ": ";
+ TQString s = TQDateTime::tqcurrentDateTime().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("<qt>Logging failed. Check that you have write access to <i>%1</i>.").arg(url.path()));
+ KMessageBox::sorry(0L, i18n("<qt>Logging failed. Check that you have write access to <i>%1</i>.").tqarg(url.path()));
return false;
}
} else
- KMessageBox::sorry(0L, i18n("<qt>Unsupported internal event action : <b>%1</b>.</qt>").arg(ev.action));
+ KMessageBox::sorry(0L, i18n("<qt>Unsupported internal event action : <b>%1</b>.</qt>").tqarg(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>").arg(name), i18n("Action Execution Error"));
+ KMessageBox::sorry(0L, i18n("<qt>The <b>%1</b> script action was not found on your system.</qt>").tqarg(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 e5329b8a..3208a874 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\"").arg( (*it)->line+1 ).arg( bText ),
+ TQString("%1 - \"%2\"").tqarg( (*it)->line+1 ).tqarg( 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\"").arg( next->line + 1 )
- .arg( KStringHandler::rsqueeze( doc->editIf->textLine( next->line ), 24 ) ) );
+ m_goNext->setText( i18n("&Next: %1 - \"%2\"").tqarg( next->line + 1 )
+ .tqarg( KStringHandler::rsqueeze( doc->editIf->textLine( next->line ), 24 ) ) );
m_goNext->plug( &menu, idx );
idx++;
}
if ( prev )
{
- m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").arg(prev->line + 1 )
- .arg( KStringHandler::rsqueeze( doc->editIf->textLine( prev->line ), 24 ) ) );
+ m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").tqarg(prev->line + 1 )
+ .tqarg( 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 7d86f59e..e50e55da 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -23,7 +23,7 @@
#include <tqdir.h>
#include <tqdom.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <tqwidget.h>
//kde includes
@@ -50,7 +50,7 @@
#include <kstringhandler.h>
#include <tqwhatsthis.h>
#include <tqtimer.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqdatastream.h>
#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("<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>")
- .arg(url.prettyURL(0, KURL::StripFileProtocol))
- .arg(url.protocol()+"://"+url.user()+"@"+url.host()));}
+ .tqarg(url.prettyURL(0, KURL::StripFileProtocol))
+ .tqarg(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").arg(pid);
+ app += TQString("-%1").tqarg(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>" ).arg(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>" ).tqarg(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;").arg(replacementMap[code]);
+ return TQString("%1;").tqarg(replacementMap[code]);
else
- return TQString("&#%1;").arg(code);
+ return TQString("&#%1;").tqarg(code);
}
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
index 375f6f6d..69ddd0d5 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>").arg(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>").tqarg(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>").arg(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>").tqarg(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>").arg(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>").tqarg(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>").arg(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>").tqarg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") );
}
return true;
}
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 1db14cf1..f782ea9e 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").arg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.replace("%pid", TQString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").tqarg(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").arg(actionText()), false);
+ emit showMessage(i18n("The \"%1\" script started.\n").tqarg(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>").arg(command + " " + args).arg(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>").tqarg(command + " " + args).tqarg(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").arg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.replace("%pid", TQString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").tqarg(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").arg(actionText()), false);
+ emit showMessage(i18n("The \"%1\" script started.\n").tqarg(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>").arg(command + " " + args).arg(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>").tqarg(command + " " + args).tqarg(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").arg(actionText()), false);
+ emit showMessage(i18n("The \"%1\" script output:\n").tqarg(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").arg(actionText()), false);
+ emit showMessage(i18n("The \"%1\" script output:\n").tqarg(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.").arg(actionText()), false);
+ emit showMessage(i18n("The \"%1\" script has exited.").tqarg(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>").arg(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>").tqarg(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 b3e58d56..5331413a 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -14,7 +14,7 @@
//qt includes
#include <tqevent.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqobjectlist.h>
#include <tqpoint.h>
#include <tqtabbar.h>
@@ -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* childrenList = queryList("KToolBarButton");
- for (uint i = 0; i < childrenList->count(); i++)
+ TQObjectList* tqchildrenList = queryList("KToolBarButton");
+ for (uint i = 0; i < tqchildrenList->count(); i++)
{
- KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(childrenList->at(i)));
+ KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(tqchildrenList->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").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
- m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction()));
+ 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()));
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>").arg(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>").tqarg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue )
{
emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
}