aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/links/LinksWindow.cpp
diff options
context:
space:
mode:
authorGravatar Elvio Basello2011-01-10 18:36:59 +0000
committerGravatar Elvio Basello2011-01-10 18:36:59 +0000
commit78735b180c2ba56fa1cf4fd578726d457626e80a (patch)
tree12b359e1e59b7585dc89878e2eeae54982baa4e1 /src/modules/links/LinksWindow.cpp
parentupdated perlcore's xs include, hopefully fixing #1068 (diff)
downloadKVIrc-78735b180c2ba56fa1cf4fd578726d457626e80a.tar.gz
KVIrc-78735b180c2ba56fa1cf4fd578726d457626e80a.tar.bz2
KVIrc-78735b180c2ba56fa1cf4fd578726d457626e80a.zip
killed some QString helpers. Pay attention to the localizations: format strings have changed!;
updated translation files; git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5328 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/links/LinksWindow.cpp')
-rw-r--r--src/modules/links/LinksWindow.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/modules/links/LinksWindow.cpp b/src/modules/links/LinksWindow.cpp
index eb92bc761..dacd5b01a 100644
--- a/src/modules/links/LinksWindow.cpp
+++ b/src/modules/links/LinksWindow.cpp
@@ -30,7 +30,6 @@
#include "kvi_out.h"
#include "KviOptions.h"
#include "KviLocale.h"
-#include "KviQString.h"
#include "kvi_out.h"
#include "KviMircCntrl.h"
#include "KviThemedLabel.h"
@@ -130,9 +129,8 @@ void LinksWindow::connectionStateChange()
m_pRequestButton->setEnabled(st == KviIrcContext::Connected);
if(st == KviIrcContext::Connected)
{
- QString tmp;
- KviQString::sprintf(tmp,__tr2qs("Connected to %s (%s)"),m_pConsole->connection()->currentServerName().toUtf8().data(),m_pConsole->currentNetworkName().toUtf8().data());
- m_pInfoLabel->setText(tmp);
+ QString szTmp = QString(__tr2qs("Connected to %1 (%2)")).arg(m_pConsole->connection()->currentServerName(),m_pConsole->currentNetworkName());
+ m_pInfoLabel->setText(szTmp);
} else {
m_pInfoLabel->setText(__tr2qs("Links cannot be requested: Not connected to a server"));
}
@@ -159,7 +157,7 @@ QSize LinksWindow::sizeHint() const
void LinksWindow::fillCaptionBuffers()
{
- KviQString::sprintf(m_szPlainTextCaption,__tr2qs("Links for %Q [IRC Context %u]"),&m_szRootServer,m_pConsole->context()->id());
+ m_szPlainTextCaption = QString(__tr2qs("Links for %1 [IRC Context %2]")).arg(m_szRootServer).arg(m_pConsole->context()->id());
}
void LinksWindow::die()
@@ -234,21 +232,20 @@ void LinksWindow::endOfLinks()
output(KVI_OUT_SYSTEMERROR,__tr2qs("Broken link: Missing parent (%s) for %s (%d hops): %s (used /LINKS <mask> ?)"),
l->parent.ptr(),l->host.ptr(),l->hops,l->description.ptr());
brokenLinks++;
- QString tmp;
- KviQString::sprintf(tmp,__tr2qs("%s: Parent link %s"),l->description.ptr(),l->parent.ptr());
+ QString szTmp = QString(__tr2qs("%1: Parent link %2")).arg(l->description.ptr(),l->parent.ptr());
KviCString tmp2(KviCString::Format,"%d",l->hops);
if(root)
{
it = new QTreeWidgetItem(root);
it->setText(0,QString(l->host.ptr()));
it->setText(1,QString(tmp2.ptr()));
- it->setText(2,tmp);
+ it->setText(2,szTmp);
} else {
outputNoFmt(KVI_OUT_SYSTEMERROR,__tr2qs("Warning: No root link was sent by the server, the stats may be invalid."));
it = new QTreeWidgetItem(m_pListView);
it->setText(0,QString(l->host.ptr()));
it->setText(1,QString(tmp2.ptr()));
- it->setText(2,tmp);
+ it->setText(2,szTmp);
}
} else {
it = (QTreeWidgetItem*) it->parent();