diff options
Diffstat (limited to 'src/kvilib')
-rw-r--r-- | src/kvilib/ext/kvi_stringconversion.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/net/kvi_http.cpp | 58 | ||||
-rw-r--r-- | src/kvilib/net/kvi_http.h | 4 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_listview.cpp | 22 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_wizard.cpp | 2 |
5 files changed, 46 insertions, 46 deletions
diff --git a/src/kvilib/ext/kvi_stringconversion.cpp b/src/kvilib/ext/kvi_stringconversion.cpp index 2836628c..f316fc2a 100644 --- a/src/kvilib/ext/kvi_stringconversion.cpp +++ b/src/kvilib/ext/kvi_stringconversion.cpp @@ -234,17 +234,17 @@ namespace KviStringConversion bool fromString(const TQString & szValue,TQFont &buffer) { KviStr str = szValue; - KviStr family,pointSize,tqstyleHint,weight,options; + KviStr family,pointSize,styleHint,weight,options; str.getToken(family,','); str.getToken(pointSize,','); - str.getToken(tqstyleHint,','); + str.getToken(styleHint,','); str.getToken(weight,','); if(!family.isEmpty())buffer.setFamily(family.ptr()); int i; bool bOk; i = pointSize.toInt(&bOk); if(bOk && (i > 0))buffer.setPointSize(i); - i = tqstyleHint.toInt(&bOk); + i = styleHint.toInt(&bOk); if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i); i = weight.toInt(&bOk); if(bOk && (i >= 0))buffer.setWeight(i); diff --git a/src/kvilib/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp index 9986530a..6b3dd912 100644 --- a/src/kvilib/net/kvi_http.cpp +++ b/src/kvilib/net/kvi_http.cpp @@ -55,24 +55,24 @@ KviHttpRequest::KviHttpRequest() m_bHeaderProcessed = false; m_pBuffer = new KviDataBuffer(); - resettqStatus(); + resetStatus(); resetData(); } KviHttpRequest::~KviHttpRequest() { - resetInternaltqStatus(); + resetInternalStatus(); delete m_pBuffer; } void KviHttpRequest::abort() { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Aborted"); emit terminated(false); } -void KviHttpRequest::resetInternaltqStatus() +void KviHttpRequest::resetInternalStatus() { if(m_pThread)delete m_pThread; if(m_pDns)delete m_pDns; @@ -91,7 +91,7 @@ void KviHttpRequest::resetInternaltqStatus() KviThreadManager::killPendingEvents(this); } -void KviHttpRequest::resettqStatus() +void KviHttpRequest::resetStatus() { m_szLastError = __tr2qs("No request"); m_uTotalSize = 0; @@ -114,9 +114,9 @@ void KviHttpRequest::resetData() void KviHttpRequest::reset() { - resettqStatus(); + resetStatus(); resetData(); - resetInternaltqStatus(); + resetInternalStatus(); } bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFileName) @@ -131,8 +131,8 @@ bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFile bool KviHttpRequest::start() { // ensure that the file is closed - resetInternaltqStatus(); - resettqStatus(); + resetInternalStatus(); + resetStatus(); if(m_eProcessingType == StoreToFile) { @@ -156,14 +156,14 @@ bool KviHttpRequest::start() if(m_url.host().isEmpty()) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Invalid URL: Missing hostname"); return false; } if((!kvi_strEqualCI(m_url.protocol().ptr(),"http")) && (!kvi_strEqualCI(m_url.protocol().ptr(),"https"))) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError=__tr2qs("Unsupported protocol %1").tqarg(m_url.protocol().ptr()); return false; } @@ -185,7 +185,7 @@ bool KviHttpRequest::startDnsLookup() if(!m_pDns->lookup(m_url.host().ptr(),KviDns::IpV4)) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Unable to start the DNS lookup"); return false; } @@ -212,7 +212,7 @@ void KviHttpRequest::dnsLookupDone(KviDns *d) haveServerIp(); } else { int iErr = d->error(); - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = KviError::getDescription(iErr); emit terminated(false); } @@ -242,7 +242,7 @@ void KviHttpRequest::haveServerIp() if(!m_pThread->start()) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Unable to start the request slave thread"); emit terminated(false); return; @@ -318,7 +318,7 @@ bool KviHttpRequest::event(TQEvent *e) // nothing... just make gcc happy break; } - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Success"); emit terminated(true); return true; @@ -328,7 +328,7 @@ bool KviHttpRequest::event(TQEvent *e) KviStr * err = ((KviThreadDataEvent<KviStr> *)e)->getData(); m_szLastError = __tr2qs_no_xgettext(err->ptr()); delete err; - resetInternaltqStatus(); + resetInternalStatus(); emit terminated(false); return true; } @@ -425,7 +425,7 @@ bool KviHttpRequest::openFile() if(!d.rename(m_szFileName,tmp)) { // fail :( - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Failed to rename the existing file, please rename manually and retry"); emit terminated(false); return false; @@ -443,7 +443,7 @@ bool KviHttpRequest::openFile() if(!m_pFile->openForWriting(bAppend)) { - resetInternaltqStatus(); + resetInternalStatus(); KviTQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName); emit terminated(false); return false; @@ -473,7 +473,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) bool bValid = false; - unsigned int utqStatus = 0; + unsigned int uStatus = 0; // check the response value if(kvi_strEqualCSN(szResponse.ptr(),"HTTP",4)) @@ -486,14 +486,14 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if(idx != -1)szNumber = szR.left(idx); else szNumber = szR; bool bOk; - utqStatus = szNumber.toUInt(&bOk); + uStatus = szNumber.toUInt(&bOk); if(bOk)bValid = true; } if(!bValid) { // the response is invalid ? - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError=__tr2qs("Invalid HTTP response: %s").tqarg(szResponse.ptr()); emit terminated(false); return false; @@ -608,14 +608,14 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) // case 504: // Gateway timeout // case 505: // HTTP Version not supported - if((utqStatus != 200) && (utqStatus != 206)) + if((uStatus != 200) && (uStatus != 206)) { // this is not "OK" and not "Partial content" // Error , redirect or something confusing if(m_eProcessingType != HeadersOnly) { // this is an error then - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = szResponse.ptr(); emit terminated(false); return false; @@ -624,7 +624,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if((m_uMaxContentLength > 0) && (m_uTotalSize > ((unsigned int)m_uMaxContentLength))) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError=__tr2qs("Stream exceeding maximum length"); emit terminated(false); return false; @@ -657,7 +657,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // header not complete if(m_pBuffer->size() > 4096) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Header too long: exceeded 4096 bytes"); emit terminated(false); } @@ -706,7 +706,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } @@ -794,7 +794,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) m_uRemainingChunkSize = szHexHeader.toLong(&bOk,16); if(!bOk) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Protocol error: invalid chunk size"); emit terminated(false); return; @@ -814,7 +814,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // chunk header not complete if(m_pBuffer->size() > 4096) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError = __tr2qs("Chunk header too long: exceeded 4096 bytes"); emit terminated(false); return; @@ -848,7 +848,7 @@ check_stream_length: if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternaltqStatus(); + resetInternalStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } diff --git a/src/kvilib/net/kvi_http.h b/src/kvilib/net/kvi_http.h index de4457d8..2eeec379 100644 --- a/src/kvilib/net/kvi_http.h +++ b/src/kvilib/net/kvi_http.h @@ -104,9 +104,9 @@ protected: bool openFile(); void emitLines(KviDataBuffer * pDataBuffer); - void resettqStatus(); + void resetStatus(); void resetData(); - void resetInternaltqStatus(); + void resetInternalStatus(); protected slots: void dnsLookupDone(KviDns *d); void haveServerIp(); diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index 2d946a21..1a7f9754 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -479,7 +479,7 @@ return; TQPoint pos; - int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (activatedPos(pos)) { bool parentControl = false; if (parent() && parent()->rtti() == 1 && @@ -652,7 +652,7 @@ int h = height(); KviTalListView *lv = listView(); if (lv) - h = qMax(lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), + h = qMax(lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), h); h = qMax(h, TQApplication::globalStrut().height()); setHeight(h); @@ -666,7 +666,7 @@ if (myType == RadioButtonController && pixmap(0)) { // r += 0; } else { - r += lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; + r += lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; } } return qMax(r, TQApplication::globalStrut().width()); @@ -700,7 +700,7 @@ parentControl = true; TQFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->tqstyle()->tqpixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + int boxsize = lv->tqstyle()->pixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : TQStyle::PM_CheckListButtonSize, 0, lv); int marg = lv->itemMargin(); int r = marg; @@ -782,7 +782,7 @@ (lv->rootIsDecorated() || myType == RadioButton || (myType == CheckBox && parentControl))) { TQRect rect; - int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (lv->columnAlignment(0) == TQt::AlignCenter) { TQFontMetrics fm(lv->font()); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; @@ -1216,7 +1216,7 @@ return; TQPoint pos; - int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { bool parentControl = FALSE; if ( parent() && parent()->rtti() == 1 && @@ -1388,7 +1388,7 @@ int h = height(); KviTalListView *lv = listView(); if ( lv ) - h = TQMAX( lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv), + h = TQMAX( lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv), h ); h = TQMAX( h, TQApplication::globalStrut().height() ); setHeight( h ); @@ -1402,7 +1402,7 @@ if ( myType == RadioButtonController && pixmap( 0 ) ) { // r += 0; } else { - r += lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; + r += lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; } } return TQMAX( r, TQApplication::globalStrut().width() ); @@ -1420,7 +1420,7 @@ const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) + if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); @@ -1437,7 +1437,7 @@ parentControl = TRUE; TQFontMetrics fm( lv->fontMetrics() ); - int boxsize = lv->tqstyle().tqpixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + int boxsize = lv->tqstyle().pixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); int r = marg; @@ -1519,7 +1519,7 @@ (lv->rootIsDecorated() || myType == RadioButton || (myType == CheckBox && parentControl) ) ) { TQRect rect; - int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( lv->columnAlignment(0) == AlignCenter ) { TQFontMetrics fm( lv->font() ); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp index 53b7c03f..a0aee30c 100644 --- a/src/kvilib/tal/kvi_tal_wizard.cpp +++ b/src/kvilib/tal/kvi_tal_wizard.cpp @@ -184,7 +184,7 @@ KviTalWizard::KviTalWizard(TQWidget * pParent) #endif m_p->pStepsLabel = new TQLabel(this); m_p->pStepsLabel->setMinimumWidth(80); - m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight); + m_p->pStepsLabel->setAlignment(TQt::AlignRight); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3); #else |