summaryrefslogtreecommitdiffstats
path: root/libktorrent/util
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:16 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:16 -0600
commit42a9872891eba166e81cf4f8c062261cc77398f8 (patch)
tree86b4f99b354b8d8eabeca2ffe1874b3c4c90d957 /libktorrent/util
parentf96f74ffa7040e64ae3352e08c810c383c8a0ba2 (diff)
downloadktorrent-42a9872891eba166e81cf4f8c062261cc77398f8.tar.gz
ktorrent-42a9872891eba166e81cf4f8c062261cc77398f8.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit f96f74ffa7040e64ae3352e08c810c383c8a0ba2.
Diffstat (limited to 'libktorrent/util')
-rw-r--r--libktorrent/util/autorotatelogjob.cpp4
-rw-r--r--libktorrent/util/file.cpp4
-rw-r--r--libktorrent/util/fileops.cpp66
-rw-r--r--libktorrent/util/log.cpp10
-rw-r--r--libktorrent/util/profiler.cpp14
-rw-r--r--libktorrent/util/profiler.h2
6 files changed, 50 insertions, 50 deletions
diff --git a/libktorrent/util/autorotatelogjob.cpp b/libktorrent/util/autorotatelogjob.cpp
index de4d1c5..d3a2d8a 100644
--- a/libktorrent/util/autorotatelogjob.cpp
+++ b/libktorrent/util/autorotatelogjob.cpp
@@ -46,8 +46,8 @@ namespace bt
{
while (cnt > 1)
{
- TQString prev = TQString("%1-%2.gz").arg(file).arg(cnt - 1);
- TQString curr = TQString("%1-%2.gz").arg(file).arg(cnt);
+ TQString prev = TQString("%1-%2.gz").tqarg(file).tqarg(cnt - 1);
+ TQString curr = TQString("%1-%2.gz").tqarg(file).tqarg(cnt);
if (bt::Exists(prev)) // if file exists start the move job
{
KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false);
diff --git a/libktorrent/util/file.cpp b/libktorrent/util/file.cpp
index d27ccba..f757142 100644
--- a/libktorrent/util/file.cpp
+++ b/libktorrent/util/file.cpp
@@ -84,7 +84,7 @@ namespace bt
if (errno == ENOSPC)
Out() << "Disk full !" << endl;
- throw Error(i18n("Cannot write to %1 : %2").arg(file).arg(strerror(errno)));
+ throw Error(i18n("Cannot write to %1 : %2").tqarg(file).tqarg(strerror(errno)));
}
return ret;
}
@@ -98,7 +98,7 @@ namespace bt
if (ferror(fptr))
{
clearerr(fptr);
- throw Error(i18n("Cannot read from %1").arg(file));
+ throw Error(i18n("Cannot read from %1").tqarg(file));
}
return ret;
}
diff --git a/libktorrent/util/fileops.cpp b/libktorrent/util/fileops.cpp
index d9ef172..a83134a 100644
--- a/libktorrent/util/fileops.cpp
+++ b/libktorrent/util/fileops.cpp
@@ -76,10 +76,10 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot create directory %1: %2")
- .arg(dir).arg(strerror(errno)));
+ .tqarg(dir).tqarg(strerror(errno)));
else
{
- Out() << TQString("Error : Cannot create directory %1 : %2").arg(dir).arg(strerror(errno))<< endl;
+ Out() << TQString("Error : Cannot create directory %1 : %2").tqarg(dir).tqarg(strerror(errno))<< endl;
}
}
}
@@ -90,12 +90,12 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot symlink %1 to %2: %3")
- .arg(link_url.utf8().data()).arg(link_to.utf8().data())
- .arg(strerror(errno)));
+ .tqarg(link_url.utf8().data()).tqarg(link_to.utf8().data())
+ .tqarg(strerror(errno)));
else
Out() << TQString("Error : Cannot symlink %1 to %2: %3")
- .arg(link_url.utf8().data()).arg(link_to.utf8().data())
- .arg(strerror(errno)) << endl;
+ .tqarg(link_url.utf8().data()).tqarg(link_to.utf8().data())
+ .tqarg(strerror(errno)) << endl;
}
}
@@ -106,12 +106,12 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot move %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot move %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()) << endl;
}
}
@@ -122,12 +122,12 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot copy %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot copy %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()) << endl;
}
}
@@ -138,12 +138,12 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot copy %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot copy %1 to %2: %3")
- .arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .tqarg(src).tqarg(dst)
+ .tqarg(KIO::NetAccess::lastErrorString()) << endl;
}
}
@@ -230,8 +230,8 @@ namespace bt
if (!ok)
{
TQString err = i18n("Cannot delete %1: %2")
- .arg(url)
- .arg(strerror(errno));
+ .tqarg(url)
+ .tqarg(strerror(errno));
if (!nothrow)
throw Error(err);
else
@@ -249,8 +249,8 @@ namespace bt
{
if (!nothrow)
throw Error(i18n("Cannot create %1: %2")
- .arg(url)
- .arg(fptr.errorString()));
+ .tqarg(url)
+ .tqarg(fptr.errorString()));
else
Out() << "Error : Cannot create " << url << " : "
<< fptr.errorString() << endl;
@@ -270,7 +270,7 @@ namespace bt
#endif
if (ret < 0)
throw Error(i18n("Cannot calculate the filesize of %1: %2")
- .arg(url).arg(strerror(errno)));
+ .tqarg(url).tqarg(strerror(errno)));
return (Uint64)sb.st_size;
}
@@ -286,7 +286,7 @@ namespace bt
ret = fstat(fd,&sb);
#endif
if (ret < 0)
- throw Error(i18n("Cannot calculate the filesize : %2").arg(strerror(errno)));
+ throw Error(i18n("Cannot calculate the filesize : %2").tqarg(strerror(errno)));
return (Uint64)sb.st_size;
}
@@ -314,7 +314,7 @@ namespace bt
{
int fd = ::open(TQFile::encodeName(path),O_RDWR | O_LARGEFILE);
if (fd < 0)
- throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno)));
+ throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno)));
bool ret = FatPreallocate(fd,size);
close(fd);
@@ -343,7 +343,7 @@ namespace bt
{
int fd = ::open(TQFile::encodeName(path), O_RDWR | O_LARGEFILE);
if (fd < 0)
- throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno)));
+ throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno)));
bool ret = XfsPreallocate(fd,size);
close(fd);
@@ -364,16 +364,16 @@ namespace bt
#else
if (ftruncate(fd,size) == -1)
#endif
- throw Error(i18n("Cannot expand file : %1").arg(strerror(errno)));
+ throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno)));
}
else
{
#if HAVE_POSIX_FALLOCATE64
if (posix_fallocate64(fd,0,size) != 0)
- throw Error(i18n("Cannot expand file : %1").arg(strerror(errno)));
+ throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno)));
#elif HAVE_POSIX_FALLOCATE
if (posix_fallocate(fd,0,size) != 0)
- throw Error(i18n("Cannot expand file : %1").arg(strerror(errno)));
+ throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno)));
#else
SeekFile(fd,0,SEEK_SET);
bt::Array<Uint8> buf(4096);
@@ -388,9 +388,9 @@ namespace bt
int ret = write(fd,buf,to_write);
if (ret < 0)
- throw Error(i18n("Cannot expand file : %1").arg(strerror(errno)));
+ throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno)));
else if (ret == 0 || ret != (int)to_write)
- throw Error(i18n("Cannot expand file").arg(strerror(errno)));
+ throw Error(i18n("Cannot expand file").tqarg(strerror(errno)));
else
written += to_write;
}
@@ -402,7 +402,7 @@ namespace bt
{
int fd = ::open(TQFile::encodeName(path),O_RDWR | O_LARGEFILE);
if (fd < 0)
- throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno)));
+ throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno)));
try
{
@@ -423,7 +423,7 @@ namespace bt
#else
if (lseek(fd,off,whence) == -1)
#endif
- throw Error(i18n("Cannot seek in file : %1").arg(strerror(errno)));
+ throw Error(i18n("Cannot seek in file : %1").tqarg(strerror(errno)));
}
bool FreeDiskSpace(const TQString & path,Uint64 & bytes_free)
diff --git a/libktorrent/util/log.cpp b/libktorrent/util/log.cpp
index 9594532..6030e99 100644
--- a/libktorrent/util/log.cpp
+++ b/libktorrent/util/log.cpp
@@ -22,7 +22,7 @@
#include <kprocess.h>
#include <klocale.h>
#include <tqdatetime.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <tqfile.h>
#include <tqptrlist.h>
#include <iostream>
@@ -79,8 +79,8 @@ namespace bt
// move all log files one up
for (Uint32 i = 10;i > 1;i--)
{
- TQString prev = TQString("%1-%2.gz").arg(file).arg(i - 1);
- TQString curr = TQString("%1-%2.gz").arg(file).arg(i);
+ TQString prev = TQString("%1-%2.gz").tqarg(file).tqarg(i - 1);
+ TQString curr = TQString("%1-%2.gz").tqarg(file).tqarg(i);
if (bt::Exists(prev))
bt::Move(prev,curr,true);
}
@@ -100,7 +100,7 @@ namespace bt
fptr.setName(file);
if (!fptr.open(IO_WriteOnly))
- throw Error(i18n("Cannot open log file %1 : %2").arg(file).arg(fptr.errorString()));
+ throw Error(i18n("Cannot open log file %1 : %2").tqarg(file).tqarg(fptr.errorString()));
out->setDevice(TQT_TQIODEVICE(&fptr));
}
@@ -116,7 +116,7 @@ namespace bt
// this could result in the loss of some messages
if (!rotate_job)
{
- *out << TQDateTime::currentDateTime().toString() << ": " << tmp << ::endl;
+ *out << TQDateTime::tqcurrentDateTime().toString() << ": " << tmp << ::endl;
fptr.flush();
if (to_cout)
std::cout << TQString(tmp.local8Bit()) << std::endl;
diff --git a/libktorrent/util/profiler.cpp b/libktorrent/util/profiler.cpp
index 3cacbe3..a0f42d2 100644
--- a/libktorrent/util/profiler.cpp
+++ b/libktorrent/util/profiler.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#ifdef KT_PROFILE
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <sys/time.h>
#include "profiler.h"
@@ -30,7 +30,7 @@ namespace bt
min = max = avg = 0.0;
count = 0;
start_time = 0.0;
- children.setAutoDelete(true);
+ tqchildren.setAutoDelete(true);
}
Profile::~Profile()
@@ -63,8 +63,8 @@ namespace bt
Profile* Profile::child(const TQString & name)
{
- TQPtrList<Profile>::iterator i = children.begin();
- while (i != children.end())
+ TQPtrList<Profile>::iterator i = tqchildren.begin();
+ while (i != tqchildren.end())
{
Profile* p = *i;
if (p->name == name)
@@ -73,7 +73,7 @@ namespace bt
}
Profile* p = new Profile(this,name);
- children.append(p);
+ tqchildren.append(p);
return p;
}
@@ -84,8 +84,8 @@ namespace bt
out.precision(5);
out << qSetW(60) << nb << qSetW(10) << min << qSetW(10) << max << qSetW(10) << avg << qSetW(10) << count << endl;
- TQPtrList<Profile>::iterator i = children.begin();
- while (i != children.end())
+ TQPtrList<Profile>::iterator i = tqchildren.begin();
+ while (i != tqchildren.end())
{
Profile* p = *i;
p->save(out,nb);
diff --git a/libktorrent/util/profiler.h b/libktorrent/util/profiler.h
index 1b220b1..917a671 100644
--- a/libktorrent/util/profiler.h
+++ b/libktorrent/util/profiler.h
@@ -35,7 +35,7 @@ namespace bt
class Profile
{
Profile* parent;
- TQPtrList<Profile> children;
+ TQPtrList<Profile> tqchildren;
TQString name;
double min,max,avg;