summaryrefslogtreecommitdiffstats
path: root/tdehtml/test_regression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdehtml/test_regression.cpp')
-rw-r--r--tdehtml/test_regression.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp
index 62842e086..7082c9aed 100644
--- a/tdehtml/test_regression.cpp
+++ b/tdehtml/test_regression.cpp
@@ -31,7 +31,7 @@
#include <signal.h>
#include <tdeapplication.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tqimage.h>
#include <tqfile.h>
#include "test_regression.h"
@@ -64,7 +64,7 @@
#include "tdehtml_factory.h"
#include <tdeio/job.h>
#include <tdemainwindow.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdeglobalsettings.h>
#include <tqcolor.h>
@@ -118,7 +118,7 @@ PartMonitor::PartMonitor(TDEHTMLPart *_part)
{
m_part = _part;
m_completed = false;
- connect(m_part,TQT_SIGNAL(completed()),this,TQT_SLOT(partCompleted()));
+ connect(m_part,TQ_SIGNAL(completed()),this,TQ_SLOT(partCompleted()));
m_timer_waits = 200;
m_timeout_timer = new TQTimer(this);
}
@@ -139,20 +139,20 @@ void PartMonitor::waitForCompletion()
sm_highestMonitor = this;
- kapp->enter_loop();
+ tdeApp->enter_loop();
- //connect(m_timeout_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT( timeout() ) );
+ //connect(m_timeout_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT( timeout() ) );
//m_timeout_timer->stop();
//m_timeout_timer->start( visual ? 100 : 2, true );
}
- TQTimer::singleShot( 0, this, TQT_SLOT( finishTimers() ) );
- kapp->enter_loop();
+ TQTimer::singleShot( 0, this, TQ_SLOT( finishTimers() ) );
+ tdeApp->enter_loop();
}
void PartMonitor::timeout()
{
- kapp->exit_loop();
+ tdeApp->exit_loop();
}
void PartMonitor::finishTimers()
@@ -161,10 +161,10 @@ void PartMonitor::finishTimers()
--m_timer_waits;
if ( m_timer_waits && (w && w->winq->hasTimers()) || m_part->inProgress()) {
// wait a bit
- TQTimer::singleShot( 10, this, TQT_SLOT(finishTimers() ) );
+ TQTimer::singleShot( 10, this, TQ_SLOT(finishTimers() ) );
return;
}
- kapp->exit_loop();
+ tdeApp->exit_loop();
}
void PartMonitor::partCompleted()
@@ -172,9 +172,9 @@ void PartMonitor::partCompleted()
m_completed = true;
RenderWidget::flushWidgetResizes();
m_timeout_timer->stop();
- connect(m_timeout_timer, TQT_SIGNAL(timeout()),this, TQT_SLOT( timeout() ) );
+ connect(m_timeout_timer, TQ_SIGNAL(timeout()),this, TQ_SLOT( timeout() ) );
m_timeout_timer->start( visual ? 100 : 2, true );
- disconnect(m_part,TQT_SIGNAL(completed()),this,TQT_SLOT(partCompleted()));
+ disconnect(m_part,TQ_SIGNAL(completed()),this,TQ_SLOT(partCompleted()));
}
static void signal_handler( int )
@@ -324,7 +324,7 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
PartMonitor pm(m_part);
m_part->openURL(url);
pm.waitForCompletion();
- kapp->processEvents(60000);
+ tdeApp->processEvents(60000);
break;
}
case OpenPageAsUrl: {
@@ -350,7 +350,7 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
char buf[1024];
int bytesread;
while (!file.atEnd()) {
- bytesread = file.tqreadBlock(buf,1024);
+ bytesread = file.readBlock(buf,1024);
stream.writeRawBytes(buf,bytesread);
}
file.close();
@@ -361,7 +361,7 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
m_part->end();
pm.waitForCompletion();
}
- kapp->processEvents(60000);
+ tdeApp->processEvents(60000);
break;
}
case Begin: {
@@ -376,7 +376,7 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
}
case End: {
m_part->end();
- kapp->processEvents(60000);
+ tdeApp->processEvents(60000);
break;
}
case ExecuteScript: {
@@ -386,11 +386,11 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
proxy->evaluate("",0,code,0,&comp);
if (comp.complType() == Throw)
exec->setException(comp.value());
- kapp->processEvents(60000);
+ tdeApp->processEvents(60000);
break;
}
case ProcessEvents: {
- kapp->processEvents(60000);
+ tdeApp->processEvents(60000);
break;
}
}
@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
TDEApplication a;
a.disableAutoDcopRegistration();
a.setStyle( "windows" );
- KSimpleConfig sc1( "cryptodefaults" );
+ TDESimpleConfig sc1( "cryptodefaults" );
sc1.setGroup( "Warnings" );
sc1.writeEntry( "OnUnencrypted", false );
a.config()->setGroup( "Notification Messages" );
@@ -541,7 +541,7 @@ int main(int argc, char *argv[])
int rv = 1;
if ( !args->isSet( "debug" ) ) {
- KSimpleConfig dc( "kdebugrc" );
+ TDESimpleConfig dc( "kdebugrc" );
static int areas[] = { 1000, 6000, 6005, 6010, 6020, 6030,
6031, 6035, 6036, 6040, 6041, 6045,
6050, 6060, 6061, 7000, 7006, 170,
@@ -593,10 +593,10 @@ int main(int argc, char *argv[])
args->isSet("genoutput"),
!args->isSet( "html" ),
!args->isSet( "js" ));
- TQObject::connect(part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
- regressionTest, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
- TQObject::connect(part->browserExtension(), TQT_SIGNAL(resizeTopLevelWidget( int, int )),
- regressionTest, TQT_SLOT(resizeTopLevelWidget( int, int )));
+ TQObject::connect(part->browserExtension(), TQ_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
+ regressionTest, TQ_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
+ TQObject::connect(part->browserExtension(), TQ_SIGNAL(resizeTopLevelWidget( int, int )),
+ regressionTest, TQ_SLOT(resizeTopLevelWidget( int, int )));
bool result = false;
QCStringList tests = args->getOptionList("test");
@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
link = TQString( "<hr>%1 failures. (%2 expected failures)" )
.arg(regressionTest->m_failures_work )
.arg( regressionTest->m_failures_fail );
- list.tqwriteBlock( link.latin1(), link.length() );
+ list.writeBlock( link.latin1(), link.length() );
list.close();
}
}
@@ -697,12 +697,12 @@ RegressionTest::RegressionTest(TDEHTMLPart *part, const TQString &baseDir, const
TQString s;
f.open( IO_WriteOnly | IO_Truncate );
s = "<html><body>Follow the white rabbit";
- f.tqwriteBlock( s.latin1(), s.length() );
+ f.writeBlock( s.latin1(), s.length() );
f.close();
f.setName( m_outputDir + "/index.html" );
f.open( IO_WriteOnly | IO_Truncate );
s = "<html><frameset cols=150,*><frame src=links.html><frame name=content src=empty.html>";
- f.tqwriteBlock( s.latin1(), s.length() );
+ f.writeBlock( s.latin1(), s.length() );
f.close();
m_paintBuffer = 0;
@@ -965,7 +965,7 @@ TQImage RegressionTest::renderToImage()
TQPainter* tp = new TQPainter;
tp->begin( m_paintBuffer );
tp->translate( -px, -py );
- tp->fillRect(px, py, 512, 128, Qt::magenta);
+ tp->fillRect(px, py, 512, 128, TQt::magenta);
m_part->document().handle()->renderer()->layer()->paint( tp, TQRect( px, py, 512, 128 ) );
tp->end();
delete tp;
@@ -994,12 +994,12 @@ bool RegressionTest::imageEqual( const TQImage &lhsi, const TQImage &rhsi )
for ( int y = 0; y < h; ++y )
{
- QRgb* ls = ( QRgb* ) lhsi.scanLine( y );
- QRgb* rs = ( QRgb* ) rhsi.scanLine( y );
+ TQRgb* ls = ( TQRgb* ) lhsi.scanLine( y );
+ TQRgb* rs = ( TQRgb* ) rhsi.scanLine( y );
if ( memcmp( ls, rs, bytes ) ) {
for ( int x = 0; x < w; ++x ) {
- QRgb l = ls[x];
- QRgb r = rs[x];
+ TQRgb l = ls[x];
+ TQRgb r = rs[x];
if ( ( abs( tqRed( l ) - tqRed(r ) ) < 20 ) &&
( abs( tqGreen( l ) - tqGreen(r ) ) < 20 ) &&
( abs( tqBlue( l ) - tqBlue(r ) ) < 20 ) )
@@ -1032,7 +1032,7 @@ void RegressionTest::createLink( const TQString& test, int failures )
if ( failures & PaintFailure )
link += "P";
link += "]<br>\n";
- list.tqwriteBlock( link.latin1(), link.length() );
+ list.writeBlock( link.latin1(), link.length() );
list.close();
}
@@ -1056,7 +1056,7 @@ void RegressionTest::doJavascriptReport( const TQString &test )
text.replace( '\n', "<br>\n" );
cl += text;
cl += "</tt></body></html>";
- compare.tqwriteBlock( cl.latin1(), cl.length() );
+ compare.writeBlock( cl.latin1(), cl.length() );
compare.close();
}
@@ -1248,7 +1248,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
cl += "<div id='dom' class='diff'>" + domDiff + "</div>";
cl += "</body></html>";
- compare.tqwriteBlock( cl.latin1(), cl.length() );
+ compare.writeBlock( cl.latin1(), cl.length() );
compare.close();
}