summaryrefslogtreecommitdiffstats
path: root/src/tork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tork.cpp')
-rw-r--r--src/tork.cpp794
1 files changed, 397 insertions, 397 deletions
diff --git a/src/tork.cpp b/src/tork.cpp
index 22e5b61..00a5a47 100644
--- a/src/tork.cpp
+++ b/src/tork.cpp
@@ -20,12 +20,12 @@
***************************************************************************/
-#include <qdragobject.h>
+#include <ntqdragobject.h>
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qtimer.h>
-#include <qgroupbox.h>
+#include <ntqpainter.h>
+#include <ntqpaintdevicemetrics.h>
+#include <ntqtimer.h>
+#include <ntqgroupbox.h>
#include <kconfigdialog.h>
#include <kglobal.h>
@@ -61,12 +61,12 @@
#include <knotifyclient.h>
#include <klistviewsearchline.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtabwidget.h>
-#include <qhostaddress.h>
+#include <ntqtooltip.h>
+#include <ntqlabel.h>
+#include <ntqfile.h>
+#include <ntqdir.h>
+#include <ntqtabwidget.h>
+#include <ntqhostaddress.h>
#include <dcopref.h>
#include <dcopclient.h>
#include <kcmdlineargs.h>
@@ -106,13 +106,13 @@ const char *dayweekmonth[] = {
"month"
};
-QValueVector<QString> serverCondition(9);
-QValueVector<QString> logType(5);
-QValueVector<QString> torkifyApp(5);
-QValueVector<QString> torTrafficType(9);
-QValueVector<QString> nonTorTrafficType(9);
-QValueVector<QString> subnetType(256);
-QValueVector<QString> countryType(256);
+TQValueVector<TQString> serverCondition(9);
+TQValueVector<TQString> logType(5);
+TQValueVector<TQString> torkifyApp(5);
+TQValueVector<TQString> torTrafficType(9);
+TQValueVector<TQString> nonTorTrafficType(9);
+TQValueVector<TQString> subnetType(256);
+TQValueVector<TQString> countryType(256);
tork::tork()
@@ -210,7 +210,7 @@ tork::tork()
// Instanciate the LikeBack system, and show the first-use information dialog if the button-bar is shown:
LikeBack *likeBack = new LikeBack(LikeBack::AllButtons, LikeBack::isDevelopmentVersion(TORK_VERSION)); // Show button-bar only in beta-versions
likeBack->setServer("tork.sourceforge.net", "/likeback/send.php");
- likeBack->setAcceptedLanguages(QStringList::split(";", "en;fr"), i18n("Please write in English or French."));
+ likeBack->setAcceptedLanguages(TQStringList::split(";", "en;fr"), i18n("Please write in English or French."));
// Comment the following line once you are sure all your windows have a name:
likeBack->setWindowNamesListing(LikeBack::WarnUnnamedWindows);
@@ -222,8 +222,8 @@ tork::tork()
// and a status bar
statusBar()->show();
- m_statusInfo = new QLabel(this);
- m_statusTransfer = new QLabel(this);
+ m_statusInfo = new TQLabel(this);
+ m_statusTransfer = new TQLabel(this);
statusBar()->addWidget(m_statusInfo,2);
statusBar()->addWidget(m_statusTransfer,2);
@@ -246,10 +246,10 @@ tork::tork()
setUpnpORPort(TorkConfig::oRListenAddress());
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(updateTrayStats(const QString&, const QString&,
- const QString&, const QString&)),
- this, SLOT(updateTrayStats(const QString&,const QString&,
- const QString&, const QString&)));
+ connect(m_view, SIGNAL(updateTrayStats(const TQString&, const TQString&,
+ const TQString&, const TQString&)),
+ this, SLOT(updateTrayStats(const TQString&,const TQString&,
+ const TQString&, const TQString&)));
connect(m_view->m_osd, SIGNAL(requestHideMonitor()),
this, SLOT(toggleTorMon2()));
connect(m_view->m_osd, SIGNAL(requestToggleKDE()),
@@ -257,10 +257,10 @@ tork::tork()
connect(m_view->m_osd, SIGNAL(requestChangeID()),
this, SLOT(useNewIdentity()));
- connect(m_view, SIGNAL(showSecurityNotice(const QString&)),
- this, SLOT(showSecurityNotice(const QString&)));
- connect(m_view, SIGNAL(showScreamingNotice(const QString&)),
- this, SLOT(showScreamingNotice(const QString&)));
+ connect(m_view, SIGNAL(showSecurityNotice(const TQString&)),
+ this, SLOT(showSecurityNotice(const TQString&)));
+ connect(m_view, SIGNAL(showScreamingNotice(const TQString&)),
+ this, SLOT(showScreamingNotice(const TQString&)));
connect(m_view, SIGNAL(newIdentity()),
this, SLOT(useNewIdentity()));
@@ -297,22 +297,22 @@ tork::tork()
connect(m_view, SIGNAL(toggleNonTorTraffic(bool)),
this, SLOT(toggleNonTorTraffic(bool)));
- connect(m_view, SIGNAL(processWarning(const QString& , const QString& )),
- this, SLOT(processWarning(const QString& , const QString& )));
+ connect(m_view, SIGNAL(processWarning(const TQString& , const TQString& )),
+ this, SLOT(processWarning(const TQString& , const TQString& )));
connect(m_view, SIGNAL(copyOldConfig()),
this, SLOT(copyOldConfig()));
connect(UPnPManager::Manager(),SIGNAL(routerDiscovered( kt::UPnPRouter* )),
this,SLOT(routerDiscovered( kt::UPnPRouter* )));
- connect(UPnPManager::Manager(),SIGNAL(forwardingOK(kt::UPnPRouter*, const QString &, bool )),
- this,SLOT(upnpForwardingOK(kt::UPnPRouter*, const QString & , bool)));
- connect(UPnPManager::Manager(),SIGNAL(forwardingError(kt::UPnPRouter*, const QString &, bool )),
- this,SLOT(upnpForwardingError(kt::UPnPRouter*, const QString &, bool )));
+ connect(UPnPManager::Manager(),SIGNAL(forwardingOK(kt::UPnPRouter*, const TQString &, bool )),
+ this,SLOT(upnpForwardingOK(kt::UPnPRouter*, const TQString & , bool)));
+ connect(UPnPManager::Manager(),SIGNAL(forwardingError(kt::UPnPRouter*, const TQString &, bool )),
+ this,SLOT(upnpForwardingError(kt::UPnPRouter*, const TQString &, bool )));
/* if (!TorkConfig::clientOnly() && TorkConfig::forwardPorts()){
upnpmanager->discover();*/
- QTimer::singleShot( 20000, this, SLOT(checkRouterDiscovered()) );
+ TQTimer::singleShot( 20000, this, SLOT(checkRouterDiscovered()) );
/* }*/
@@ -421,10 +421,10 @@ void tork::prepareToShut()
//delete config;
// Inform all running io-slaves about the changes...
// if we cannot update, ioslaves inform the end user...
- if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", QString::null))
+ if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
{
- QString caption = i18n("Update Failed");
- QString message = i18n("You have to restart the running applications "
+ TQString caption = i18n("Update Failed");
+ TQString message = i18n("You have to restart the running applications "
"for these changes to take effect.");
KMessageBox::information (this, message, caption);
return;
@@ -533,7 +533,7 @@ void tork::setupActions()
toggleTorbar = new KAction(i18n("Toggle Tor Bar"), "tork_tor", 0,this,
SLOT(toggleTorBar()),actionCollection(),"toggle_torbar");
- connect(m_view->TorkTabs,SIGNAL(currentChanged( QWidget* )),SLOT(currentTabChanged( QWidget* )));
+ connect(m_view->TorkTabs,SIGNAL(currentChanged( TQWidget* )),SLOT(currentTabChanged( TQWidget* )));
//Servers Filter
@@ -845,8 +845,8 @@ void tork::setupActions()
_tray->updateStats(BytesPerSecToString(0),BytesPerSecToString(0),
BytesPerSecToString(0),BytesPerSecToString(0),
- QStringList("<font color='#990000'>Status Not Known</font>"),
- QStringList("<font color='#990000'>Status Not Known</font>"),
+ TQStringList("<font color='#990000'>Status Not Known</font>"),
+ TQStringList("<font color='#990000'>Status Not Known</font>"),
BytesPerSecToString(0));
_tray->show();
@@ -861,9 +861,9 @@ void tork::populateCountryMenu()
{
//GeoIP_country_name
- QValueList<int> tmplist = m_view->countryList();
+ TQValueList<int> tmplist = m_view->countryList();
qHeapSort( tmplist );
- for ( QValueList<int>::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
+ for ( TQValueList<int>::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
{
if (!continentMapList.contains(GeoIP_country_continent[(*it)])) {
kdDebug() << "unknown continent" << GeoIP_country_continent[(*it)] << endl;
@@ -874,8 +874,8 @@ void tork::populateCountryMenu()
continue;
}
continentMapList[GeoIP_country_continent[(*it)]]->insertItem(
- QString(GeoIP_country_code[(*it)]).contains("--") ? SmallIcon("help") :
- SmallIcon(QString("tork_%1").arg(GeoIP_country_code[(*it)]).lower()),
+ TQString(GeoIP_country_code[(*it)]).contains("--") ? SmallIcon("help") :
+ SmallIcon(TQString("tork_%1").arg(GeoIP_country_code[(*it)]).lower()),
GeoIP_country_name[(*it)],
this, SLOT( filterCountries( int ) ), 0, (*it) );
}
@@ -886,9 +886,9 @@ void tork::populatePseudoMenu()
{
//GeoIP_country_name
- QValueList<int> tmplist = m_view->countryList();
+ TQValueList<int> tmplist = m_view->countryList();
qHeapSort( tmplist );
- for ( QValueList<int>::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
+ for ( TQValueList<int>::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
{
if (!continentMap.contains(GeoIP_country_continent[(*it)])) {
kdDebug() << "unknown continent" << GeoIP_country_continent[(*it)] << endl;
@@ -898,8 +898,8 @@ void tork::populatePseudoMenu()
if ( continentMap[GeoIP_country_continent[(*it)]]->findItem( (*it) ) )
continue;
continentMap[GeoIP_country_continent[(*it)]]->insertItem(
- QString(GeoIP_country_code[(*it)]).contains("--") ? SmallIcon("help") :
- SmallIcon(QString("tork_%1").arg(GeoIP_country_code[(*it)]).lower()),
+ TQString(GeoIP_country_code[(*it)]).contains("--") ? SmallIcon("help") :
+ SmallIcon(TQString("tork_%1").arg(GeoIP_country_code[(*it)]).lower()),
GeoIP_country_name[(*it)],
this, SLOT( applyPseudonymity( int ) ), 0, (*it) );
}
@@ -914,7 +914,7 @@ void tork::applyPseudonymity( int country_id )
}
// Update Menu
- for ( QMap<QString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
+ for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
{
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index),false);
@@ -937,13 +937,13 @@ void tork::applyPseudonymity( int country_id )
continentMap[GeoIP_country_continent[country_id]]->setItemChecked( country_id,
!continentMap[GeoIP_country_continent[country_id]]->isItemChecked(country_id) ); //uncheck old item
- QStringList currentList;
- QString cc = QString("%1").arg(country_id);
+ TQStringList currentList;
+ TQString cc = TQString("%1").arg(country_id);
- QListViewItemIterator it(m_view->serverList);
+ TQListViewItemIterator it(m_view->serverList);
while ( it.current() ) {
if ((*it)->text(4) == cc){
- QString node = "$"+getFPFromFPDigest((*it)->text(2));
+ TQString node = "$"+getFPFromFPDigest((*it)->text(2));
currentList.append(node);
}
++it;
@@ -954,7 +954,7 @@ void tork::applyPseudonymity( int country_id )
// Update Tor with new exit list and flush all existing circuits
if (client != 0L){
//Close all open circuits first
- QListView* tmp = dynamic_cast<QListView*>(m_view->circuitList);
+ TQListView* tmp = dynamic_cast<TQListView*>(m_view->circuitList);
client->closeAllCircuits(tmp);
//Then apply new exit list
client->updateExitNodes();
@@ -974,13 +974,13 @@ void tork::populateSubNetMenu()
m_IPFilterMenu->insertItem( "All", this, SLOT( filterSubnets( int ) ), 0, 0);
}
- QStringList tmplist = m_view->subnet16List();
+ TQStringList tmplist = m_view->subnet16List();
tmplist.sort();
- for ( QStringList::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
+ for ( TQStringList::Iterator it = tmplist.begin(); it != tmplist.end(); ++it )
{
if ((*it).isEmpty())
continue;
- QString tmpit = (*it);
+ TQString tmpit = (*it);
int index = tmpit.replace(".","").toInt();
if ( m_IPFilterMenu->findItem( index ) )
@@ -999,7 +999,7 @@ void tork::torkify(int id)
}
void
-tork::currentTabChanged(QWidget* cur ) //SLOT
+tork::currentTabChanged(TQWidget* cur ) //SLOT
{
toolBar()->setIconText( KToolBar::IconTextRight, false );
@@ -1065,13 +1065,13 @@ tork::sortByCountry( ) //SLOT
void
tork::filterSubnets( int ) //SLOT
{
- //filterView(subnetType, (QListView*&)m_view->serverList, m_IPFilterMenu, id, 5);
+ //filterView(subnetType, (TQListView*&)m_view->serverList, m_IPFilterMenu, id, 5);
}
void
tork::filterNonTorTraffic( int id ) //SLOT
{
- QListViewItemIterator it(m_view->NonTorTraffic);
+ TQListViewItemIterator it(m_view->NonTorTraffic);
while ( it.current() ) {
it.current()->setVisible(false);
++it;
@@ -1085,7 +1085,7 @@ tork::filterNonTorTraffic( int id ) //SLOT
void
tork::filterTorTraffic( int id ) //SLOT
{
- QListViewItemIterator it(m_view->TorTraffic);
+ TQListViewItemIterator it(m_view->TorTraffic);
while ( it.current() ) {
it.current()->setVisible(false);
++it;
@@ -1237,9 +1237,9 @@ tork::configureSecurity( int id ) //SLOT
if (m_SecurityButtonMenu->isItemChecked( id))
return;
- QString cmd;
- QString iconstring;
- QString filterRequest;
+ TQString cmd;
+ TQString iconstring;
+ TQString filterRequest;
filterId = id;
@@ -1277,7 +1277,7 @@ tork::configureSecurity( int id ) //SLOT
filterproc = new KProcIO();
filterproc->setUseShell(TRUE);
- QString filterCommand= QString("kdesu --noignorebutton --miniicon tork --caption '%1' -t -i %2 -d -c "
+ TQString filterCommand= TQString("kdesu --noignorebutton --miniicon tork --caption '%1' -t -i %2 -d -c "
"'%3'").arg(filterRequest).arg(iconstring).arg(cmd);
connect( filterproc, SIGNAL(readReady(KProcIO * )),
SLOT(processFilter(KProcIO * )) );
@@ -1291,7 +1291,7 @@ tork::configureSecurity( int id ) //SLOT
void tork::processFilter(KProcIO *filterproc)
{
- QString item = "";
+ TQString item = "";
int pos;
while ((pos = (filterproc->readln(item,true))) != -1) {
@@ -1367,26 +1367,26 @@ void tork::filterExited()
filterproc = 0L;
}
-QString tork::createFailSafeCommand( const QStringList &filterRules, bool set ) //SLOT
+TQString tork::createFailSafeCommand( const TQStringList &filterRules, bool set ) //SLOT
{
- QString cmd;
- QStringList rules = filterRules;
- for ( QStringList::Iterator it = rules.begin(); it != rules.end(); ++it )
+ TQString cmd;
+ TQStringList rules = filterRules;
+ for ( TQStringList::Iterator it = rules.begin(); it != rules.end(); ++it )
{
if ((*it).isEmpty())
continue;
- QString active = (*it).section("%:%",0,0);
+ TQString active = (*it).section("%:%",0,0);
if (active.contains("button_cancel") && (set))
continue;
- QString entry = (*it).section("%:%",2,2);
+ TQString entry = (*it).section("%:%",2,2);
if (set){
- cmd.append(QString("%1;").arg(entry));
+ cmd.append(TQString("%1;").arg(entry));
}else{
- cmd.append(QString("%1;").arg(entry.replace(" -I "," -D ")));
+ cmd.append(TQString("%1;").arg(entry.replace(" -I "," -D ")));
}
}
@@ -1397,7 +1397,7 @@ QString tork::createFailSafeCommand( const QStringList &filterRules, bool set )
void
tork::filterLog( int id ) //SLOT
{
- QListViewItemIterator it(m_view->infoList);
+ TQListViewItemIterator it(m_view->infoList);
while ( it.current() ) {
it.current()->setVisible(false);
++it;
@@ -1422,7 +1422,7 @@ tork::filterCountries( int id ) //SLOT
// If 'All'is selected, display all entries; otherwise hide all entries
- QListViewItemIterator it(m_view->serverList);
+ TQListViewItemIterator it(m_view->serverList);
while ( it.current() ) {
it.current()->setVisible(m_CountryMenu->isItemChecked(251));
++it;
@@ -1435,7 +1435,7 @@ tork::filterCountries( int id ) //SLOT
// Display servers for each selected country
- for ( QMap<QString, KPopupMenu*>::Iterator menu = continentMapList.begin();
+ for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMapList.begin();
menu != continentMapList.end(); ++menu ){
if (m_CountryMenu->isItemChecked(251)){ // If 'All' selected, deselect all items
for (unsigned int index = 0; index != menu.data()->count(); ++index){
@@ -1444,7 +1444,7 @@ tork::filterCountries( int id ) //SLOT
continue;
}
menu.data()->setItemChecked( id, !menu.data()->isItemChecked(id) ); // Toggle selected item
- QListView* tmp = dynamic_cast<QListView*>(m_view->serverList);
+ TQListView* tmp = dynamic_cast<TQListView*>(m_view->serverList);
filterView(countryType, tmp, menu.data(), id, 4);
}
@@ -1455,7 +1455,7 @@ tork::filterCountries( int id ) //SLOT
}
// Of servers displayed above, display only the ones with all selected criteria.
- QListView* tmp = dynamic_cast<QListView*>(m_view->serverList);
+ TQListView* tmp = dynamic_cast<TQListView*>(m_view->serverList);
filterViewServers(serverCondition, tmp, m_ServerFilterMenu, 99, 3);
}
@@ -1464,7 +1464,7 @@ void
tork::toggleIP( int id ) //SLOT
{
- QListViewItemIterator it(m_view->serverList);
+ TQListViewItemIterator it(m_view->serverList);
if (m_ServerFilterMenu->text( id ).contains("IP")) {
while ( it.current() ) {
it.current()->setText(1,it.current()->text(5));
@@ -1511,7 +1511,7 @@ tork::filterServers( int id ) //SLOT
//We always need to get all servers for selected countries again
if (m_CountryMenu->isItemChecked( 251 )){ // If 'All' countries are selected
- QListViewItemIterator it(m_view->serverList);
+ TQListViewItemIterator it(m_view->serverList);
while ( it.current() ) {
it.current()->setVisible(true);
++it;
@@ -1519,16 +1519,16 @@ tork::filterServers( int id ) //SLOT
}else{
- QListViewItemIterator it(m_view->serverList);
+ TQListViewItemIterator it(m_view->serverList);
while ( it.current() ) {
it.current()->setVisible(false);
++it;
}
- for ( QMap<QString,
+ for ( TQMap<TQString,
KPopupMenu*>::Iterator menu = continentMapList.begin();
menu != continentMapList.end(); ++menu ){
- QListView* tmp = dynamic_cast<QListView*>(m_view->serverList);
+ TQListView* tmp = dynamic_cast<TQListView*>(m_view->serverList);
filterView(countryType, tmp, menu.data(), 255, 4);
}
}
@@ -1550,18 +1550,18 @@ tork::filterServers( int id ) //SLOT
// Of servers displayed above, display only the ones with all selected
//criteria.
- QListView* tmp = dynamic_cast<QListView*>(m_view->serverList);
+ TQListView* tmp = dynamic_cast<TQListView*>(m_view->serverList);
filterViewServers(serverCondition, tmp, m_ServerFilterMenu, id, 3);
}
void
-tork::filterView( QValueVector<QString> &possibleValues, QListView* &view,
+tork::filterView( TQValueVector<TQString> &possibleValues, TQListView* &view,
KPopupMenu* &menu, int id, int column ){
if (possibleValues[id] == "All"){
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
while ( it.current() ) {
it.current()->setVisible(true);
++it;
@@ -1580,10 +1580,10 @@ tork::filterView( QValueVector<QString> &possibleValues, QListView* &view,
else
menu->setItemChecked( 0, false ); //Uncheck 'All' Item
- QString check;
+ TQString check;
for (unsigned int index = 0; index != possibleValues.count(); ++index){
if (menu->isItemChecked( menu->idAt(index) )){
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
while ( it.current() ) {
if (possibleValues == countryType)
check = GeoIP_country_code[it.current()->text(column).toInt()];
@@ -1600,15 +1600,15 @@ tork::filterView( QValueVector<QString> &possibleValues, QListView* &view,
}
void
-tork::filterViewServers( QValueVector<QString> &possibleValues,
- QListView* &view, KPopupMenu* &menu, int ,
+tork::filterViewServers( TQValueVector<TQString> &possibleValues,
+ TQListView* &view, KPopupMenu* &menu, int ,
int column) //SLOT
{
for (unsigned int index = 0; index != possibleValues.count(); ++index){
if (menu->isItemChecked( menu->idAt(index) )){
- QListViewItemIterator it(view,QListViewItemIterator::Visible);
+ TQListViewItemIterator it(view,TQListViewItemIterator::Visible);
while ( it.current() ) {
if (!it.current()->text(column)
@@ -1628,22 +1628,22 @@ void
tork::createSubnetList( ) //SLOT
{
- QListViewItem *nextOne;
- QListViewItem *tm;
+ TQListViewItem *nextOne;
+ TQListViewItem *tm;
- for (QListViewItem *child = m_view->serverList->firstChild(); child;
+ for (TQListViewItem *child = m_view->serverList->firstChild(); child;
child = nextOne) {
nextOne = child->nextSibling();
- QRegExp rx("^[0-9]{1,3}\\.[0-9]{1,3}\\.");
+ TQRegExp rx("^[0-9]{1,3}\\.[0-9]{1,3}\\.");
rx.search(child->text(5));
- QString tmp = rx.cap(0);
+ TQString tmp = rx.cap(0);
if (tmp.isEmpty()){
break;
}
if (!( tm = m_view->serverList->findItem((tmp),0))){
- tm = new QListViewItem(m_view->serverList, tmp,
+ tm = new TQListViewItem(m_view->serverList, tmp,
"a","a","a","a","a");
}
@@ -1783,7 +1783,7 @@ void tork::optionsPreferences()
}
-void tork::openConfig(const QCString& page)
+void tork::openConfig(const TQCString& page)
{
copyOldConfig();
@@ -1813,7 +1813,7 @@ void tork::openConfig(const QCString& page)
}
-void tork::updateTrayIcon(const QString& iconName)
+void tork::updateTrayIcon(const TQString& iconName)
{
kdDebug() << "show icon " << iconName << endl;
@@ -1826,8 +1826,8 @@ void tork::updateTrayIcon(const QString& iconName)
if (TorkConfig::clientOnly())
return;
- QPixmap icon = KSystemTray::loadIcon( iconName );
- QPixmap overlay = KSystemTray::loadIcon( "tork_server" );
+ TQPixmap icon = KSystemTray::loadIcon( iconName );
+ TQPixmap overlay = KSystemTray::loadIcon( "tork_server" );
if ( !overlay.isNull() )
{
@@ -1835,9 +1835,9 @@ void tork::updateTrayIcon(const QString& iconName)
int y = icon.height() - overlay.height();
if ( icon.mask() )
{
- QBitmap mask = *icon.mask();
+ TQBitmap mask = *icon.mask();
bitBlt( &mask, x, y,
- overlay.mask() ? const_cast<QBitmap *>(overlay.mask()) : &overlay,
+ overlay.mask() ? const_cast<TQBitmap *>(overlay.mask()) : &overlay,
0, 0, overlay.width(), overlay.height(),
overlay.mask() ? OrROP : SetROP );
icon.setMask(mask);
@@ -1850,30 +1850,30 @@ void tork::updateTrayIcon(const QString& iconName)
}
-void tork::updateTrayStats(const QString& totin,const QString& totout, const QString& in,const QString& out)
+void tork::updateTrayStats(const TQString& totin,const TQString& totout, const TQString& in,const TQString& out)
{
if (client == 0L)
return;
- QStringList cli = client->currentClientReport();
- QStringList server = client->currentServerReport();
+ TQStringList cli = client->currentClientReport();
+ TQStringList server = client->currentServerReport();
_tray->updateStats(totin, totout, in, out, server, cli,
BytesPerSecToString(client->getCurBandwidthRate()));
- QString tmp1 = i18n("Transferred up: %1 / down: %2")
+ TQString tmp1 = i18n("Transferred up: %1 / down: %2")
.arg(totout)
.arg(totin);
m_statusTransfer->setText(tmp1);
updateServerClientStatusBar(cli,server);
}
-void tork::updateServerClientStatusBar(const QStringList &client, const QStringList &server)
+void tork::updateServerClientStatusBar(const TQStringList &client, const TQStringList &server)
{
static unsigned int iter = 0;
unsigned int serverCount = server.count();
if (iter > serverCount){
iter = 0;
- QString tmp1 = i18n("Client: %1")
+ TQString tmp1 = i18n("Client: %1")
.arg(client[0]);
m_statusInfo->setText(tmp1.replace("<font color='#990000'>","")
.replace("</font>",""));
@@ -1885,7 +1885,7 @@ void tork::updateServerClientStatusBar(const QStringList &client, const QStringL
iter = serverCount;
return;
}
- m_statusInfo->setText(QString("Server: %1").arg(server[iter])
+ m_statusInfo->setText(TQString("Server: %1").arg(server[iter])
.replace("<font color='#990000'>","")
.replace("</font>",""));
iter++;
@@ -1893,24 +1893,24 @@ void tork::updateServerClientStatusBar(const QStringList &client, const QStringL
}
-void tork::changeStatusbar(const QString& in,const QString& out)
+void tork::changeStatusbar(const TQString& in,const TQString& out)
{
if ((in == "zero") && (out =="zero")){
- QString tmp1 = i18n("Transferred up: 0 B / down: 0 B");
+ TQString tmp1 = i18n("Transferred up: 0 B / down: 0 B");
m_statusTransfer->setText(tmp1);
}
}
-void tork::sayWhatImDoing(const QString& text)
+void tork::sayWhatImDoing(const TQString& text)
{
// display the text on the caption
m_statusInfo->setText(text);
}
-void tork::changeCaption(const QString& text)
+void tork::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
@@ -1925,7 +1925,7 @@ void tork::startTor()
return;
m_list.clear();
- if (TorkConfig::torLocation().isEmpty() || (!QFile::exists(TorkConfig::torLocation()))){
+ if (TorkConfig::torLocation().isEmpty() || (!TQFile::exists(TorkConfig::torLocation()))){
processWarning( "notorexecutable",i18n("You can't find me.") );
return;
@@ -1936,7 +1936,7 @@ void tork::startTor()
childproc = new KProcIO();
childproc->setUseShell(TRUE);
- QString torConfFile = writeConf();
+ TQString torConfFile = writeConf();
@@ -2013,7 +2013,7 @@ void tork::stopTor()
//Reset Country filter menu to 'All' checked
- for ( QMap<QString, KPopupMenu*>::Iterator menu = continentMapList.begin(); menu != continentMapList.end(); ++menu ){
+ for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMapList.begin(); menu != continentMapList.end(); ++menu ){
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index), false );
}
@@ -2028,7 +2028,7 @@ void tork::stopTor()
//Reset Pseudonymity filter menu to 'All' checked
- for ( QMap<QString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
+ for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
{
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index),false);
@@ -2059,70 +2059,70 @@ void tork::stopController()
disconnect( client, SIGNAL(fatalError()),this, SLOT(cannotContactTor()));
disconnect( client, SIGNAL(torConnectionClosed()), this, SLOT(torClosedConnection()) );
- disconnect( client, SIGNAL(streamStatusUpdate(const QString &, const QString &,
- const QString &, const QString &, const QString &)),
- m_view,SLOT(streamStatusUpdated(const QString &, const QString &,
- const QString &, const QString &, const QString &)) );
- disconnect( client, SIGNAL(ORStatusUpdate(const QString &, const QString &)),
- m_view,SLOT(ORStatusUpdated(const QString &, const QString &)) );
- disconnect( client, SIGNAL(guardStatusUpdate(const QString &, const QString &)),
- m_view,SLOT(guardStatusUpdated(const QString &, const QString &)) );
- disconnect( client, SIGNAL(circuitStatusUpdate(const QString &, const QString &,
- const QString &, const QString &)),
- m_view,SLOT(circuitStatusUpdated(const QString &, const QString &,
- const QString &, const QString &)) );
- disconnect( client, SIGNAL(infoUpdate(const QString &,const QString &, const QString &)),
- this,SLOT(infoUpdated(const QString &,const QString &, const QString &)) );
- disconnect( client, SIGNAL(bwUpdate(const QString &,const QString &)),
- m_view,SLOT(bwUpdated(const QString &,const QString &)) );
- disconnect( client, SIGNAL(streamBwUpdate(const QString &,const QString &,const QString &)),
- m_view,SLOT(streamBwUpdated(const QString &,const QString &,const QString &)) );
-
- disconnect( client, SIGNAL(updateActiveServers(const QStringList &)),
- m_view,SLOT(activeServersUpdated(const QStringList &)) );
- disconnect( client, SIGNAL(updateServerStatus(const QString &,const QString &,
- const QString &,const QString &)),
- m_view,SLOT(serverStatusUpdated(const QString &,const QString &,
- const QString &,const QString &)) );
-
- disconnect( client, SIGNAL(setTorCaption(const QString &)),
- this,SLOT(setTorCaption(const QString &)) );
-
-
- disconnect(m_view->circuitList, SIGNAL(attach(const QString &,const QString &)),
- client, SLOT(attemptAttach(const QString &,const QString & )) );
- disconnect(m_view->circuitList, SIGNAL(extendCircuit(const QString &, const QString &, bool)),
- client, SLOT(attemptExtendCircuit(const QString &, const QString &, bool)) );
- disconnect(m_view->circuitList, SIGNAL(createCircuit(const QString &, bool)),
- client, SLOT(attemptCreateCircuit(const QString &, bool)) );
-
-
- disconnect( m_view->serverList, SIGNAL(mouseButtonPressed (int, QListViewItem *,
- const QPoint &, int)), this, SLOT(slotOnItem ( int, QListViewItem *,
- const QPoint &, int )));
- disconnect( m_view->ORList, SIGNAL(pressed ( QListViewItem * )), this,
- SLOT(slotOnORItem ( QListViewItem * )));
-
-
- disconnect(m_view->m_osd, SIGNAL(closeStream(const QString &)),
- client, SLOT(attemptCloseStream(const QString & )) );
- disconnect(m_view, SIGNAL(closeStream(const QString &)),
- client, SLOT(attemptCloseStream(const QString & )) );
+ disconnect( client, SIGNAL(streamStatusUpdate(const TQString &, const TQString &,
+ const TQString &, const TQString &, const TQString &)),
+ m_view,SLOT(streamStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &, const TQString &)) );
+ disconnect( client, SIGNAL(ORStatusUpdate(const TQString &, const TQString &)),
+ m_view,SLOT(ORStatusUpdated(const TQString &, const TQString &)) );
+ disconnect( client, SIGNAL(guardStatusUpdate(const TQString &, const TQString &)),
+ m_view,SLOT(guardStatusUpdated(const TQString &, const TQString &)) );
+ disconnect( client, SIGNAL(circuitStatusUpdate(const TQString &, const TQString &,
+ const TQString &, const TQString &)),
+ m_view,SLOT(circuitStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &)) );
+ disconnect( client, SIGNAL(infoUpdate(const TQString &,const TQString &, const TQString &)),
+ this,SLOT(infoUpdated(const TQString &,const TQString &, const TQString &)) );
+ disconnect( client, SIGNAL(bwUpdate(const TQString &,const TQString &)),
+ m_view,SLOT(bwUpdated(const TQString &,const TQString &)) );
+ disconnect( client, SIGNAL(streamBwUpdate(const TQString &,const TQString &,const TQString &)),
+ m_view,SLOT(streamBwUpdated(const TQString &,const TQString &,const TQString &)) );
+
+ disconnect( client, SIGNAL(updateActiveServers(const TQStringList &)),
+ m_view,SLOT(activeServersUpdated(const TQStringList &)) );
+ disconnect( client, SIGNAL(updateServerStatus(const TQString &,const TQString &,
+ const TQString &,const TQString &)),
+ m_view,SLOT(serverStatusUpdated(const TQString &,const TQString &,
+ const TQString &,const TQString &)) );
+
+ disconnect( client, SIGNAL(setTorCaption(const TQString &)),
+ this,SLOT(setTorCaption(const TQString &)) );
+
+
+ disconnect(m_view->circuitList, SIGNAL(attach(const TQString &,const TQString &)),
+ client, SLOT(attemptAttach(const TQString &,const TQString & )) );
+ disconnect(m_view->circuitList, SIGNAL(extendCircuit(const TQString &, const TQString &, bool)),
+ client, SLOT(attemptExtendCircuit(const TQString &, const TQString &, bool)) );
+ disconnect(m_view->circuitList, SIGNAL(createCircuit(const TQString &, bool)),
+ client, SLOT(attemptCreateCircuit(const TQString &, bool)) );
+
+
+ disconnect( m_view->serverList, SIGNAL(mouseButtonPressed (int, TQListViewItem *,
+ const TQPoint &, int)), this, SLOT(slotOnItem ( int, TQListViewItem *,
+ const TQPoint &, int )));
+ disconnect( m_view->ORList, SIGNAL(pressed ( TQListViewItem * )), this,
+ SLOT(slotOnORItem ( TQListViewItem * )));
+
+
+ disconnect(m_view->m_osd, SIGNAL(closeStream(const TQString &)),
+ client, SLOT(attemptCloseStream(const TQString & )) );
+ disconnect(m_view, SIGNAL(closeStream(const TQString &)),
+ client, SLOT(attemptCloseStream(const TQString & )) );
disconnect(m_view, SIGNAL(attachStreams(bool)),
client, SLOT(attemptAttachStreams( bool )) );
- disconnect(m_view, SIGNAL(closeCircuit(const QString &)),
- client, SLOT(attemptCloseCircuit(const QString & )) );
- disconnect(m_view, SIGNAL(closeAllCircuits( QListView* &)),
- client, SLOT(closeAllCircuits( QListView* & )) );
+ disconnect(m_view, SIGNAL(closeCircuit(const TQString &)),
+ client, SLOT(attemptCloseCircuit(const TQString & )) );
+ disconnect(m_view, SIGNAL(closeAllCircuits( TQListView* &)),
+ client, SLOT(closeAllCircuits( TQListView* & )) );
- disconnect(client, SIGNAL(displayError(const QString &, const QString &)),
- m_view, SLOT(displayError(const QString &,const QString & )) );
- disconnect(client, SIGNAL(displayServer(const QString &, const QString &)),
- m_view, SLOT(displayServer(const QString &,const QString & )) );
+ disconnect(client, SIGNAL(displayError(const TQString &, const TQString &)),
+ m_view, SLOT(displayError(const TQString &,const TQString & )) );
+ disconnect(client, SIGNAL(displayServer(const TQString &, const TQString &)),
+ m_view, SLOT(displayServer(const TQString &,const TQString & )) );
- disconnect(client, SIGNAL(whatImDoing(const QString &)),
- this, SLOT(sayWhatImDoing(const QString & )) );
+ disconnect(client, SIGNAL(whatImDoing(const TQString &)),
+ this, SLOT(sayWhatImDoing(const TQString & )) );
disconnect(client, SIGNAL(copyOldConfig()),
this, SLOT(copyOldConfig()) );
@@ -2132,8 +2132,8 @@ void tork::stopController()
disconnect(client, SIGNAL(makeTorkStoppable()),
this, SLOT(makeTorkStoppable()) );
- disconnect(m_view->streamList, SIGNAL(attach(const QString &,const QString &)),
- client, SLOT(attemptAttach(const QString &,const QString & )) );
+ disconnect(m_view->streamList, SIGNAL(attach(const TQString &,const TQString &)),
+ client, SLOT(attemptAttach(const TQString &,const TQString & )) );
disconnect(client, SIGNAL(warnNoServerInfo()),
this, SLOT(warnNoServerInfo()) );
@@ -2164,22 +2164,22 @@ void tork::stopController()
disconnect( m_view, SIGNAL(signalCheckBWSettings()),
this, SLOT( checkBandwidthSettings() ) );
- disconnect(client, SIGNAL(processWarning(const QString& , const QString& )),
- this, SLOT(processWarning(const QString& , const QString& )));
- disconnect(client, SIGNAL(processQuestion(const QString& , const QString& )),
- this, SLOT(processQuestion(const QString& , const QString& )));
+ disconnect(client, SIGNAL(processWarning(const TQString& , const TQString& )),
+ this, SLOT(processWarning(const TQString& , const TQString& )));
+ disconnect(client, SIGNAL(processQuestion(const TQString& , const TQString& )),
+ this, SLOT(processQuestion(const TQString& , const TQString& )));
- disconnect(client, SIGNAL(updateTrayIcon(const QString&)),
- this, SLOT(updateTrayIcon(const QString&)));
+ disconnect(client, SIGNAL(updateTrayIcon(const TQString&)),
+ this, SLOT(updateTrayIcon(const TQString&)));
- disconnect( client, SIGNAL(showServerBW(const QString&)),
- m_view, SLOT( showServerBW(const QString&) ) );
+ disconnect( client, SIGNAL(showServerBW(const TQString&)),
+ m_view, SLOT( showServerBW(const TQString&) ) );
- disconnect( m_view, SIGNAL(resolveAddress(const QString&)),
- client, SLOT( resolveAddress(const QString&) ) );
+ disconnect( m_view, SIGNAL(resolveAddress(const TQString&)),
+ client, SLOT( resolveAddress(const TQString&) ) );
- disconnect( client, SIGNAL(resolvedAddress(const QString&)),
- m_view, SLOT( resolvedAddress(const QString&) ) );
+ disconnect( client, SIGNAL(resolvedAddress(const TQString&)),
+ m_view, SLOT( resolvedAddress(const TQString&) ) );
if (bwtimer != 0L){
disconnect( bwtimer, SIGNAL( timeout() ), m_view, SLOT( reportBW() ) );
@@ -2218,13 +2218,13 @@ void tork::stopController()
_tray->updateStats(BytesPerSecToString(0),BytesPerSecToString(0),
BytesPerSecToString(0),BytesPerSecToString(0),
- QStringList("<font color='#990000'>Status Not Known</font>"),
- QStringList("<font color='#990000'>Status Not Known</font>"),
+ TQStringList("<font color='#990000'>Status Not Known</font>"),
+ TQStringList("<font color='#990000'>Status Not Known</font>"),
BytesPerSecToString(0));
}
-QString tork::writeConf()
+TQString tork::writeConf()
{
if (tfTor != 0L)
delete tfTor;
@@ -2234,11 +2234,11 @@ QString tork::writeConf()
if ( tfTor->status() != 0 ) {
tfTor->close();
KMessageBox::information (this,"KMFilterActionWithCommand: Could not create temp file!");
- return QString();
+ return TQString();
}
- QTextStream &ts = *(tfTor->textStream());
+ TQTextStream &ts = *(tfTor->textStream());
switch (TorkConfig::quickConfigure()) {
case 0 : //Tor client and server with default settings
@@ -2334,21 +2334,21 @@ QString tork::writeConf()
}
-void tork::writeCustomOptions2(QTextStream &ts)
+void tork::writeCustomOptions2(TQTextStream &ts)
{
//Add any new servers to excludeNodes that we want excluded by Country
- QStringList existingServers = TorkConfig::serversHistory();
- QStringList currentExcludeNodes = TorkConfig::excludeNodes();
- for ( QStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it )
+ TQStringList existingServers = TorkConfig::serversHistory();
+ TQStringList currentExcludeNodes = TorkConfig::excludeNodes();
+ for ( TQStringList::Iterator it = existingServers.begin(); it != existingServers.end(); ++it )
{
if ((*it).isEmpty())
continue;
int cc = (*it).section("-",0,0).toInt();
- QString nick = (*it).section("-",1);
+ TQString nick = (*it).section("-",1);
- QString fp = getFPFromFPDigest(nick);
+ TQString fp = getFPFromFPDigest(nick);
if (fp.isEmpty())
continue;
@@ -2367,22 +2367,22 @@ void tork::writeCustomOptions2(QTextStream &ts)
kdDebug() << (*it)->name() << endl;
if (elementShouldBeUsed((*it))){
if (noSpecialProcessing((*it), ts)){
- if ( (*it)->property().type() == QVariant::String ) {
+ if ( (*it)->property().type() == TQVariant::String ) {
if (!((*it)->property().toString()).isEmpty()){
( ts << (*it)->name() << " " << (*it)->property().toString() << "\n");
kdDebug() << (*it)->name() << " " << (*it)->property().toString() << endl;
}
- }else if ( (*it)->property().type() == QVariant::StringList ) {
+ }else if ( (*it)->property().type() == TQVariant::StringList ) {
if (!((*it)->property().toStringList()).isEmpty()){
( ts << (*it)->name() << " " << (*it)->property().toStringList().join(",")
<< "\n");
}
- }else if ( (*it)->property().type() == QVariant::Int ) {
+ }else if ( (*it)->property().type() == TQVariant::Int ) {
if (((*it)->property().toInt()) > 0){
( ts << (*it)->name() << " " << (*it)->property().toString() << "\n");
kdDebug() << (*it)->name() << " " << (*it)->property().toString() << endl;
}
- }else if ( (*it)->property().type() == QVariant::Bool ) {
+ }else if ( (*it)->property().type() == TQVariant::Bool ) {
if (((*it)->property().toInt()) > 0){
( ts << (*it)->name() << " " << (*it)->property().toInt() << "\n");
kdDebug() << (*it)->name() << " " << (*it)->property().toInt() << endl;
@@ -2391,7 +2391,7 @@ void tork::writeCustomOptions2(QTextStream &ts)
}
}
- //if ( p.type() == QVariant::Bool ) {
+ //if ( p.type() == TQVariant::Bool ) {
}
@@ -2425,7 +2425,7 @@ bool tork::elementShouldBeUsed(const KConfigSkeletonItem* it)
return false;
}
-bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
+bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, TQTextStream &ts)
{
if (((*it).name() == "DirListenAddress") ||
@@ -2480,8 +2480,8 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
if ((*it).name() == "SOCKSBindAddressMany"){
if (!TorkConfig::sOCKSBindAddressMany().isEmpty()){
- QStringList socksbind = TorkConfig::sOCKSBindAddressMany();
- for ( QStringList::Iterator it = (socksbind).begin(); it != (socksbind).end(); it++ )
+ TQStringList socksbind = TorkConfig::sOCKSBindAddressMany();
+ for ( TQStringList::Iterator it = (socksbind).begin(); it != (socksbind).end(); it++ )
{
if ((*it).isEmpty())
continue;
@@ -2493,7 +2493,7 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
if ((*it).name() == "HashedControlPassword"){
if (!TorkConfig::hashedControlPassword().isEmpty()){
- QString hash = hashPassword(TorkConfig::hashedControlPassword());
+ TQString hash = hashPassword(TorkConfig::hashedControlPassword());
if(!hash.isEmpty())
ts << "HashedControlPassword 16:" << hash << "\n" ;
}
@@ -2510,8 +2510,8 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
}
if ((*it).name() == "HiddenServices"){
- QStringList hiddenServices = TorkConfig::hiddenServices();
- for ( QStringList::Iterator it = (hiddenServices).begin(); it != (hiddenServices).end(); it++ )
+ TQStringList hiddenServices = TorkConfig::hiddenServices();
+ for ( TQStringList::Iterator it = (hiddenServices).begin(); it != (hiddenServices).end(); it++ )
{
if ((*it).isEmpty())
continue;
@@ -2523,8 +2523,8 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
if ((*it).name() == "Bridge"){
- QStringList bridges = TorkConfig::bridge();
- for ( QStringList::Iterator it = (bridges).begin(); it != (bridges).end(); it++ )
+ TQStringList bridges = TorkConfig::bridge();
+ for ( TQStringList::Iterator it = (bridges).begin(); it != (bridges).end(); it++ )
{
if ((*it).isEmpty())
continue;
@@ -2536,13 +2536,13 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
if ((*it).name() == "MyFamily"){
- QStringList family = TorkConfig::myFamily();
- QStringList allfamily;
- for ( QStringList::Iterator it = (family).begin(); it != (family).end(); it++ )
+ TQStringList family = TorkConfig::myFamily();
+ TQStringList allfamily;
+ for ( TQStringList::Iterator it = (family).begin(); it != (family).end(); it++ )
{
if ((*it).isEmpty())
continue;
- QString node = "$"+getFPFromFPDigest((*it).section("-",1,1));
+ TQString node = "$"+getFPFromFPDigest((*it).section("-",1,1));
allfamily.append(node) ;
}
ts << "MyFamily " << allfamily.join(",") << "\n";
@@ -2551,13 +2551,13 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
}
if ((*it).name() == "MapAddress"){
- QStringList maps = TorkConfig::mapAddress();
- for ( QStringList::Iterator it = (maps).begin();
+ TQStringList maps = TorkConfig::mapAddress();
+ for ( TQStringList::Iterator it = (maps).begin();
it != (maps).end(); it++ )
{
if ((*it).isEmpty())
continue;
- QString mapAddress = QString("\"%2\"").arg((*it));
+ TQString mapAddress = TQString("\"%2\"").arg((*it));
ts << "MapAddress " << mapAddress << "\n";
}
return false;
@@ -2567,13 +2567,13 @@ bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, QTextStream &ts)
}
-QString tork::doHashPassword()
+TQString tork::doHashPassword()
{
hashproc = new KProcIO();
hashproc->setUseShell(TRUE);
m_hashedpassword = "";
- QString hashCommand=QString("tor --hash-password %1").arg(TorkConfig::hashedControlPassword());
+ TQString hashCommand=TQString("tor --hash-password %1").arg(TorkConfig::hashedControlPassword());
*hashproc<<hashCommand;
@@ -2589,7 +2589,7 @@ QString tork::doHashPassword()
void tork::processHashProc(KProcIO *hashproc)
{
- QString item = "";
+ TQString item = "";
int pos;
while ((pos = (hashproc->readln(item,true))) != -1) {
@@ -2642,7 +2642,7 @@ void tork::privoxyExited()
privoxyproc = 0L;
}
- QString question;
+ TQString question;
if (stillStarting)
question = "privoxycouldntstart";
else
@@ -2692,7 +2692,7 @@ void tork::startEverything()
void tork::checkForSystemManagedPrivoxy()
{
- QString host;
+ TQString host;
int port;
host = TorkConfig::konqHttpProxy();
@@ -2734,7 +2734,7 @@ void tork::startPrivoxy()
{
stillStarting = true;
- QTimer::singleShot( 20000, this, SLOT(startingPeriodOver()) );
+ TQTimer::singleShot( 20000, this, SLOT(startingPeriodOver()) );
if (TorkConfig::systemProxy()) {
checkForSystemManagedPrivoxy();
@@ -2757,18 +2757,18 @@ void tork::startPrivoxy()
privoxyproc = new KProcIO();
privoxyproc->setUseShell(TRUE);
- QString curpath = (QString) getenv("PATH");
+ TQString curpath = (TQString) getenv("PATH");
privoxyproc->setEnvironment("PATH",curpath +
":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin");
- QString location = getenv("HOME");
+ TQString location = getenv("HOME");
location += "/.tork";
- QDir torkdir(location);
+ TQDir torkdir(location);
if (!torkdir.exists() && !torkdir.mkdir(location))
location = getenv("HOME");
- QString privoxypid = QString("%1/.tork/privoxypid").arg(location);
- QString privoxyConfFile = writePrivoxyConf();
+ TQString privoxypid = TQString("%1/.tork/privoxypid").arg(location);
+ TQString privoxyConfFile = writePrivoxyConf();
*privoxyproc << TorkConfig::privoxyLocation() << " --user " << getenv("USER")
<< " --no-daemon --pidfile " << privoxypid << " " << privoxyConfFile;
@@ -2786,7 +2786,7 @@ void tork::startingPeriodOver()
stillStarting = false;
}
-QString tork::writePrivoxyConf()
+TQString tork::writePrivoxyConf()
{
if (tfPrivoxy != 0L)
@@ -2801,7 +2801,7 @@ QString tork::writePrivoxyConf()
}
- QTextStream &ts = *(tfPrivoxy->textStream());
+ TQTextStream &ts = *(tfPrivoxy->textStream());
ts << "forward-socks4a / " << TorkConfig::sOCKSBindAddressHost() << ":"
<< TorkConfig::sOCKSBindAddressPort() << " ." << "\n";
@@ -2833,7 +2833,7 @@ void tork::startController()
{
- QString host;
+ TQString host;
int port;
if (TorkConfig::quickConfigure() == 6){
@@ -2846,75 +2846,75 @@ void tork::startController()
host = "localhost";
port = TorkConfig::controlPort();
}
- torCaption = QString("%1:%2").arg(host).arg(port);
+ torCaption = TQString("%1:%2").arg(host).arg(port);
client = new TorClient(host,port);
setCaption(torCaption);
connect( client, SIGNAL(fatalError()),this, SLOT(cannotContactTor()));
connect( client, SIGNAL(torConnectionClosed()), SLOT(torClosedConnection()) );
- connect( client, SIGNAL(streamStatusUpdate(const QString &, const QString &,
- const QString &, const QString &, const QString &)),
- m_view,SLOT(streamStatusUpdated(const QString &, const QString &,
- const QString &, const QString &, const QString &)) );
- connect( client, SIGNAL(ORStatusUpdate(const QString &, const QString &)),
- m_view,SLOT(ORStatusUpdated(const QString &, const QString &)) );
- connect( client, SIGNAL(guardStatusUpdate(const QString &, const QString &)),
- m_view,SLOT(guardStatusUpdated(const QString &, const QString &)) );
- connect( client, SIGNAL(circuitStatusUpdate(const QString &, const QString &,
- const QString &, const QString &)),
- m_view,SLOT(circuitStatusUpdated(const QString &, const QString &,
- const QString &, const QString &)) );
- connect( client, SIGNAL(infoUpdate(const QString &,const QString &, const QString &)),
- this,SLOT(infoUpdated(const QString &,const QString &, const QString &)) );
- connect( client, SIGNAL(bwUpdate(const QString &,const QString &)),
- m_view,SLOT(bwUpdated(const QString &,const QString &)) );
- connect( client, SIGNAL(streamBwUpdate(const QString &,const QString &,const QString &)),
- m_view,SLOT(streamBwUpdated(const QString &,const QString &,const QString &)) );
-
- connect( client, SIGNAL(updateActiveServers(const QStringList &)),
- m_view,SLOT(activeServersUpdated(const QStringList &)) );
- connect( client, SIGNAL(updateServerStatus(const QString &,const QString &,
- const QString &,const QString &)),
- m_view,SLOT(serverStatusUpdated(const QString &,const QString &,
- const QString &,const QString &)) );
-
- connect( client, SIGNAL(setTorCaption(const QString &)),
- this,SLOT(setTorCaption(const QString &)) );
-
-
- connect(m_view->circuitList, SIGNAL(attach(const QString &,const QString &)),
- client, SLOT(attemptAttach(const QString &,const QString & )) );
- connect(m_view->circuitList, SIGNAL(extendCircuit(const QString &, const QString &, bool)),
- client, SLOT(attemptExtendCircuit(const QString &, const QString &, bool)) );
- connect(m_view->circuitList, SIGNAL(createCircuit(const QString &, bool)),
- client, SLOT(attemptCreateCircuit(const QString &, bool)) );
-
- connect( m_view->serverList, SIGNAL(mouseButtonPressed ( int, QListViewItem * ,
- const QPoint &, int )),
- SLOT(slotOnItem ( int, QListViewItem * , const QPoint &, int )));
- connect( m_view->ORList, SIGNAL(pressed ( QListViewItem * )),
- SLOT(slotOnORItem ( QListViewItem * )));
-
-
- connect(m_view->m_osd, SIGNAL(closeStream(const QString &)),
- client, SLOT(attemptCloseStream(const QString & )) );
- connect(m_view, SIGNAL(closeStream(const QString &)),
- client, SLOT(attemptCloseStream(const QString & )) );
+ connect( client, SIGNAL(streamStatusUpdate(const TQString &, const TQString &,
+ const TQString &, const TQString &, const TQString &)),
+ m_view,SLOT(streamStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &, const TQString &)) );
+ connect( client, SIGNAL(ORStatusUpdate(const TQString &, const TQString &)),
+ m_view,SLOT(ORStatusUpdated(const TQString &, const TQString &)) );
+ connect( client, SIGNAL(guardStatusUpdate(const TQString &, const TQString &)),
+ m_view,SLOT(guardStatusUpdated(const TQString &, const TQString &)) );
+ connect( client, SIGNAL(circuitStatusUpdate(const TQString &, const TQString &,
+ const TQString &, const TQString &)),
+ m_view,SLOT(circuitStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &)) );
+ connect( client, SIGNAL(infoUpdate(const TQString &,const TQString &, const TQString &)),
+ this,SLOT(infoUpdated(const TQString &,const TQString &, const TQString &)) );
+ connect( client, SIGNAL(bwUpdate(const TQString &,const TQString &)),
+ m_view,SLOT(bwUpdated(const TQString &,const TQString &)) );
+ connect( client, SIGNAL(streamBwUpdate(const TQString &,const TQString &,const TQString &)),
+ m_view,SLOT(streamBwUpdated(const TQString &,const TQString &,const TQString &)) );
+
+ connect( client, SIGNAL(updateActiveServers(const TQStringList &)),
+ m_view,SLOT(activeServersUpdated(const TQStringList &)) );
+ connect( client, SIGNAL(updateServerStatus(const TQString &,const TQString &,
+ const TQString &,const TQString &)),
+ m_view,SLOT(serverStatusUpdated(const TQString &,const TQString &,
+ const TQString &,const TQString &)) );
+
+ connect( client, SIGNAL(setTorCaption(const TQString &)),
+ this,SLOT(setTorCaption(const TQString &)) );
+
+
+ connect(m_view->circuitList, SIGNAL(attach(const TQString &,const TQString &)),
+ client, SLOT(attemptAttach(const TQString &,const TQString & )) );
+ connect(m_view->circuitList, SIGNAL(extendCircuit(const TQString &, const TQString &, bool)),
+ client, SLOT(attemptExtendCircuit(const TQString &, const TQString &, bool)) );
+ connect(m_view->circuitList, SIGNAL(createCircuit(const TQString &, bool)),
+ client, SLOT(attemptCreateCircuit(const TQString &, bool)) );
+
+ connect( m_view->serverList, SIGNAL(mouseButtonPressed ( int, TQListViewItem * ,
+ const TQPoint &, int )),
+ SLOT(slotOnItem ( int, TQListViewItem * , const TQPoint &, int )));
+ connect( m_view->ORList, SIGNAL(pressed ( TQListViewItem * )),
+ SLOT(slotOnORItem ( TQListViewItem * )));
+
+
+ connect(m_view->m_osd, SIGNAL(closeStream(const TQString &)),
+ client, SLOT(attemptCloseStream(const TQString & )) );
+ connect(m_view, SIGNAL(closeStream(const TQString &)),
+ client, SLOT(attemptCloseStream(const TQString & )) );
connect(m_view, SIGNAL(attachStreams(bool)),
client, SLOT(attemptAttachStreams( bool )) );
- connect(m_view, SIGNAL(closeCircuit(const QString &)),
- client, SLOT(attemptCloseCircuit(const QString & )) );
- connect(m_view, SIGNAL(closeAllCircuits( QListView* &)),
- client, SLOT(closeAllCircuits( QListView* & )) );
+ connect(m_view, SIGNAL(closeCircuit(const TQString &)),
+ client, SLOT(attemptCloseCircuit(const TQString & )) );
+ connect(m_view, SIGNAL(closeAllCircuits( TQListView* &)),
+ client, SLOT(closeAllCircuits( TQListView* & )) );
- connect(client, SIGNAL(displayError(const QString &, const QString &)),
- m_view, SLOT(displayError(const QString &,const QString & )) );
- connect(client, SIGNAL(displayServer(const QString &, const QString &)),
- m_view, SLOT(displayServer(const QString &,const QString & )) );
+ connect(client, SIGNAL(displayError(const TQString &, const TQString &)),
+ m_view, SLOT(displayError(const TQString &,const TQString & )) );
+ connect(client, SIGNAL(displayServer(const TQString &, const TQString &)),
+ m_view, SLOT(displayServer(const TQString &,const TQString & )) );
- connect(client, SIGNAL(whatImDoing(const QString &)),
- this, SLOT(sayWhatImDoing(const QString & )) );
+ connect(client, SIGNAL(whatImDoing(const TQString &)),
+ this, SLOT(sayWhatImDoing(const TQString & )) );
connect(client, SIGNAL(copyOldConfig()),
this, SLOT(copyOldConfig()) );
@@ -2924,8 +2924,8 @@ void tork::startController()
connect(client, SIGNAL(makeTorkStoppable()),
this, SLOT(makeTorkStoppable()) );
- connect(m_view->streamList, SIGNAL(attach(const QString &,const QString &)),
- client, SLOT(attemptAttach(const QString &,const QString & )) );
+ connect(m_view->streamList, SIGNAL(attach(const TQString &,const TQString &)),
+ client, SLOT(attemptAttach(const TQString &,const TQString & )) );
connect(client, SIGNAL(warnNoServerInfo()),
this, SLOT(warnNoServerInfo()) );
@@ -2956,24 +2956,24 @@ void tork::startController()
connect( m_view, SIGNAL(signalCheckBWSettings()),
this, SLOT( checkBandwidthSettings() ) );
- connect(client, SIGNAL(processWarning(const QString& , const QString& )),
- this, SLOT(processWarning(const QString& , const QString& )));
- connect(client, SIGNAL(processQuestion(const QString& , const QString& )),
- this, SLOT(processQuestion(const QString& , const QString& )));
+ connect(client, SIGNAL(processWarning(const TQString& , const TQString& )),
+ this, SLOT(processWarning(const TQString& , const TQString& )));
+ connect(client, SIGNAL(processQuestion(const TQString& , const TQString& )),
+ this, SLOT(processQuestion(const TQString& , const TQString& )));
- connect(client, SIGNAL(updateTrayIcon(const QString&)),
- this, SLOT(updateTrayIcon(const QString&)));
+ connect(client, SIGNAL(updateTrayIcon(const TQString&)),
+ this, SLOT(updateTrayIcon(const TQString&)));
- connect( client, SIGNAL(showServerBW(const QString&)),
- m_view, SLOT( showServerBW(const QString&) ) );
+ connect( client, SIGNAL(showServerBW(const TQString&)),
+ m_view, SLOT( showServerBW(const TQString&) ) );
- connect( m_view, SIGNAL(resolveAddress(const QString&)),
- client, SLOT( resolveAddress(const QString&) ) );
+ connect( m_view, SIGNAL(resolveAddress(const TQString&)),
+ client, SLOT( resolveAddress(const TQString&) ) );
- connect( client, SIGNAL(resolvedAddress(const QString&)),
- m_view, SLOT( resolvedAddress(const QString&) ) );
+ connect( client, SIGNAL(resolvedAddress(const TQString&)),
+ m_view, SLOT( resolvedAddress(const TQString&) ) );
- QTimer::singleShot( 10000, this, SLOT(isControllerWorking()) );
+ TQTimer::singleShot( 10000, this, SLOT(isControllerWorking()) );
torkStart->setEnabled(false);
m_view->welcomeitem->setEnabled(false);
@@ -3038,7 +3038,7 @@ void tork::startFromBeginning()
void tork::receivedOutput(KProcIO *)
{
int pos;
- QString item2;
+ TQString item2;
if (!(childproc))
return;
@@ -3046,7 +3046,7 @@ void tork::receivedOutput(KProcIO *)
while ((childproc) && ((pos = (childproc->readln(item2,true))) != -1)) {
if ((pos = (item2.find("Opening Control listener on"))) != -1){
- QTimer::singleShot( 200, this, SLOT(startController()) );
+ TQTimer::singleShot( 200, this, SLOT(startController()) );
}
int i;
for (i = 0; _tork_messages[i].logmessage; ++i) {
@@ -3083,7 +3083,7 @@ void tork::receivedOutput(KProcIO *)
}
-void tork::infoUpdated(const QString &type, const QString &summary, const QString &data)
+void tork::infoUpdated(const TQString &type, const TQString &summary, const TQString &data)
{
int i;
@@ -3117,7 +3117,7 @@ void tork::infoUpdated(const QString &type, const QString &summary, const QStrin
if (waitingForServers){
if (summary.contains("now have enough directory information")){
waitingForServers = false;
- //QTimer::singleShot(20000, client, SLOT(slotCheckTorNet()) );
+ //TQTimer::singleShot(20000, client, SLOT(slotCheckTorNet()) );
if (client != 0L)
client->slotCheckTorNet();
}
@@ -3177,7 +3177,7 @@ void tork::copyCookie()
KProcIO *catproc = new KProcIO();
catproc->setUseShell(TRUE);
- QString whichCommand= QString(
+ TQString whichCommand= TQString(
"kdesu -c '"
"mkdir -p -m 600 %1/.tor;"
"cp -u /var/lib/tor/control_auth_cookie %2/.tor/control_auth_cookie;"
@@ -3403,14 +3403,14 @@ void tork::toggleKDESettingAndLaunchKonq()
}
}
-void tork::enableKDEAndLaunchKonqWithUrl(const QString &url)
+void tork::enableKDEAndLaunchKonqWithUrl(const TQString &url)
{
if (!TorkConfig::kDEUsesTor())
toggleKDESetting();
if (TorkConfig::kDEUsesTor()){
- KRun::runCommand( QString("konqueror --caption \"Anonymous Browsing Session\" "
+ KRun::runCommand( TQString("konqueror --caption \"Anonymous Browsing Session\" "
"%1").arg(url),
"konqueror", "konqueror" );
}
@@ -3430,13 +3430,13 @@ void tork::setKDE(bool set)
KConfig* config = new KConfig("kioslaverc", false, false);
config->setGroup( "Proxy Settings" );
if (set){
- config->writeEntry( "httpProxy", QString("%1:%2")
+ config->writeEntry( "httpProxy", TQString("%1:%2")
.arg(TorkConfig::konqHttpProxy())
.arg(TorkConfig::konqHttpProxyPort()) );
- config->writeEntry( "httpsProxy", QString("%1:%2")
+ config->writeEntry( "httpsProxy", TQString("%1:%2")
.arg(TorkConfig::konqHttpsProxy())
.arg(TorkConfig::konqHttpsProxyPort()) );
- config->writeEntry( "ftpProxy", QString("%1:%2")
+ config->writeEntry( "ftpProxy", TQString("%1:%2")
.arg(TorkConfig::konqFtpProxy())
.arg(TorkConfig::konqFtpProxyPort()) );
config->writeEntry( "ProxyType", "1" );
@@ -3502,10 +3502,10 @@ void tork::setKDE(bool set)
// Inform all running io-slaves about the changes...
// if we cannot update, ioslaves inform the end user...
- if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", QString::null))
+ if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
{
- QString caption = i18n("Update Failed");
- QString message = i18n("You have to restart the running applications "
+ TQString caption = i18n("Update Failed");
+ TQString message = i18n("You have to restart the running applications "
"for these changes to take effect.");
KMessageBox::information (this, message, caption);
return;
@@ -3577,7 +3577,7 @@ void tork::checkForKonqWindow(WId id)
}
-void tork::showWarning( display_status_t &msg, const QString &headline,const QString &torsaid,const QString &thismeans, const QString &type, const QString &icon, bool always, bool showstopper)
+void tork::showWarning( display_status_t &msg, const TQString &headline,const TQString &torsaid,const TQString &thismeans, const TQString &type, const TQString &icon, bool always, bool showstopper)
{
kdDebug() << "in showwarning" << endl;
@@ -3605,10 +3605,10 @@ void tork::showWarning( display_status_t &msg, const QString &headline,const QSt
m_msg = &msg;
m_tooltip = new KDE::PopupMessage(statusBar(), m_statusInfo, 40000, type );
- QString text = i18n( "<b>%1</b>").arg(headline);
- text += QString( "<br>" ) + i18n( "<b>Message: </b> %1" ).arg(torsaid);
- text += QString( "<br>" ) + i18n( "<b>This means: </b> %1" ).arg(thismeans);
- text += QString( "<br>" );
+ TQString text = i18n( "<b>%1</b>").arg(headline);
+ text += TQString( "<br>" ) + i18n( "<b>Message: </b> %1" ).arg(torsaid);
+ text += TQString( "<br>" ) + i18n( "<b>This means: </b> %1" ).arg(thismeans);
+ text += TQString( "<br>" );
//connect(m_tooltip, SIGNAL(yesClicked()),this, SLOT(serverHelp()));
@@ -3620,7 +3620,7 @@ void tork::showWarning( display_status_t &msg, const QString &headline,const QSt
m_tooltip->setMaskEffect( KDE::PopupMessage::Slide );
m_tooltip->setText( text );
- //QString icon = QString("tork_%1").arg(type).replace(" ","_");
+ //TQString icon = TQString("tork_%1").arg(type).replace(" ","_");
m_tooltip->setImage( DesktopIcon( icon, 48 ) );
m_tooltip->move( x(), y() + m_tooltip->height() );
@@ -3631,18 +3631,18 @@ void tork::showWarning( display_status_t &msg, const QString &headline,const QSt
KPassivePopup *pop;
- QPoint pnt;
+ TQPoint pnt;
pop = new KPassivePopup( kmain->_tray );
pnt = kmain->_tray->pos();
pop->setTimeout(15000);
pop->setView( i18n("%1").arg(headline),i18n("See TorK window for details.") );
- pop->show(QPoint(pnt));
+ pop->show(TQPoint(pnt));
}
}
-void tork::askQuestion(display_status_t &msg, const QString &headline,const QString &torsaid,const QString &body,const QString &question,void (tork::*pt2Func)(), const QString &type, const QString &icon, bool persistent, bool showstopper)
+void tork::askQuestion(display_status_t &msg, const TQString &headline,const TQString &torsaid,const TQString &body,const TQString &question,void (tork::*pt2Func)(), const TQString &type, const TQString &icon, bool persistent, bool showstopper)
{
kdDebug() << "in askqeustion" << endl;
@@ -3667,10 +3667,10 @@ void tork::askQuestion(display_status_t &msg, const QString &headline,const QStr
m_pt2Func = pt2Func;
m_tooltip = new KDE::PopupMessage(statusBar(), m_statusInfo, 40000, type );
- QString text = i18n( "<b>%1</b>").arg(headline);
- text += QString( "<br>" ) + i18n( "<b>Message: </b> %1" ).arg(torsaid);
- text += QString( "<br>" ) + i18n( "<b>Reason: </b> %1" ).arg(body);
- text += QString( "<br>" ) + i18n( "%1" ).arg(question);
+ TQString text = i18n( "<b>%1</b>").arg(headline);
+ text += TQString( "<br>" ) + i18n( "<b>Message: </b> %1" ).arg(torsaid);
+ text += TQString( "<br>" ) + i18n( "<b>Reason: </b> %1" ).arg(body);
+ text += TQString( "<br>" ) + i18n( "%1" ).arg(question);
//damn. functions pointers can't be used in slots. i don't have the heart to unroll it atm.
connect(m_tooltip, SIGNAL(yesClicked( )), SLOT(slotHandle( )));
@@ -3682,7 +3682,7 @@ void tork::askQuestion(display_status_t &msg, const QString &headline,const QStr
m_tooltip->showCounter( true );
m_tooltip->setMaskEffect( KDE::PopupMessage::Slide );
m_tooltip->setText( text );
- //QString icon = QString("tork_%1").arg(type).replace(" ","_").replace("'","");
+ //TQString icon = TQString("tork_%1").arg(type).replace(" ","_").replace("'","");
m_tooltip->setImage( DesktopIcon( icon, 48 ) );
m_tooltip->move( x(), y() + m_tooltip->height() );
@@ -3693,12 +3693,12 @@ void tork::askQuestion(display_status_t &msg, const QString &headline,const QStr
KPassivePopup *pop;
- QPoint pnt;
+ TQPoint pnt;
pop = new KPassivePopup( kmain->_tray );
pnt = kmain->_tray->pos();
pop->setTimeout(15000);
pop->setView( i18n("%1").arg(headline),i18n("%1 See TorK window for details.").arg(body) );
- pop->show(QPoint(pnt));
+ pop->show(TQPoint(pnt));
}
@@ -3869,7 +3869,7 @@ void tork::fixAddressPort()
}
-void tork::slotOnItem( int button, QListViewItem * item, const QPoint &, int)
+void tork::slotOnItem( int button, TQListViewItem * item, const TQPoint &, int)
{
if ((item == NULL) || (button == 2))
@@ -3880,7 +3880,7 @@ void tork::slotOnItem( int button, QListViewItem * item, const QPoint &, int)
}
-void tork::slotOnORItem( QListViewItem * item)
+void tork::slotOnORItem( TQListViewItem * item)
{
if (item == NULL)
@@ -3905,7 +3905,7 @@ void tork::isControllerWorking( )
if (!client->isControllerWorking()){
processQuestion( "jdsklajdkslajdskla", i18n("TorK can't communicate with Tor on the controller port %1. Do you have something limiting/blocking traffic on that port?").arg(TorkConfig::controlPort()) );
- QTimer::singleShot( 10000, this, SLOT(isControllerWorking()) );
+ TQTimer::singleShot( 10000, this, SLOT(isControllerWorking()) );
}
@@ -3927,7 +3927,7 @@ void tork::needAlphaVersion( )
void tork::showTip()
{
- KTipDialog::showTip(this,QString::null,true);
+ KTipDialog::showTip(this,TQString::null,true);
}
void tork::showTipOnStart()
@@ -3947,9 +3947,9 @@ void tork::startNetStat()
netstatproc = new KProcIO();
netstatproc->setUseShell(TRUE);
- QString netstatcmd = "netstat -ntucpe";
+ TQString netstatcmd = "netstat -ntucpe";
if (!TorkConfig::netstatLocation().isEmpty())
- netstatcmd = QString("%1 -ntucpe").arg(TorkConfig::netstatLocation());
+ netstatcmd = TQString("%1 -ntucpe").arg(TorkConfig::netstatLocation());
*netstatproc << netstatcmd;
@@ -3984,7 +3984,7 @@ void tork::netStatExited()
void tork::receivedNetStatOutput(KProcIO *)
{
int pos;
- QString item2;
+ TQString item2;
// Don't print netstat output if we are running a relay
if (!TorkConfig::clientOnly())
@@ -3995,11 +3995,11 @@ void tork::receivedNetStatOutput(KProcIO *)
while ((netstatproc) && ((pos = (netstatproc->readln(item2,true))) != -1)) {
- QString foreignAddress = item2.mid(44,24);
- QString state = item2.mid(68,11);
- QString inode = item2.mid(90,11);
- QString program = item2.mid(102,19).stripWhiteSpace();
- QListViewItem* nonTorTrafficLine;
+ TQString foreignAddress = item2.mid(44,24);
+ TQString state = item2.mid(68,11);
+ TQString inode = item2.mid(90,11);
+ TQString program = item2.mid(102,19).stripWhiteSpace();
+ TQListViewItem* nonTorTrafficLine;
uint tmpents = TorkConfig::nonTorTrafficMaxEntries();
if (inodes.count() > tmpents){
@@ -4017,20 +4017,20 @@ void tork::receivedNetStatOutput(KProcIO *)
if ((!item2.left(3).contains("tcp")) && (!item2.left(3).contains("udp")))
continue;
- QListViewItem* ba = inodes.find( inode );
+ TQListViewItem* ba = inodes.find( inode );
if (ba)
continue;
- nonTorTrafficLine = new QListViewItem(m_view->NonTorTraffic,QDateTime::currentDateTime ().toString(Qt::ISODate).replace("T"," "), foreignAddress,program,inode);
+ nonTorTrafficLine = new TQListViewItem(m_view->NonTorTraffic,TQDateTime::currentDateTime ().toString(TQt::ISODate).replace("T"," "), foreignAddress,program,inode);
inodes.insert( inode, nonTorTrafficLine );
- QString cleanedTarget = foreignAddress.section(":",0,0).stripWhiteSpace();
- QString cleanedPort = foreignAddress.section(":",1,1).stripWhiteSpace();
- QString iconPath = locate("cache", KMimeType::favIconForURL("http://"+cleanedTarget)+".png");
+ TQString cleanedTarget = foreignAddress.section(":",0,0).stripWhiteSpace();
+ TQString cleanedPort = foreignAddress.section(":",1,1).stripWhiteSpace();
+ TQString iconPath = locate("cache", KMimeType::favIconForURL("http://"+cleanedTarget)+".png");
if (!iconPath.isEmpty()){
- nonTorTrafficLine->setPixmap( 1, QPixmap( iconPath ) );
+ nonTorTrafficLine->setPixmap( 1, TQPixmap( iconPath ) );
}else{
int i;
for (i = 0; _port_icon[i].port; ++i) {
@@ -4046,7 +4046,7 @@ void tork::receivedNetStatOutput(KProcIO *)
if ((foreignAddress.contains(":domain")) || (foreignAddress.contains(":53 "))){
m_program = program;
- QTimer::singleShot( 3000, this, SLOT(torUsedAfterDNSRequest()) );
+ TQTimer::singleShot( 3000, this, SLOT(torUsedAfterDNSRequest()) );
}
item2 = "";
@@ -4059,7 +4059,7 @@ void tork::receivedNetStatOutput(KProcIO *)
void tork::torUsedAfterDNSRequest()
{
- if (QTime::currentTime().secsTo(m_view->timeTorWasLastUsed()) > -6){
+ if (TQTime::currentTime().secsTo(m_view->timeTorWasLastUsed()) > -6){
processWarning("dnsrequestsdetected",i18n("Shortly before traffic to %1 passed through Tor, the program <b>%2</b> bypassed Tor to turn a domain name to an IP address. Traffic to <b>%3</b> may therefore not be fully anonymous.").arg(m_view->addrTorWasLastUsed()).arg(m_program).arg(m_view->addrTorWasLastUsed()));
}
@@ -4067,13 +4067,13 @@ void tork::torUsedAfterDNSRequest()
}
-void tork::processWarning(const QString& type, const QString& text)
+void tork::processWarning(const TQString& type, const TQString& text)
{
int i;
for (i = 0; _tork_messages[i].logmessage; ++i) {
message_t *msg = &_tork_messages[i];
- if (QString(msg->logmessage).contains(type)){
+ if (TQString(msg->logmessage).contains(type)){
if ((*this.*(msg->pt2Member))()){
strncpy(msg->torsaid,text,249);
showWarning(msg->state, msg->headline, msg->torsaid,
@@ -4085,16 +4085,16 @@ void tork::processWarning(const QString& type, const QString& text)
}
-void tork::processQuestion(const QString& type, const QString& text)
+void tork::processQuestion(const TQString& type, const TQString& text)
{
- QString tmptext = text;
+ TQString tmptext = text;
tmptext.replace(",",", ");
int i;
for (i = 0; _tork_questions[i].logquestion; ++i) {
question_t *msg = &_tork_questions[i];
if ((*this.*(msg->pt2Member2))()){
- if (QString(msg->logquestion).contains(type)){
+ if (TQString(msg->logquestion).contains(type)){
(*this.*msg->silentAction)();
strncpy(msg->torsaid,tmptext,249);
askQuestion(msg->state, msg->headline, msg->torsaid, msg->body,
@@ -4109,7 +4109,7 @@ void tork::processQuestion(const QString& type, const QString& text)
}
-void tork::showSecurityNotice(const QString& port)
+void tork::showSecurityNotice(const TQString& port)
{
processQuestion("securitynotice",i18n("Traffic on port %1 is not "
@@ -4119,7 +4119,7 @@ void tork::showSecurityNotice(const QString& port)
}
-void tork::showScreamingNotice(const QString& port)
+void tork::showScreamingNotice(const TQString& port)
{
if (TorkConfig::currentTorVersion().left(3) != "0.1")
@@ -4169,7 +4169,7 @@ void tork::useNewIdentity()
if (client != 0L){
recentNewIdentityRequest = true;
- QTimer::singleShot( 20000, this, SLOT(allowNewIdentityRequests()) );
+ TQTimer::singleShot( 20000, this, SLOT(allowNewIdentityRequests()) );
client->newIdentity();
@@ -4182,7 +4182,7 @@ void tork::allowNewIdentityRequests()
recentNewIdentityRequest = false;
}
-void tork::createService(const QString& dir, const QString& port)
+void tork::createService(const TQString& dir, const TQString& port)
{
if (client != 0L)
@@ -4212,18 +4212,18 @@ void tork::checkBandwidthSettings( )
return;
- QString newBW, newLdBW, nextBW;
+ TQString newBW, newLdBW, nextBW;
int largestCandidateSoFar = -86400, newCandidate = 0, bestCandidate = -86400;
int nextScheduledCandidate =0, nextCandidate = 0;
int BWDayAsInt = 0;
- int TodayAsInt = QDate::currentDate().dayOfWeek();
+ int TodayAsInt = TQDate::currentDate().dayOfWeek();
// Get current date/time
- QDateTime currentDateTime = QDateTime::currentDateTime();
- QDate nextDate;
- QTime nextTime;
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
+ TQDate nextDate;
+ TQTime nextTime;
- QStringList bandwidthSlots = TorkConfig::bandwidthSlots();
- for ( QStringList::Iterator it = bandwidthSlots.begin(); it != bandwidthSlots.end(); ++it )
+ TQStringList bandwidthSlots = TorkConfig::bandwidthSlots();
+ for ( TQStringList::Iterator it = bandwidthSlots.begin(); it != bandwidthSlots.end(); ++it )
{
if ((*it).isEmpty())
continue;
@@ -4233,7 +4233,7 @@ void tork::checkBandwidthSettings( )
BWDayAsInt = TodayAsInt;
else{
for (int i=1; i<8;i++){
- if ((*it).section("\n",-4,-4) == QDate::longDayName(i)){
+ if ((*it).section("\n",-4,-4) == TQDate::longDayName(i)){
BWDayAsInt = i;
break;
}
@@ -4241,8 +4241,8 @@ void tork::checkBandwidthSettings( )
}
//Construct entry's date/time
- QDateTime BWDateTime = QDateTime::currentDateTime();
- BWDateTime.setTime(QTime::fromString((*it).section("\n",-5,-5)));
+ TQDateTime BWDateTime = TQDateTime::currentDateTime();
+ BWDateTime.setTime(TQTime::fromString((*it).section("\n",-5,-5)));
signed int daysFrom = BWDayAsInt - TodayAsInt;
newCandidate = currentDateTime.secsTo(BWDateTime.addDays(daysFrom));
@@ -4292,7 +4292,7 @@ void tork::checkBandwidthSettings( )
(cndBWMax != client->getCurMaxAdvertisedBandwidth())){
client->setBandwidth(newBW.section("\n",-3,-3),newBW.section("\n",-2,-2),
newBW.section("\n",-1));
- QTime bwtime = QTime::fromString(nextBW.section("\n",-5,-5));
+ TQTime bwtime = TQTime::fromString(nextBW.section("\n",-5,-5));
processWarning( "bwreset",i18n("Tor bandwidth has been reset to: Max Incoming -"
" <b>%1 KB/s</b>."
" Max Burst - <b>%2 KB/s</b>. Max Advertised - <b>%3 KB/s</b>."
@@ -4310,22 +4310,22 @@ void tork::setBandwidthFromSysTray(int rate )
if (client == 0L)
return;
- client->setBandwidth(QString("%1").arg(rate),QString("%1").arg(rate*2),
+ client->setBandwidth(TQString("%1").arg(rate),TQString("%1").arg(rate*2),
"");
client->getBandwidth();
}
-void tork::setTorCaption(const QString& caption)
+void tork::setTorCaption(const TQString& caption)
{
- setCaption(QString("%1 using Tor %2").arg(torCaption).arg(caption));
+ setCaption(TQString("%1 using Tor %2").arg(torCaption).arg(caption));
TorkConfig::setCurrentTorVersion(caption);
TorkConfig::writeConfig();
if (caption.left(3) == "0.1"){
m_view->streamList->hideColumn(1);
m_view->streamList->header()->setResizeEnabled(FALSE, 1);
- m_view->streamList->setResizeMode( QListView::NoColumn );
+ m_view->streamList->setResizeMode( TQListView::NoColumn );
m_UnCensorButton->unplug( toolBar("TorToolBar") );
m_SecurityButton->unplug( toolBar("MoreToolBar") );
m_ServerButtonMenu->setItemEnabled( 3, false );
@@ -4337,7 +4337,7 @@ void tork::resetTor()
{
KProcIO *catproc = new KProcIO();
catproc->setUseShell(TRUE);
- QString whichCommand= "kdesu -c 'killall -s HUP tor'";
+ TQString whichCommand= "kdesu -c 'killall -s HUP tor'";
*catproc<<whichCommand;
catproc->start(KProcIO::NotifyOnExit,TRUE);
connect( catproc, SIGNAL(processExited(KProcess *)),
@@ -4350,13 +4350,13 @@ void tork::resetExited()
startEverything();
}
-void tork::upnpForwardingOK(kt::UPnPRouter* router,const QString& string, bool fwd)
+void tork::upnpForwardingOK(kt::UPnPRouter* router,const TQString& string, bool fwd)
{
kdDebug() << "UPNPforwardingok" << endl;
- QString tmpports = QStringList::split("<NewExternalPort>",string)[1];
- QString extport = QStringList::split("</NewExternalPort>",tmpports)[0];
- tmpports = QStringList::split("<NewInternalPort>",string)[1];
- QString intport = QStringList::split("</NewInternalPort>",tmpports)[0];
+ TQString tmpports = TQStringList::split("<NewExternalPort>",string)[1];
+ TQString extport = TQStringList::split("</NewExternalPort>",tmpports)[0];
+ tmpports = TQStringList::split("<NewInternalPort>",string)[1];
+ TQString intport = TQStringList::split("</NewInternalPort>",tmpports)[0];
// if (!(router->forwardedPorts()->contains(net::ForwardPort(443,
@@ -4393,13 +4393,13 @@ void tork::upnpForwardingOK(kt::UPnPRouter* router,const QString& string, bool f
}
-void tork::upnpForwardingError(kt::UPnPRouter* router,const QString& string, bool fwd)
+void tork::upnpForwardingError(kt::UPnPRouter* router,const TQString& string, bool fwd)
{
- QString tmpports = QStringList::split("<NewExternalPort>",string)[1];
- QString extport = QStringList::split("</NewExternalPort>",tmpports)[0];
- tmpports = QStringList::split("<NewInternalPort>",string)[1];
- QString intport = QStringList::split("</NewInternalPort>",tmpports)[0];
+ TQString tmpports = TQStringList::split("<NewExternalPort>",string)[1];
+ TQString extport = TQStringList::split("</NewExternalPort>",tmpports)[0];
+ tmpports = TQStringList::split("<NewInternalPort>",string)[1];
+ TQString intport = TQStringList::split("</NewInternalPort>",tmpports)[0];
//Reset the ORPort or DirPort to the non-forwarded value
if (extport == "80")