From 39d7cb00553d01cea32bfd52fa406aac15742ba0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 21 Dec 2011 14:24:21 -0600 Subject: Rename obsolete tq methods to standard names (cherry picked from commit abcbb684982167791304dc2fe0bc979489506b43) --- lib/cppparser/lexer.cpp | 4 ++-- lib/cppparser/lexer.h | 4 ++-- lib/interfaces/hashedstring.cpp | 6 +++--- lib/util/urlutil.cpp | 2 +- lib/widgets/fancylistviewitem.cpp | 2 +- lib/widgets/flagboxes.cpp | 14 +++++++------- lib/widgets/kdevhtmlpart.cpp | 2 +- lib/widgets/processwidget.cpp | 2 +- lib/widgets/propeditor/property.h | 2 +- lib/widgets/propeditor/psymbolcombo.cpp | 4 ++-- lib/widgets/qcomboview.cpp | 18 +++++++++--------- 11 files changed, 30 insertions(+), 30 deletions(-) (limited to 'lib') diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index d5f11872..ad9dca36 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -184,7 +184,7 @@ int Lexer::toInt( const Token& token ) int i = s[0] == 'L' ? 2 : 1; // wide char ? if( s[i] == '\\' ){ // escaped char - int c = s[i+1].tqunicode(); + int c = s[i+1].unicode(); switch( c ) { case '0': return 0; @@ -195,7 +195,7 @@ int Lexer::toInt( const Token& token ) return c; } } else { - return s[i].tqunicode(); + return s[i].unicode(); } } else { return 0; diff --git a/lib/cppparser/lexer.h b/lib/cppparser/lexer.h index 7b104c76..03f17e08 100644 --- a/lib/cppparser/lexer.h +++ b/lib/cppparser/lexer.h @@ -244,11 +244,11 @@ public: int currentColumn() const { return m_currentColumn; } inline const CHARTYPE* offset( int offset ) const { - return m_source.tqunicode() + offset; + return m_source.unicode() + offset; } inline int getOffset( const TQChar* p ) const { - return int(p - (m_source.tqunicode())); + return int(p - (m_source.unicode())); } private: diff --git a/lib/interfaces/hashedstring.cpp b/lib/interfaces/hashedstring.cpp index 4043d8a7..aae068a3 100644 --- a/lib/interfaces/hashedstring.cpp +++ b/lib/interfaces/hashedstring.cpp @@ -30,7 +30,7 @@ size_t hashStringSafe( const TQString& str ) { size_t hash = 0; int len = str.length(); for( int a = 0; a < len; a++ ) { - hash = str[a].tqunicode() + (hash * 17); + hash = str[a].unicode() + (hash * 17); } return hash; } @@ -43,12 +43,12 @@ size_t HashedString::hashString( const TQString& str ) size_t fastHashString( const TQString& str ) { size_t hash = 0; if( !str.isEmpty() ) { - const TQChar* curr = str.tqunicode(); + const TQChar* curr = str.unicode(); const TQChar* end = curr + str.length(); TQChar c; for(; curr < end ;) { c = *curr; - hash = c.tqunicode() + ( hash * 17 ); + hash = c.unicode() + ( hash * 17 ); ++curr; } } diff --git a/lib/util/urlutil.cpp b/lib/util/urlutil.cpp index a31aa789..69bfa2e3 100644 --- a/lib/util/urlutil.cpp +++ b/lib/util/urlutil.cpp @@ -303,7 +303,7 @@ TQString URLUtil::envExpand ( const TQString& str ) if (pos < 0) pos = len; - char* ret = getenv( TQConstString(str.tqunicode()+1, pos-1).string().local8Bit().data() ); + char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() ); if (ret) { diff --git a/lib/widgets/fancylistviewitem.cpp b/lib/widgets/fancylistviewitem.cpp index 6ff099e4..0effd52b 100644 --- a/lib/widgets/fancylistviewitem.cpp +++ b/lib/widgets/fancylistviewitem.cpp @@ -114,7 +114,7 @@ void FancyListViewItem::paintCell( TQPainter *painter, const TQColorGroup &cg, if ( isEnabled() || !lv ) p->setPen( cg.text() ); else if ( !isEnabled() && lv) - p->setPen( lv->tqpalette().disabled().text() ); + p->setPen( lv->palette().disabled().text() ); int iconWidth = 0; diff --git a/lib/widgets/flagboxes.cpp b/lib/widgets/flagboxes.cpp index 9905685f..eba12fbd 100644 --- a/lib/widgets/flagboxes.cpp +++ b/lib/widgets/flagboxes.cpp @@ -306,22 +306,22 @@ FlagPathEdit::FlagPathEdit( TQWidget * parent, TQString pathDelimiter, { TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1); topLayout->addWidget(new TQLabel(description, this)); - TQBoxLayout *tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); + TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); if (delimiter.isEmpty()) { url = new KURLRequester(this); url->setMode(mode); - tqlayout->addWidget(url); + layout->addWidget(url); } else { edit = new KLineEdit(this); - tqlayout->addWidget(edit); + layout->addWidget(edit); details = new TQPushButton("...", this); details->setMaximumWidth(30); connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPathDetails())); - tqlayout->addWidget(details); + layout->addWidget(details); } TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); @@ -532,16 +532,16 @@ FlagListEdit::FlagListEdit( TQWidget * parent, TQString listDelimiter, FlagEditC { TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1); topLayout->addWidget(new TQLabel(description, this)); - TQBoxLayout *tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); + TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); edit = new KLineEdit(this); - tqlayout->addWidget(edit); + layout->addWidget(edit); if (! listDelimiter.isEmpty()) { details = new TQPushButton("...", this); details->setMaximumWidth(30); connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showListDetails())); - tqlayout->addWidget(details); + layout->addWidget(details); } TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp index 220b846a..0a93d5fe 100644 --- a/lib/widgets/kdevhtmlpart.cpp +++ b/lib/widgets/kdevhtmlpart.cpp @@ -495,7 +495,7 @@ void KDevHTMLPart::slotCopy( ) { TQString text = selectedText(); text.replace( TQChar( 0xa0 ), ' ' ); - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); cb->setText(text); connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); diff --git a/lib/widgets/processwidget.cpp b/lib/widgets/processwidget.cpp index 56321450..54a06808 100644 --- a/lib/widgets/processwidget.cpp +++ b/lib/widgets/processwidget.cpp @@ -73,7 +73,7 @@ void ProcessListBoxItem::paint(TQPainter *p) { TQColor dim, warn, err, back; if (listBox()) { - const TQColorGroup& group = listBox()->tqpalette().active(); + const TQColorGroup& group = listBox()->palette().active(); if (isSelected()) { back = group.button(); warn = group.buttonText(); diff --git a/lib/widgets/propeditor/property.h b/lib/widgets/propeditor/property.h index 48c6987f..a94ea4cb 100644 --- a/lib/widgets/propeditor/property.h +++ b/lib/widgets/propeditor/property.h @@ -105,7 +105,7 @@ public: //predefined custom types ValueFromList = 2000 /**text().isNull())) - return TQVariant(TQString("%1").arg(m_edit->text().at(0).tqunicode())); + return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode())); else return TQVariant(0); } @@ -109,7 +109,7 @@ void PSymbolCombo::selectChar() void PSymbolCombo::updateProperty(const TQString& val) { - emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).tqunicode()))); + emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode()))); } void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp index 4db96f46..b9df3805 100644 --- a/lib/widgets/qcomboview.cpp +++ b/lib/widgets/qcomboview.cpp @@ -81,7 +81,7 @@ void QComboViewData::updateLinedGeometry() { if ( !ed || !combo ) return; - TQRect r = TQStyle::visualRect( combo->tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, combo, + TQRect r = TQStyle::visualRect( combo->style().querySubControlMetrics(TQStyle::CC_ComboBox, combo, TQStyle::SC_ComboBoxEditField), combo ); // qWarning("updateLinedGeometry(): currentItem is %d", combo->currentItem() == 0 ? 0 : 1); @@ -290,7 +290,7 @@ TQSize QComboView::sizeHint() const maxW = w; } */ - d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, this, + d->sizeHint = (style().tqsizeFromContents(TQStyle::CT_ComboBox, this, TQSize(maxW, maxH)).expandedTo(TQApplication::globalStrut())); return d->sizeHint; @@ -428,13 +428,13 @@ void QComboView::paintEvent( TQPaintEvent * ) } // bool reverse = TQApplication::reverseLayout(); - tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, + style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, flags, TQStyle::SC_All, (d->arrowDown ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None )); - TQRect re = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQStyle::SC_ComboBoxEditField ); re = TQStyle::visualRect(re, this); p.setClipRect( re ); @@ -472,7 +472,7 @@ void QComboView::mousePressEvent( TQMouseEvent *e ) d->discardNextMousePress = FALSE; return; } - TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQStyle::SC_ComboBoxArrow); arrowRect = TQStyle::visualRect(arrowRect, this); @@ -749,7 +749,7 @@ void QComboView::popup() if (y + h > sy+sh && y - h - height() >= 0 ) y = y - h - height(); TQRect rect = - tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + style().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQStyle::SC_ComboBoxListBoxPopup, TQStyleOption( x, y, w, h ) ); if ( rect.isNull() ) @@ -790,7 +790,7 @@ void QComboView::updateMask() { TQPainter p( &bm, this ); - tqstyle().drawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect()); + style().drawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect()); } setMask( bm ); @@ -902,7 +902,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) TQPoint comboPos; comboPos = mapFromGlobal( d->listView()->mapToGlobal(pos) ); TQRect arrowRect = - tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + style().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQStyle::SC_ComboBoxArrow); arrowRect = TQStyle::visualRect(arrowRect, this); if ( arrowRect.contains( comboPos ) ) { @@ -918,7 +918,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) } } } else if ((e->state() & ( Qt::RightButton | Qt::LeftButton | Qt::MidButton ) ) == 0 && - tqstyle().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) { + style().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) { // qWarning("event filter:: emu"); TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE ); // if ( mouseW == d->listView()->viewport() ) { //### -- cgit v1.2.3