From 72849e2a6f973af3eeaa573a66635e37cc427bb0 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Thu, 28 Nov 2013 13:28:01 -0600 Subject: [PATCH] Fix remnant QMIN/QMAX to TQMIN/TQMAX. --- arts/kde/kvideowidget.cpp | 12 +++++----- kimgio/rgb.cpp | 2 +- kimgio/xcf.cpp | 2 +- tdecore/kdebug.cpp | 2 +- tdecore/kiconeffect.cpp | 6 ++--- tdecore/kiconloader.cpp | 2 +- tdecore/tdeconfigskeleton.cpp | 28 +++++++++++------------ tdefx/tdestyle.cpp | 8 +++---- tdehtml/rendering/render_box.cpp | 4 ++-- tdehtml/tdehtml_caret.cpp | 6 ++--- tdeio/tdefile/kurlbar.cpp | 20 ++++++++--------- tdeio/tdefile/tdefilemetainfowidget.cpp | 2 +- tdeio/tdeio/dataprotocol.cpp | 2 +- tdeio/tdeio/klimitediodevice.h | 2 +- tdeio/tdeio/ktar.cpp | 4 ++-- tdeio/tdeio/kzip.cpp | 2 +- tdeio/tdeio/tdeprotocolmanager.cpp | 8 +++---- tdeprint/droptionview.cpp | 4 ++-- tdeprint/kmjobmanager.cpp | 2 +- tdeprint/kmvirtualmanager.cpp | 4 ++-- tdeprint/kpmarginpage.cpp | 8 +++---- tdeprint/kprintdialog.cpp | 2 +- tdeprint/kprinter.cpp | 14 ++++++------ tdeprint/management/kmiconview.cpp | 4 ++-- tdeprint/management/kmtimer.cpp | 2 +- tdeprint/posterpreview.cpp | 8 +++---- tdeprint/tests/drawdemo.cpp | 2 +- tdeprint/treecombobox.cpp | 2 +- tdestyles/highcolor/highcolor.cpp | 12 +++++----- tdestyles/highcontrast/highcontrast.cpp | 16 ++++++------- tdestyles/keramik/keramik.cpp | 26 ++++++++++----------- tdestyles/klegacy/klegacystyle.cpp | 2 +- tdestyles/kthemestyle/kthemestyle.cpp | 14 ++++++------ tdestyles/light/lightstyle-v2.cpp | 12 +++++----- tdestyles/light/lightstyle-v3.cpp | 12 +++++----- tdestyles/plastik/plastik.cpp | 18 +++++++-------- tdestyles/web/webstyle.cpp | 6 ++--- tdeui/kcombobox.cpp | 2 +- tdeui/kdatepicker.cpp | 10 ++++----- tdeui/kdatetbl.cpp | 8 +++---- tdeui/kdatewidget.cpp | 6 ++--- tdeui/kdialog.cpp | 12 +++++----- tdeui/kdialogbase.cpp | 10 ++++----- tdeui/keditlistbox.cpp | 2 +- tdeui/kiconview.cpp | 30 ++++++++++++------------- tdeui/kjanuswidget.cpp | 12 +++++----- tdeui/knuminput.cpp | 24 ++++++++++---------- tdeui/kscrollview.cpp | 2 +- tdeui/ksharedpixmap.cpp | 4 ++-- tdeui/ksyntaxhighlighter.cpp | 2 +- tdeui/ktabwidget.cpp | 6 ++--- tdeui/kurllabel.cpp | 4 ++-- tdeui/kwordwrap.cpp | 6 ++--- tdeui/tdeaboutdialog.cpp | 28 +++++++++++------------ tdeui/tdecompletionbox.cpp | 6 ++--- tdeui/tdefontdialog.cpp | 2 +- tdeui/tdemainwindow.cpp | 8 +++---- tdeui/tdepopupmenu.cpp | 2 +- tdeui/tdespell.cpp | 2 +- tdeutils/tdemultitabbar.cpp | 4 ++-- tdewallet/backend/tdewalletbackend.cc | 6 ++--- win/qeventloopex.cpp | 6 ++--- 62 files changed, 243 insertions(+), 243 deletions(-) diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index c03a18c21..f3a8c9030 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -321,14 +321,14 @@ void KVideoWidget::resizeEvent( TQResizeEvent *event ) if (width() > minimumWidth() || height() > minimumHeight()) { - if (width() == QMAX( (videoWidth / 2), minimumWidth() ) && - height() == QMAX( (videoHeight / 2), minimumHeight() )) + if (width() == TQMAX( (videoWidth / 2), minimumWidth() ) && + height() == TQMAX( (videoHeight / 2), minimumHeight() )) ((TDEToggleAction *)action( "half_size" ))->setChecked( true ); - else if (width() == QMAX( videoWidth, minimumWidth() ) && - height() == QMAX( videoHeight, minimumHeight() )) + else if (width() == TQMAX( videoWidth, minimumWidth() ) && + height() == TQMAX( videoHeight, minimumHeight() )) ((TDEToggleAction *)action( "normal_size" ))->setChecked( true ); - else if (width() == QMAX( (2 * videoWidth), minimumWidth() ) && - height() == QMAX( (2 * videoHeight), minimumHeight() )) + else if (width() == TQMAX( (2 * videoWidth), minimumWidth() ) && + height() == TQMAX( (2 * videoHeight), minimumHeight() )) ((TDEToggleAction *)action( "double_size" ))->setChecked( true ); else { diff --git a/kimgio/rgb.cpp b/kimgio/rgb.cpp index ae2439083..cf1f2331a 100644 --- a/kimgio/rgb.cpp +++ b/kimgio/rgb.cpp @@ -310,7 +310,7 @@ void RLEData::write(TQDataStream& s) bool RLEData::operator<(const RLEData& b) const { uchar ac, bc; - for (unsigned i = 0; i < QMIN(size(), b.size()); i++) { + for (unsigned i = 0; i < TQMIN(size(), b.size()); i++) { ac = at(i); bc = b[i]; if (ac != bc) diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp index 252b3e036..1c0bb79d1 100644 --- a/kimgio/xcf.cpp +++ b/kimgio/xcf.cpp @@ -116,7 +116,7 @@ XCFImageFormat::XCFImageFormat() inline int XCFImageFormat::add_lut( int a, int b ) { - return QMIN( a + b, 255 ); + return TQMIN( a + b, 255 ); } void XCFImageFormat::readXCF(TQImageIO *io) diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index 13894cf19..e4219cd75 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -587,7 +587,7 @@ kdbgstream& kdbgstream::operator<<( const TQByteArray& data) { if (!print) return *this; output += '['; unsigned int i = 0; - unsigned int sz = QMIN( data.size(), 64 ); + unsigned int sz = TQMIN( data.size(), 64 ); for ( ; i < sz ; ++i ) { output += TQString::number( (unsigned char) data[i], 16 ).rightJustify(2, '0'); if ( i < sz ) diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index c1a4a8ca5..675731401 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -693,7 +693,7 @@ void TDEIconEffect::overlay(TQImage &src, TQImage &overlay) r2 = (a1 * r1 + (0xff - a1) * r2) >> 8; g2 = (a1 * g1 + (0xff - a1) * g2) >> 8; b2 = (a1 * b1 + (0xff - a1) * b2) >> 8; - a2 = QMAX(a1, a2); + a2 = TQMAX(a1, a2); sline[j] = tqRgba(r2, g2, b2, a2); } @@ -711,7 +711,7 @@ TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect) uint actSpeed = TDEGlobalSettings::visualActivateSpeed(); - uint actCount = QMIN(rect.width(), rect.height()) / 2; + uint actCount = TQMIN(rect.width(), rect.height()) / 2; // Clip actCount to range 1..10. @@ -749,7 +749,7 @@ TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect) // The spacing between the rects we draw. // Use the minimum of width and height to avoid painting outside the // pixmap area. - //unsigned int delta(QMIN(rect.width() / actCount, rect.height() / actCount)); + //unsigned int delta(TQMIN(rect.width() / actCount, rect.height() / actCount)); // Support for rectangles by David unsigned int deltaX = rect.width() / actCount; diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index df233cec1..0f13f7cef 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -814,7 +814,7 @@ TQPixmap TDEIconLoader::loadIcon(const TQString& _name, TDEIcon::Group group, in { QRgb *line = reinterpret_cast(img->scanLine(y)); for (int x = 0; x < img->width(); x++) - line[x] = (line[x] & 0x00ffffff) | (QMIN(0x80, tqAlpha(line[x])) << 24); + line[x] = (line[x] & 0x00ffffff) | (TQMIN(0x80, tqAlpha(line[x])) << 24); } } } diff --git a/tdecore/tdeconfigskeleton.cpp b/tdecore/tdeconfigskeleton.cpp index 45a4b4112..4a389f3fe 100644 --- a/tdecore/tdeconfigskeleton.cpp +++ b/tdecore/tdeconfigskeleton.cpp @@ -177,9 +177,9 @@ void TDEConfigSkeleton::ItemInt::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readNumEntry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -234,9 +234,9 @@ void TDEConfigSkeleton::ItemInt64::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readNum64Entry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -348,9 +348,9 @@ void TDEConfigSkeleton::ItemUInt::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readUnsignedNumEntry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -405,9 +405,9 @@ void TDEConfigSkeleton::ItemUInt64::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readUnsignedNum64Entry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -461,9 +461,9 @@ void TDEConfigSkeleton::ItemLong::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readLongNumEntry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -519,9 +519,9 @@ void TDEConfigSkeleton::ItemULong::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readUnsignedLongNumEntry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); @@ -576,9 +576,9 @@ void TDEConfigSkeleton::ItemDouble::readConfig( TDEConfig *config ) config->setGroup( mGroup ); mReference = config->readDoubleNumEntry( mKey, mDefault ); if (mHasMin) - mReference = QMAX(mReference, mMin); + mReference = TQMAX(mReference, mMin); if (mHasMax) - mReference = QMIN(mReference, mMax); + mReference = TQMIN(mReference, mMax); mLoadedValue = mReference; readImmutability( config ); diff --git a/tdefx/tdestyle.cpp b/tdefx/tdestyle.cpp index 36355a9bc..576b56777 100644 --- a/tdefx/tdestyle.cpp +++ b/tdefx/tdestyle.cpp @@ -892,7 +892,7 @@ void TDEStyle::drawControl( TQ_ControlElement element, // Draw progress bar if (progress > 0 || steps == 0) { double pg = (steps == 0) ? 0.1 : progress / steps; - int width = QMIN(cr.width(), (int)(pg * cr.width())); + int width = TQMIN(cr.width(), (int)(pg * cr.width())); if (steps == 0) { //Busy indicator if (width < 1) width = 1; //A busy indicator with width 0 is kind of useless @@ -959,7 +959,7 @@ void TDEStyle::drawControl( TQ_ControlElement element, // Draw label if (progress > 0 || steps == 0) { double pg = (steps == 0) ? 1.0 : progress / steps; - int width = QMIN(cr.width(), (int)(pg * cr.width())); + int width = TQMIN(cr.width(), (int)(pg * cr.width())); TQRect crect; if (reverse) crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height()); @@ -1334,7 +1334,7 @@ void TDEStyle::drawComplexControl( TQ_ComplexControl control, // paint stuff in the magical area TQListView* v = item->listView(); - int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(), + int lh = TQMAX( p->fontMetrics().height() + 2 * v->itemMargin(), TQApplication::globalStrut().height() ); if ( lh % 2 > 0 ) lh++; @@ -1895,7 +1895,7 @@ int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceDat case SH_PopupMenu_SubMenuPopupDelay: if ( styleHint( SH_PopupMenu_SloppySubMenus, ceData, elementFlags, TQStyleOption::Default, 0, w ) ) - return QMIN( 100, d->popupMenuDelay ); + return TQMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp index 85e1f6665..d804094ef 100644 --- a/tdehtml/rendering/render_box.cpp +++ b/tdehtml/rendering/render_box.cpp @@ -366,8 +366,8 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty) int bx = _tx - marginLeft(); int by = _ty - marginTop(); - int bw = QMAX(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw); - int bh = QMAX(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh); + int bw = TQMAX(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw); + int bh = TQMAX(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh); // CSS2 14.2: // " The background of the box generated by the root element covers the entire canvas." diff --git a/tdehtml/tdehtml_caret.cpp b/tdehtml/tdehtml_caret.cpp index 808c52982..3d81997f0 100644 --- a/tdehtml/tdehtml_caret.cpp +++ b/tdehtml/tdehtml_caret.cpp @@ -1357,7 +1357,7 @@ void LineIterator::nextBlock() int state; // not used mapRenderPosToTraversalState(cb_outside, cb_outside_end, false, trav); #if DEBUG_CARETMODE > 1 - kdDebug(6200) << "nextBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl; + kdDebug(6200) << "nextBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, TQMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl; #endif r = advanceSuitableObject(r, trav, false, base, state); if (!r) { @@ -1426,7 +1426,7 @@ void LineIterator::prevBlock() int state; // not used mapRenderPosToTraversalState(cb_outside, cb_outside_end, true, trav); #if DEBUG_CARETMODE > 1 - kdDebug(6200) << "prevBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl; + kdDebug(6200) << "prevBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, TQMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl; #endif r = advanceSuitableObject(r, trav, true, base, state); if (!r) { @@ -1647,7 +1647,7 @@ bool EditableCaretBoxIterator::isEditable(const CaretBoxIterator &boxit, bool fr RenderObject *r = b->object(); #if DEBUG_CARETMODE > 0 // if (b->isInlineFlowBox()) kdDebug(6200) << "b is inline flow box" << (outside ? " (outside)" : "") << endl; - kdDebug(6200) << "isEditable r" << r << ": " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << endl; + kdDebug(6200) << "isEditable r" << r << ": " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, TQMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << endl; #endif // Must check caret mode or design mode *after* r->element(), otherwise // lines without a backing DOM node get regarded, leading to a crash. diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index 88b050db4..6eb823e00 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -209,7 +209,7 @@ void KURLBarItem::paint( TQPainter *p ) // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1 // (where it will properly use pixmap() instead of the internal pixmap) const TQPixmap *pm = pixmap(); - int yPos = QMAX( 0, (height(box) - pm->height())/2 ); + int yPos = TQMAX( 0, (height(box) - pm->height())/2 ); p->drawPixmap( margin, yPos, *pm ); if ( !text().isEmpty() ) { @@ -245,7 +245,7 @@ void KURLBarItem::paint( TQPainter *p ) if ( !pm->isNull() ) { int x = (w - pm->width()) / 2; - x = QMAX( x, margin ); + x = TQMAX( x, margin ); p->drawPixmap( x, y, *pm ); } @@ -256,7 +256,7 @@ void KURLBarItem::paint( TQPainter *p ) int stringWidth = box->width() - (margin * 2); TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth ); int x = (w - fm.width( visibleText )) / 2; - x = QMAX( x, margin ); + x = TQMAX( x, margin ); if ( isCurrent() || isSelected() ) { p->setPen( box->colorGroup().highlight().dark(115) ); @@ -281,14 +281,14 @@ TQSize KURLBarItem::sizeHint() const hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2; } else { - wmin = QMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2; + wmin = TQMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2; hmin = lb->fontMetrics().lineSpacing() + pixmap()->height() + KDialog::spacingHint() * 2; } if ( lb->isVertical() ) - wmin = QMIN( wmin, lb->viewport()->sizeHint().width() ); + wmin = TQMIN( wmin, lb->viewport()->sizeHint().width() ); else - hmin = QMIN( hmin, lb->viewport()->sizeHint().height() ); + hmin = TQMIN( hmin, lb->viewport()->sizeHint().height() ); return TQSize( wmin, hmin ); } @@ -296,7 +296,7 @@ TQSize KURLBarItem::sizeHint() const int KURLBarItem::width( const TQListBox *lb ) const { if ( static_cast( lb )->isVertical() ) - return QMAX( sizeHint().width(), lb->viewport()->width() ); + return TQMAX( sizeHint().width(), lb->viewport()->width() ); else return sizeHint().width(); } @@ -306,7 +306,7 @@ int KURLBarItem::height( const TQListBox *lb ) const if ( static_cast( lb )->isVertical() ) return sizeHint().height(); else - return QMAX( sizeHint().height(), lb->viewport()->height() ); + return TQMAX( sizeHint().height(), lb->viewport()->height() ); } bool KURLBarItem::isPersistent() const @@ -489,12 +489,12 @@ TQSize KURLBar::sizeHint() const TQSize sh = item->sizeHint(); if ( vertical ) { - w = QMAX( w, sh.width() ); + w = TQMAX( w, sh.width() ); h += sh.height(); } else { w += sh.width(); - h = QMAX( h, sh.height() ); + h = TQMAX( h, sh.height() ); } } diff --git a/tdeio/tdefile/tdefilemetainfowidget.cpp b/tdeio/tdefile/tdefilemetainfowidget.cpp index 50fef856b..4590ee381 100644 --- a/tdeio/tdefile/tdefilemetainfowidget.cpp +++ b/tdeio/tdefile/tdefilemetainfowidget.cpp @@ -207,7 +207,7 @@ TQWidget* KFileMetaInfoWidget::makeIntWidget() // make sure that an uint cannot be set to a value < 0 if (m_item.type() == TQVariant::UInt) - sb->setMinValue(QMAX(sb->minValue(), 0)); + sb->setMinValue(TQMAX(sb->minValue(), 0)); connect(sb, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); return sb; diff --git a/tdeio/tdeio/dataprotocol.cpp b/tdeio/tdeio/dataprotocol.cpp index 8478ea0cb..62ba52a6b 100644 --- a/tdeio/tdeio/dataprotocol.cpp +++ b/tdeio/tdeio/dataprotocol.cpp @@ -266,7 +266,7 @@ void DataProtocol::get(const KURL& url) { parseDataHeader(url,hdr); int size = (int)hdr.url.length(); - int data_ofs = QMIN(hdr.data_offset,size); + int data_ofs = TQMIN(hdr.data_offset,size); // FIXME: string is copied, would be nice if we could have a reference only TQString url_data = hdr.url.mid(data_ofs); TQCString outData; diff --git a/tdeio/tdeio/klimitediodevice.h b/tdeio/tdeio/klimitediodevice.h index 602ba45a0..3dc6c80f3 100644 --- a/tdeio/tdeio/klimitediodevice.h +++ b/tdeio/tdeio/klimitediodevice.h @@ -92,7 +92,7 @@ public: virtual Offset at() const { return m_dev->at() - m_start; } virtual bool at( Offset pos ) { Q_ASSERT( pos <= m_length ); - pos = QMIN( pos, m_length ); // Apply upper limit + pos = TQMIN( pos, m_length ); // Apply upper limit return m_dev->at( m_start + pos ); } virtual bool atEnd() const { return m_dev->atEnd() || m_dev->at() >= m_start + m_length; } diff --git a/tdeio/tdeio/ktar.cpp b/tdeio/tdeio/ktar.cpp index cb5bba1fa..058d328b7 100644 --- a/tdeio/tdeio/ktar.cpp +++ b/tdeio/tdeio/ktar.cpp @@ -238,7 +238,7 @@ bool KTar::readLonglink(char *buffer,TQCString &longlink) { dummy = longlink.data(); int offset = 0; while (size > 0) { - int chunksize = QMIN(size, 0x200); + int chunksize = TQMIN(size, 0x200); n = dev->readBlock( dummy + offset, chunksize ); if (n == -1) return false; size -= chunksize; @@ -744,7 +744,7 @@ void KTar::writeLonglink(char *buffer, const TQCString &name, char typeflag, device()->writeBlock( buffer, 0x200 ); int offset = 0; while (namelen > 0) { - int chunksize = QMIN(namelen, 0x200); + int chunksize = TQMIN(namelen, 0x200); memcpy(buffer, name.data()+offset, chunksize); // write long name device()->writeBlock( buffer, 0x200 ); diff --git a/tdeio/tdeio/kzip.cpp b/tdeio/tdeio/kzip.cpp index 85dcb76d1..23052ce51 100644 --- a/tdeio/tdeio/kzip.cpp +++ b/tdeio/tdeio/kzip.cpp @@ -492,7 +492,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl; // skip rest of extra field in case it is too long unsigned int extraFieldEnd = dev->at() + extralen; pfi->extralen = extralen; - int handledextralen = QMIN(extralen, (int)sizeof buffer); + int handledextralen = TQMIN(extralen, (int)sizeof buffer); kdDebug(7040) << "handledextralen: " << handledextralen << endl; diff --git a/tdeio/tdeio/tdeprotocolmanager.cpp b/tdeio/tdeio/tdeprotocolmanager.cpp index 65ad393a3..04d0de5bb 100644 --- a/tdeio/tdeio/tdeprotocolmanager.cpp +++ b/tdeio/tdeio/tdeprotocolmanager.cpp @@ -114,7 +114,7 @@ int KProtocolManager::readTimeout() TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ReadTimeout", DEFAULT_READ_TIMEOUT ); - return QMAX(MIN_TIMEOUT_VALUE, val); + return TQMAX(MIN_TIMEOUT_VALUE, val); } int KProtocolManager::connectTimeout() @@ -122,7 +122,7 @@ int KProtocolManager::connectTimeout() TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ConnectTimeout", DEFAULT_CONNECT_TIMEOUT ); - return QMAX(MIN_TIMEOUT_VALUE, val); + return TQMAX(MIN_TIMEOUT_VALUE, val); } int KProtocolManager::proxyConnectTimeout() @@ -130,7 +130,7 @@ int KProtocolManager::proxyConnectTimeout() TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ProxyConnectTimeout", DEFAULT_PROXY_CONNECT_TIMEOUT ); - return QMAX(MIN_TIMEOUT_VALUE, val); + return TQMAX(MIN_TIMEOUT_VALUE, val); } int KProtocolManager::responseTimeout() @@ -138,7 +138,7 @@ int KProtocolManager::responseTimeout() TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ResponseTimeout", DEFAULT_RESPONSE_TIMEOUT ); - return QMAX(MIN_TIMEOUT_VALUE, val); + return TQMAX(MIN_TIMEOUT_VALUE, val); } /*========================== PROXY SETTINGS =================================*/ diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 77a910b0c..de20a62fa 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -94,7 +94,7 @@ void OptionNumericView::setOption(DrBase *opt) int min_ = opt->get("minval").toInt(); int max_ = opt->get("maxval").toInt(); m_slider->setRange(min_,max_); - m_slider->setSteps(1,QMAX((max_-min_)/20,1)); + m_slider->setSteps(1,TQMAX((max_-min_)/20,1)); m_minval->setText(TQString::number(min_)); m_maxval->setText(TQString::number(max_)); } @@ -104,7 +104,7 @@ void OptionNumericView::setOption(DrBase *opt) int min_ = (int)rint(opt->get("minval").toFloat()*1000); int max_ = (int)rint(opt->get("maxval").toFloat()*1000); m_slider->setRange(min_,max_); - m_slider->setSteps(1,QMAX((max_-min_)/20,1)); + m_slider->setSteps(1,TQMAX((max_-min_)/20,1)); m_minval->setText(opt->get("minval")); m_maxval->setText(opt->get("maxval")); } diff --git a/tdeprint/kmjobmanager.cpp b/tdeprint/kmjobmanager.cpp index de71d4dc7..9c655435d 100644 --- a/tdeprint/kmjobmanager.cpp +++ b/tdeprint/kmjobmanager.cpp @@ -229,7 +229,7 @@ void KMJobManager::removePrinter(const TQString& pr, KMJobManager::JobType type) struct JobFilter *jf = m_filter.find(pr); if (jf) { - jf->m_type[type] = QMAX(0, jf->m_type[type]-1); + jf->m_type[type] = TQMAX(0, jf->m_type[type]-1); if (!jf->m_type[0] && !jf->m_type[1]) m_filter.remove(pr); } diff --git a/tdeprint/kmvirtualmanager.cpp b/tdeprint/kmvirtualmanager.cpp index dabad3093..9262f3e3c 100644 --- a/tdeprint/kmvirtualmanager.cpp +++ b/tdeprint/kmvirtualmanager.cpp @@ -186,14 +186,14 @@ void KMVirtualManager::refresh() if (getuid() == 0) fi.setFile(fi2.absFilePath()); - if (!m_checktime.isValid() || m_checktime < QMAX(fi.lastModified(),fi2.lastModified())) + if (!m_checktime.isValid() || m_checktime < TQMAX(fi.lastModified(),fi2.lastModified())) { m_defaultprinter = TQString::null; if (fi2.exists()) loadFile(fi2.absFilePath()); if (fi.exists() && fi.absFilePath() != fi2.absFilePath()) loadFile(fi.absFilePath()); - m_checktime = QMAX(fi.lastModified(),fi2.lastModified()); + m_checktime = TQMAX(fi.lastModified(),fi2.lastModified()); } else { // parse printers looking for instances -> undiscarded them, real printers diff --git a/tdeprint/kpmarginpage.cpp b/tdeprint/kpmarginpage.cpp index 78b9ca6ef..019cf34d9 100644 --- a/tdeprint/kpmarginpage.cpp +++ b/tdeprint/kpmarginpage.cpp @@ -90,10 +90,10 @@ void KPMarginPage::initPageSize(const TQString& ps, bool landscape) { w = dps->pageWidth(); h = dps->pageHeight(); - mt = QMAX( mt, dps->topMargin() ); - ml = QMAX( ml, dps->leftMargin() ); - mb = QMAX( mb, dps->bottomMargin() ); - mr = QMAX( mr, dps->rightMargin() ); + mt = TQMAX( mt, dps->topMargin() ); + ml = TQMAX( ml, dps->leftMargin() ); + mb = TQMAX( mb, dps->bottomMargin() ); + mr = TQMAX( mr, dps->rightMargin() ); } } } diff --git a/tdeprint/kprintdialog.cpp b/tdeprint/kprintdialog.cpp index d881971ff..afe775c57 100644 --- a/tdeprint/kprintdialog.cpp +++ b/tdeprint/kprintdialog.cpp @@ -580,7 +580,7 @@ void KPrintDialog::initialize(KPrinter *printer) else if (defsearch == -1 && it.current()->name() == printer->searchName()) defsearch = d->m_printers->count()-1; } - int defindex = (defsearch != -1 ? defsearch : (defsoft != -1 ? defsoft : QMAX(defhard,0))); + int defindex = (defsearch != -1 ? defsearch : (defsoft != -1 ? defsoft : TQMAX(defhard,0))); d->m_printers->setCurrentItem(defindex); //slotPrinterSelected(defindex); } diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp index 4b9a1c98f..010297e5a 100644 --- a/tdeprint/kprinter.cpp +++ b/tdeprint/kprinter.cpp @@ -334,14 +334,14 @@ void KPrinter::translateQtOptions() { // Printers can often print very close to the edges (PPD files say ImageArea==PaperDimension). // But that doesn't mean it looks good. Apps which use setFullPage(false) assume that - // KPrinter will give them reasonable margins, so let's QMAX with defaults from Qt in that case. + // KPrinter will give them reasonable margins, so let's TQMAX with defaults from Qt in that case. // Keep this in sync with KPMarginPage::initPageSize unsigned int it, il, ib, ir; d->m_wrapper->margins( &it, &il, &ib, &ir ); - top = QMAX( top, (int)it ); - left = QMAX( left, (int)il ); - bottom = QMAX( bottom, (int)ib ); - right = QMAX( right, (int)ir ); + top = TQMAX( top, (int)it ); + left = TQMAX( left, (int)il ); + bottom = TQMAX( bottom, (int)ib ); + right = TQMAX( right, (int)ir ); } d->m_wrapper->setMargins( top, left, bottom, right ); } @@ -502,8 +502,8 @@ TQValueList KPrinter::pageList() const if (ok && p1 <= p2) { // clip to min/max - p1 = QMAX(mp,p1); - p2 = QMIN(MP,p2); + p1 = TQMAX(mp,p1); + p2 = TQMIN(MP,p2); for (int i=p1;i<=p2;i++) list.append(i); } diff --git a/tdeprint/management/kmiconview.cpp b/tdeprint/management/kmiconview.cpp index 8ab3a7279..5cd37c948 100644 --- a/tdeprint/management/kmiconview.cpp +++ b/tdeprint/management/kmiconview.cpp @@ -68,13 +68,13 @@ void KMIconViewItem::calcRect(const TQString&) if (m_mode == TQIconView::Bottom) { ir.setHeight(pr.height() + tr.height() + 15); - ir.setWidth(QMAX(pr.width(), tr.width()) + 10); + ir.setWidth(TQMAX(pr.width(), tr.width()) + 10); pr = TQRect((ir.width()-pr.width())/2, 5, pr.width(), pr.height()); tr = TQRect((ir.width()-tr.width())/2, 10+pr.height(), tr.width(), tr.height()); } else { - ir.setHeight(QMAX(pr.height(), tr.height()) + 4); + ir.setHeight(TQMAX(pr.height(), tr.height()) + 4); ir.setWidth(pr.width() + tr.width() + 6); pr = TQRect(2, (ir.height()-pr.height())/2, pr.width(), pr.height()); tr = TQRect(4+pr.width(), (ir.height()-tr.height())/2, tr.width(), tr.height()); diff --git a/tdeprint/management/kmtimer.cpp b/tdeprint/management/kmtimer.cpp index a45a9caa0..a0b1aa78d 100644 --- a/tdeprint/management/kmtimer.cpp +++ b/tdeprint/management/kmtimer.cpp @@ -63,7 +63,7 @@ void KMTimer::release(bool do_emit) void KMTimer::releaseTimer(bool do_emit) { - m_count = QMAX(0, m_count-1); + m_count = TQMAX(0, m_count-1); if (m_count == 0) { if (do_emit) diff --git a/tdeprint/posterpreview.cpp b/tdeprint/posterpreview.cpp index 0839af3d7..cb66fe469 100644 --- a/tdeprint/posterpreview.cpp +++ b/tdeprint/posterpreview.cpp @@ -118,15 +118,15 @@ void PosterPreview::drawContents( TQPainter *painter ) TQSimpleRichText richtext( ( m_buffer.isEmpty() ? txt : m_buffer.prepend( "
" ).append( "
" ) ), p->font() ); richtext.adjustSize(); int x = ( width()-richtext.widthUsed() )/2, y = ( height()-richtext.height() )/2; - x = QMAX( x, 0 ); - y = QMAX( y, 0 ); + x = TQMAX( x, 0 ); + y = TQMAX( y, 0 ); richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() ); m_boundingrect = TQRect(); } else { int totalx = m_cols*m_pw, totaly = m_rows*m_ph; - float scale = QMIN( float( width()-1 )/totalx, float( height()-1 )/totaly ); + float scale = TQMIN( float( width()-1 )/totalx, float( height()-1 )/totaly ); p->translate( 0, height()-1 ); p->scale( scale, -scale ); int x = ( int )( width()/scale-totalx )/2, y = ( int )( height()/scale-totaly )/2; @@ -143,7 +143,7 @@ void PosterPreview::drawContents( TQPainter *painter ) p->fillRect( x+1, y+1, m_pw-2, m_ph-2, ( selected ? TDEGlobalSettings::highlightColor() : white ) ); p->drawRect( x, y, m_pw, m_ph ); if ( pw > 0 && ph > 0 ) - p->fillRect( x+m_mw+px, y+m_mh+py, QMIN( pw, m_pw-2*m_mw-px ), QMIN( ph, m_ph-2*m_mh-py ), + p->fillRect( x+m_mw+px, y+m_mh+py, TQMIN( pw, m_pw-2*m_mw-px ), TQMIN( ph, m_ph-2*m_mh-py ), ( selected ? TQColor(TDEGlobalSettings::highlightColor().dark( 160 )) : lightGray ) ); p->setPen( Qt::DotLine ); p->drawRect( x+m_mw, y+m_mh, m_pw-2*m_mw, m_ph-2*m_mh ); diff --git a/tdeprint/tests/drawdemo.cpp b/tdeprint/tests/drawdemo.cpp index 71d4a0680..76226e200 100644 --- a/tdeprint/tests/drawdemo.cpp +++ b/tdeprint/tests/drawdemo.cpp @@ -142,7 +142,7 @@ DrawView::DrawView() TQFontMetrics fm = bgroup->fontMetrics(); for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) { int w = fm.width( n ); - maxwidth = QMAX(w,maxwidth); + maxwidth = TQMAX(w,maxwidth); } maxwidth = maxwidth + 20; // add 20 pixels diff --git a/tdeprint/treecombobox.cpp b/tdeprint/treecombobox.cpp index a27b68289..5cee0cacc 100644 --- a/tdeprint/treecombobox.cpp +++ b/tdeprint/treecombobox.cpp @@ -82,7 +82,7 @@ int TreeListBoxItem::width(const TQListBox *lb) const w += (pixmap()->width() + 2); if (!m_path[m_depth].isEmpty()) w += (lb->fontMetrics().width(m_path[m_depth]) + 2); - return QMAX(w, TQListBoxPixmap::width(lb)); + return TQMAX(w, TQListBoxPixmap::width(lb)); } void TreeListBoxItem::paint(TQPainter *p) diff --git a/tdestyles/highcolor/highcolor.cpp b/tdestyles/highcolor/highcolor.cpp index 4fccff059..353fee30d 100644 --- a/tdestyles/highcolor/highcolor.cpp +++ b/tdestyles/highcolor/highcolor.cpp @@ -1347,7 +1347,7 @@ void HighColorStyle::drawControl( TQ_ControlElement element, r.rect( &x, &y, &w, &h ); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); // Are we a menu item separator? if ( mi->isSeparator() ) { @@ -1872,7 +1872,7 @@ int HighColorStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceD bool checkable = (elementFlags & CEF_IsCheckable); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); ret = checkcol; } @@ -1950,17 +1950,17 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents, } else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap()->height() + 2*itemFrame ); + h = TQMAX( h, mi->pixmap()->height() + 2*itemFrame ); else { // Ensure that the minimum height for text-only menu items // is the same as the icon size used by KDE. - h = QMAX( h, 16 + 2*itemFrame ); - h = QMAX( h, popup->fontMetrics().height() + h = TQMAX( h, 16 + 2*itemFrame ); + h = TQMAX( h, popup->fontMetrics().height() + 2*itemVMargin + 2*itemFrame ); } if ( mi->iconSet() ) - h = QMAX( h, mi->iconSet()->pixmap( + h = TQMAX( h, mi->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal).height() + 2 * itemFrame ); } diff --git a/tdestyles/highcontrast/highcontrast.cpp b/tdestyles/highcontrast/highcontrast.cpp index af021a91a..9156e670f 100644 --- a/tdestyles/highcontrast/highcontrast.cpp +++ b/tdestyles/highcontrast/highcontrast.cpp @@ -1039,7 +1039,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, r.rect( &x, &y, &w, &h ); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); // Are we a menu item separator? if ( mi->isSeparator() ) { @@ -1381,7 +1381,7 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, // paint stuff in the magical area TQListView* v = item->listView(); - int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(), + int lh = TQMAX( p->fontMetrics().height() + 2 * v->itemMargin(), TQApplication::globalStrut().height() ); if ( lh % 2 > 0 ) lh++; @@ -1395,7 +1395,7 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, if ( (child->isExpandable() || child->childCount()) && (child->height() > 0) ) { - int h = QMIN(lh, 24) - 4*basicLineWidth; + int h = TQMIN(lh, 24) - 4*basicLineWidth; if (h < 10) h = 10; else @@ -1776,17 +1776,17 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, } else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap()->height() + 2*itemFrame ); + h = TQMAX( h, mi->pixmap()->height() + 2*itemFrame ); else { // Ensure that the minimum height for text-only menu items // is the same as the icon size used by KDE. - h = QMAX( h, 16 + 2*itemFrame ); - h = QMAX( h, popup->fontMetrics().height() + h = TQMAX( h, 16 + 2*itemFrame ); + h = TQMAX( h, popup->fontMetrics().height() + 2*itemVMargin + 2*itemFrame ); } if ( mi->iconSet() && ! mi->iconSet()->isNull() ) - h = QMAX( h, mi->iconSet()->pixmap( + h = TQMAX( h, mi->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal).height() + 2 * itemFrame ); } @@ -1850,7 +1850,7 @@ int HighContrastStyle::styleHint(StyleHint sh, const TQStyleControlElementData & bool checkable = (elementFlags & CEF_IsCheckable); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); ret = checkcol; } diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp index fa1848203..759f3d7da 100644 --- a/tdestyles/keramik/keramik.cpp +++ b/tdestyles/keramik/keramik.cpp @@ -1660,7 +1660,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, bool etchtext = styleHint( SH_EtchDisabledText, ceData, elementFlags ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); // Draw the menu item background if ( active ) @@ -1862,9 +1862,9 @@ void KeramikStyle::drawControl( TQ_ControlElement element, // Draw progress bar if (progress > 0 || steps == 0) { double pg = (steps == 0) ? 0.1 : progress / steps; - int width = QMIN(cr.width(), (int)(pg * cr.width())); + int width = TQMIN(cr.width(), (int)(pg * cr.width())); if (steps == 0) - width = QMIN(width,20); //Don't cross squares + width = TQMIN(width,20); //Don't cross squares if (steps == 0) { //Busy indicator @@ -2484,7 +2484,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, //For some reason kcontrol no longer does this... //if ( (elementFlags & CEF_IsDefault) || (elementFlags & CEF_AutoDefault) ) - // w = QMAX( w, 40 ); + // w = TQMAX( w, 40 ); return TQSize( w + 30, h + 5 ); //MX: No longer blank space -- can make a bit smaller } @@ -2535,17 +2535,17 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, } else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap()->height() + 2*itemFrame ); + h = TQMAX( h, mi->pixmap()->height() + 2*itemFrame ); else { // Ensure that the minimum height for text-only menu items // is the same as the icon size used by KDE. - h = QMAX( h, 16 + 2*itemFrame ); - h = QMAX( h, popup->fontMetrics().height() + h = TQMAX( h, 16 + 2*itemFrame ); + h = TQMAX( h, popup->fontMetrics().height() + 2*itemVMargin + 2*itemFrame ); } if ( mi->iconSet() ) - h = QMAX( h, mi->iconSet()->pixmap( + h = TQMAX( h, mi->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal).height() + 2 * itemFrame ); } @@ -2643,7 +2643,7 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, def.addCoords( 4, -4, -6, 4 ); if ((def.width() - suggestedWidth < -12) && (def.width() < 80)) - def.setWidth(QMIN(80, suggestedWidth - 10)); + def.setWidth(TQMIN(80, suggestedWidth - 10)); return def; } @@ -2723,11 +2723,11 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, //Shrink the metrics if the widget is too small //to fit our normal values for them. if (horizontal) - handleSize = QMIN(handleSize, ceData.rect.height()); + handleSize = TQMIN(handleSize, ceData.rect.height()); else - handleSize = QMIN(handleSize, ceData.rect.width()); + handleSize = TQMIN(handleSize, ceData.rect.width()); - size = QMIN(size, handleSize); + size = TQMIN(size, handleSize); switch ( subcontrol ) { @@ -2984,7 +2984,7 @@ int KeramikStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceDat bool checkable = (elementFlags & CEF_IsCheckable); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); ret = checkcol; } diff --git a/tdestyles/klegacy/klegacystyle.cpp b/tdestyles/klegacy/klegacystyle.cpp index a169de874..162719955 100644 --- a/tdestyles/klegacy/klegacystyle.cpp +++ b/tdestyles/klegacy/klegacystyle.cpp @@ -2414,7 +2414,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i TQColorGroup itemg = (! enabled) ? pal.disabled() : pal.active(); if (checkable) - maxpmw = QMAX(maxpmw, 15); + maxpmw = TQMAX(maxpmw, 15); int checkcol = maxpmw; diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp index 27f9ca325..f09482ccc 100644 --- a/tdestyles/kthemestyle/kthemestyle.cpp +++ b/tdestyles/kthemestyle/kthemestyle.cpp @@ -277,13 +277,13 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents, else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap() ->height() + 2 * itemFrame ); + h = TQMAX( h, mi->pixmap() ->height() + 2 * itemFrame ); else - h = QMAX( h, popup->fontMetrics().height() + h = TQMAX( h, popup->fontMetrics().height() + 2 * itemVMargin + 2 * itemFrame ); if ( mi->iconSet() ) - h = QMAX( h, mi->iconSet() ->pixmap( + h = TQMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 * itemFrame ); } @@ -1512,7 +1512,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); // Are we a menu item separator? if ( separator ) @@ -1753,7 +1753,7 @@ void KThemeStyle::drawControl( ControlElement element, if (progress > 0 || steps == 0) { double pg = (steps == 0) ? 0.1 : progress / steps; - int width = QMIN(cr.width(), (int)(pg * cr.width())); + int width = TQMIN(cr.width(), (int)(pg * cr.width())); if (steps == 0) { //Busy indicator @@ -2274,7 +2274,7 @@ int KThemeStyle::styleHint( StyleHint sh, const TQStyleControlElementData &ceDat bool checkable = (elementFlags & CEF_IsCheckable); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); return checkcol; break; @@ -2432,7 +2432,7 @@ int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, TQMenuItem *mi, const TQFontMetrics &fm ) { int h2, h = 0; - int offset = QMAX( decoWidth( MenuItemDown ), decoWidth( MenuItem ) ) + 4; + int offset = TQMAX( decoWidth( MenuItemDown ), decoWidth( MenuItem ) ) + 4; if ( mi->isSeparator() ) return ( 2 ); diff --git a/tdestyles/light/lightstyle-v2.cpp b/tdestyles/light/lightstyle-v2.cpp index 0d343f778..35b7cc813 100644 --- a/tdestyles/light/lightstyle-v2.cpp +++ b/tdestyles/light/lightstyle-v2.cpp @@ -838,7 +838,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control, if ( !mi ) break; - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); TQRect cr, ir, tr, sr; // check column @@ -1579,11 +1579,11 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents, if (h < 16) h = 16; if (mi->pixmap()) - h = QMAX(h, mi->pixmap()->height()); + h = TQMAX(h, mi->pixmap()->height()); else if (! mi->text().isNull()) - h = QMAX(h, TQFontMetrics(ceData.font).height() + 2); + h = TQMAX(h, TQFontMetrics(ceData.font).height() + 2); if (mi->iconSet() != 0) - h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, + h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height()); h += 2; } @@ -1591,7 +1591,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents, // check | 4 pixels | item | 8 pixels | accel | 4 pixels | check // check is at least 16x16 - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); w += (maxpmw * 2) + 8; if (! mi->text().isNull() && mi->text().find('\t') >= 0) @@ -1654,7 +1654,7 @@ int LightStyleV2::styleHint( TQ_StyleHint stylehint, case SH_MenuIndicatorColumnWidth: { int maxpmw = option.maxIconWidth(); - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); ret = maxpmw; } diff --git a/tdestyles/light/lightstyle-v3.cpp b/tdestyles/light/lightstyle-v3.cpp index 735bd3169..92b0d04da 100644 --- a/tdestyles/light/lightstyle-v3.cpp +++ b/tdestyles/light/lightstyle-v3.cpp @@ -958,7 +958,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control, if ( !mi ) break; - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); TQRect cr, ir, tr, sr; // check column @@ -1807,11 +1807,11 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents, if (h < 16) h = 16; if (mi->pixmap()) - h = QMAX(h, mi->pixmap()->height()); + h = TQMAX(h, mi->pixmap()->height()); else if (! mi->text().isNull()) - h = QMAX(h, TQFontMetrics(ceData.font).height() + 2); + h = TQMAX(h, TQFontMetrics(ceData.font).height() + 2); if (mi->iconSet() != 0) - h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, + h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height()); h += 2; } @@ -1819,7 +1819,7 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents, // check | 4 pixels | item | 8 pixels | accel | 4 pixels | check // check is at least 16x16 - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); w += (maxpmw * 2) + 8; if (! mi->text().isNull() && mi->text().find('\t') >= 0) @@ -1887,7 +1887,7 @@ int LightStyleV3::styleHint( TQ_StyleHint stylehint, case SH_MenuIndicatorColumnWidth: { int maxpmw = option.maxIconWidth(); - maxpmw = QMAX(maxpmw, 16); + maxpmw = TQMAX(maxpmw, 16); ret = maxpmw; } diff --git a/tdestyles/plastik/plastik.cpp b/tdestyles/plastik/plastik.cpp index e7b6acd7f..8a4c92a38 100644 --- a/tdestyles/plastik/plastik.cpp +++ b/tdestyles/plastik/plastik.cpp @@ -1544,7 +1544,7 @@ void PlastikStyle::drawPrimitive(TQ_PrimitiveElement pe, case PE_SpinWidgetMinus: { p->setPen( cg.buttonText() ); - int l = QMIN( w-2, h-2 ); + int l = TQMIN( w-2, h-2 ); // make the length even so that we get a nice symmetric plus... if(l%2 != 0) --l; @@ -2527,7 +2527,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, bool etchtext = styleHint( SH_EtchDisabledText, ceData, elementFlags ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); // Draw the menu item background if (active) { @@ -3228,9 +3228,9 @@ TQRect PlastikStyle::querySubControlMetrics(TQ_ComplexControl control, TQSize bs; if(heightDividable) { - bs.setHeight(QMAX(8, (r.height()-2)/2)); + bs.setHeight(TQMAX(8, (r.height()-2)/2)); } else { - bs.setHeight(QMAX(8, (r.height()-2-1)/2)); + bs.setHeight(TQMAX(8, (r.height()-2-1)/2)); } bs.setWidth(15); @@ -3408,14 +3408,14 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t, h = 2; } else { if (mi->pixmap()) { - h = QMAX(h, mi->pixmap()->height() + 2); + h = TQMAX(h, mi->pixmap()->height() + 2); } else { - h = QMAX(h, 16 + 2 ); - h = QMAX(h, popup->fontMetrics().height() + 4 ); + h = TQMAX(h, 16 + 2 ); + h = TQMAX(h, popup->fontMetrics().height() + 4 ); } if (mi->iconSet()) { - h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height() + 2); + h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height() + 2); } } @@ -3483,7 +3483,7 @@ int PlastikStyle::styleHint( TQ_StyleHint stylehint, bool checkable = (elementFlags & CEF_IsCheckable); if ( checkable ) - checkcol = QMAX( checkcol, 20 ); + checkcol = TQMAX( checkcol, 20 ); return checkcol; } diff --git a/tdestyles/web/webstyle.cpp b/tdestyles/web/webstyle.cpp index b3b461954..073a46368 100644 --- a/tdestyles/web/webstyle.cpp +++ b/tdestyles/web/webstyle.cpp @@ -1673,16 +1673,16 @@ WebStyle::popupMenuItemHeight(bool, TQMenuItem * i, const TQFontMetrics & fm) if (0 != i->iconSet()) { - h = QMAX + h = TQMAX ( i->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height(), h ); } - h = QMAX(fm.height() + 4, h); + h = TQMAX(fm.height() + 4, h); - h = QMAX(18, h); + h = TQMAX(18, h); return h; diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index cfef5fd5b..d6d3d0f46 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -500,7 +500,7 @@ void KHistoryCombo::addToHistory( const TQString& item ) const int last = count() - 1; // last valid index const int mc = maxCount(); - const int stopAt = QMAX(mc, 0); + const int stopAt = TQMAX(mc, 0); for (int rmIndex = last; rmIndex >= stopAt; --rmIndex) { // remove the last item, as long as we are longer than maxCount() diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 99f1ce4af..53538b5fe 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -371,7 +371,7 @@ KDatePicker::selectMonthClicked() int day = calendar->day(date); // ----- construct a valid date in this month: calendar->setYMD(date, calendar->year(date), month, 1); - date = TQT_TQDATE_OBJECT(date.addDays(QMIN(day, calendar->daysInMonth(date)) - 1)); + date = TQT_TQDATE_OBJECT(date.addDays(TQMIN(day, calendar->daysInMonth(date)) - 1)); // ----- set this month setDate(date); } @@ -406,9 +406,9 @@ KDatePicker::selectYearClicked() day=calendar->day(date); // ----- construct a valid date in this month: //date.setYMD(year, date.month(), 1); - //date.setYMD(year, date.month(), QMIN(day, date.daysInMonth())); + //date.setYMD(year, date.month(), TQMIN(day, date.daysInMonth())); calendar->setYMD(date, year, calendar->month(date), - QMIN(day, calendar->daysInMonth(date))); + TQMIN(day, calendar->daysInMonth(date))); // ----- set this month setDate(date); } else { @@ -503,8 +503,8 @@ KDatePicker::setFontSize(int s) TDEGlobal::locale()->calendar()->year(table->getDate()), false); if (str.isNull()) break; r=metrics.boundingRect(str); - maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width())); - maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height())); + maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width())); + maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height())); } TQSize metricBound = style().tqsizeFromContents(TQStyle::CT_ToolButton, diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index 56edf9a5c..e2facec33 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -435,13 +435,13 @@ KDateTable::setFontSize(int size) { rect=metrics.boundingRect(TDEGlobal::locale()->calendar() ->weekDayName(count+1, true)); - maxCell.setWidth(QMAX(maxCell.width(), rect.width())); - maxCell.setHeight(QMAX(maxCell.height(), rect.height())); + maxCell.setWidth(TQMAX(maxCell.width(), rect.width())); + maxCell.setHeight(TQMAX(maxCell.height(), rect.height())); } // ----- compare with a real wide number and add some space: rect=metrics.boundingRect(TQString::fromLatin1("88")); - maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); - maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); + maxCell.setWidth(TQMAX(maxCell.width()+2, rect.width())); + maxCell.setHeight(TQMAX(maxCell.height()+4, rect.height())); } void diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index e9185a9c1..2fc9dda0a 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -157,15 +157,15 @@ void KDateWidget::slotDateChanged( ) int y,m,day; y = d->m_year->value(); - y = QMIN(QMAX(y, calendar->minValidYear()), calendar->maxValidYear()); + y = TQMIN(TQMAX(y, calendar->minValidYear()), calendar->maxValidYear()); calendar->setYMD(date, y, 1, 1); m = d->m_month->currentItem()+1; - m = QMIN(QMAX(m,1), calendar->monthsInYear(date)); + m = TQMIN(TQMAX(m,1), calendar->monthsInYear(date)); calendar->setYMD(date, y, m, 1); day = d->m_day->value(); - day = QMIN(QMAX(day,1), calendar->daysInMonth(date)); + day = TQMIN(TQMAX(day,1), calendar->daysInMonth(date)); calendar->setYMD(date, y, m, day); setDate(date); diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 6d66d8efd..d4eb568a3 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -223,11 +223,11 @@ bool KDialog::avoidArea( TQWidget *w, const TQRect& area, int screen ) avoid.rRight() += 10; avoid.rBottom() += 10; - if ( QMAX( fg.top(), avoid.top() ) <= QMIN( fg.bottom(), avoid.bottom() ) ) + if ( TQMAX( fg.top(), avoid.top() ) <= TQMIN( fg.bottom(), avoid.bottom() ) ) { // We need to move the widget up or down - int spaceAbove = QMAX(0, avoid.top() - scr.top()); - int spaceBelow = QMAX(0, scr.bottom() - avoid.bottom()); + int spaceAbove = TQMAX(0, avoid.top() - scr.top()); + int spaceBelow = TQMAX(0, scr.bottom() - avoid.bottom()); if ( spaceAbove > spaceBelow ) // where's the biggest side? if ( fg.height() <= spaceAbove ) // big enough? fg.setY( avoid.top() - fg.height() ); @@ -240,11 +240,11 @@ bool KDialog::avoidArea( TQWidget *w, const TQRect& area, int screen ) return false; } - if ( QMAX( fg.left(), avoid.left() ) <= QMIN( fg.right(), avoid.right() ) ) + if ( TQMAX( fg.left(), avoid.left() ) <= TQMIN( fg.right(), avoid.right() ) ) { // We need to move the widget left or right - int spaceLeft = QMAX(0, avoid.left() - scr.left()); - int spaceRight = QMAX(0, scr.right() - avoid.right()); + int spaceLeft = TQMAX(0, avoid.left() - scr.left()); + int spaceRight = TQMAX(0, scr.right() - avoid.right()); if ( spaceLeft > spaceRight ) // where's the biggest side? if ( fg.width() <= spaceLeft ) // big enough? fg.setX( avoid.left() - fg.width() ); diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 890f79179..e426df1a4 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -456,7 +456,7 @@ TQSize KDialogBase::minimumSizeHint() const { s2 = mUrlHelp->minimumSize() + zeroByS; } - s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); + s1.rwidth() = TQMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); // @@ -480,7 +480,7 @@ TQSize KDialogBase::minimumSizeHint() const { s2 = TQSize( 100, 100+s ); } - s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); + s1.rwidth() = TQMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); if (d->detailsWidget && d->bDetails) @@ -488,7 +488,7 @@ TQSize KDialogBase::minimumSizeHint() const s2 = d->detailsWidget->sizeHint() + zeroByS; s2 = s2.expandedTo( d->detailsWidget->minimumSize() ); s2 = s2.expandedTo( d->detailsWidget->minimumSizeHint() ); - s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); + s1.rwidth() = TQMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); } @@ -508,13 +508,13 @@ TQSize KDialogBase::minimumSizeHint() const s2 = d->mButton.box->minimumSize(); if( mButtonOrientation == Qt::Horizontal ) { - s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); + s1.rwidth() = TQMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); } else { s1.rwidth() += s2.rwidth(); - s1.rheight() = QMAX( s1.rheight(), s2.rheight() ); + s1.rheight() = TQMAX( s1.rheight(), s2.rheight() ); } } diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 6f22b091a..bd7bb76b5 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -308,7 +308,7 @@ void KEditListBox::removeItem() m_listBox->removeItem( selected ); if ( count() > 0 ) - m_listBox->setSelected( QMIN( selected, count() - 1 ), true ); + m_listBox->setSelected( TQMIN( selected, count() - 1 ), true ); emit changed(); emit removed( removedText ); diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index 31de273c7..1699a6919 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -191,8 +191,8 @@ void TDEIconView::slotAutoSelect() TQRect r; TQRect redraw; if ( previousItem ) - r = TQRect( QMIN( previousItem->x(), m_pCurrentItem->x() ), - QMIN( previousItem->y(), m_pCurrentItem->y() ), + r = TQRect( TQMIN( previousItem->x(), m_pCurrentItem->x() ), + TQMIN( previousItem->y(), m_pCurrentItem->y() ), 0, 0 ); else r = TQRect( 0, 0, 0, 0 ); @@ -555,10 +555,10 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) // Should not be higher than pixmap if text is alongside icons if ( view->itemTextPos() != TQIconView::Bottom ) { if ( d && !d->m_pixmapSize.isNull() ) - height = QMIN( d->m_pixmapSize.height() + 2, height ); + height = TQMIN( d->m_pixmapSize.height() + 2, height ); else - height = QMIN( itemIconRect.height(), height ); - height = QMAX( height, fm->height() ); + height = TQMIN( itemIconRect.height(), height ); + height = TQMAX( height, fm->height() ); } // Calculate the word-wrap @@ -566,7 +566,7 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) m_wordWrap = KWordWrap::formatText( *fm, outerRect, 0, t ); r = m_wordWrap->boundingRect(); - int realWidth = QMAX( QMIN( r.width() + 4, tw ), fm->width( "X" ) ); + int realWidth = TQMAX( TQMIN( r.width() + 4, tw ), fm->width( "X" ) ); if (drawRoundedRect == true) { itemTextRect.setWidth( realWidth + 2); } @@ -580,7 +580,7 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) // If the pixmap size has been specified, use it if ( d && !d->m_pixmapSize.isNull() ) { - w = QMAX( itemTextRect.width(), d->m_pixmapSize.width() + 2 ); + w = TQMAX( itemTextRect.width(), d->m_pixmapSize.width() + 2 ); h = itemTextRect.height() + d->m_pixmapSize.height() + 2 + 1; #if 0 // FIXME // Waiting for the qt bug to be solved, the pixmapRect must @@ -589,14 +589,14 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) #endif } else { - w = QMAX( itemTextRect.width(), itemIconRect.width() ); + w = TQMAX( itemTextRect.width(), itemIconRect.width() ); h = itemTextRect.height() + itemIconRect.height() + 1; } itemRect.setWidth( w ); itemRect.setHeight( h ); - int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() - int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() + int width = TQMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() + int height = TQMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() itemTextRect = TQRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(), itemTextRect.width(), itemTextRect.height() ); itemIconRect = TQRect( ( width - itemIconRect.width() ) / 2, y, @@ -605,7 +605,7 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) else { // If the pixmap size has been specified, use it if ( d && !d->m_pixmapSize.isNull() ) { - h = QMAX( itemTextRect.height(), d->m_pixmapSize.height() + 2 ); + h = TQMAX( itemTextRect.height(), d->m_pixmapSize.height() + 2 ); #if 0 // FIXME // Waiting for the qt bug to be solved, the pixmapRect must // stay on the top... @@ -613,14 +613,14 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) #endif } else { - h = QMAX( itemTextRect.height(), itemIconRect.height() ); + h = TQMAX( itemTextRect.height(), itemIconRect.height() ); } w = itemTextRect.width() + itemIconRect.width() + 1; itemRect.setWidth( w ); itemRect.setHeight( h ); - int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() - int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() + int width = TQMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() + int height = TQMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() itemTextRect = TQRect( width - itemTextRect.width(), ( height - itemTextRect.height() ) / 2, itemTextRect.width(), itemTextRect.height() ); @@ -629,7 +629,7 @@ void TDEIconViewItem::calcRect( const TQString& text_ ) itemIconRect.width(), itemIconRect.height() ); } else { // icon smaller than text -> place in top or center with first line - itemIconRect = TQRect( 0, QMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0), + itemIconRect = TQRect( 0, TQMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0), itemIconRect.width(), itemIconRect.height() ); } if ( ( itemIconRect.height() <= 20 ) && ( itemTextRect.height() < itemIconRect.height() ) ) { diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index c3a8838e9..513ae2d8a 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -789,9 +789,9 @@ TQSize KJanusWidget::minimumSizeHint() const // Select the tallest item. It has only effect in IconList mode // int h1 = s1.rheight() + s3.rheight() + s4.height(); - int h2 = QMAX( h1, s2.rheight() ); + int h2 = TQMAX( h1, s2.rheight() ); - return TQSize( s1.width()+s2.width()+QMAX(s3.width(),s4.width()), h2 ); + return TQSize( s1.width()+s2.width()+TQMAX(s3.width(),s4.width()), h2 ); } else if( mFace == Tabbed ) { @@ -968,7 +968,7 @@ void KJanusWidget::IconListBox::updateWidth() for( TQListBoxItem *i = item(0); i; i = i->next() ) { int w = ((IconListItem *)i)->width(this); - maxWidth = QMAX( w, maxWidth ); + maxWidth = TQMAX( w, maxWidth ); } for( TQListBoxItem *i = item(0); i; i = i->next() ) @@ -1063,7 +1063,7 @@ KJanusWidget::IconListItem::IconListItem( TQListBox *listbox, const TQPixmap &pi int KJanusWidget::IconListItem::expandMinimumWidth( int width ) { - mMinimumWidth = QMAX( mMinimumWidth, width ); + mMinimumWidth = TQMAX( mMinimumWidth, width ); return mMinimumWidth; } @@ -1178,8 +1178,8 @@ int KJanusWidget::IconListItem::width( const TQListBox *lb ) const { int wt = lb->fontMetrics().boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).width() + 10; int wp = mPixmap.width() + 10; - int w = QMAX( wt, wp ); - return QMAX( w, mMinimumWidth ); + int w = TQMAX( wt, wp ); + return TQMAX( w, mMinimumWidth ); } diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index 40f87da29..f39d07443 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -152,16 +152,16 @@ void KNumInput::layout(bool deep) KNumInput* p = this; while(p) { p->doLayout(); - w1 = QMAX(w1, p->m_colw1); - w2 = QMAX(w2, p->m_colw2); + w1 = TQMAX(w1, p->m_colw1); + w2 = TQMAX(w2, p->m_colw2); p = p->m_prev; } p = m_next; while(p) { p->doLayout(); - w1 = QMAX(w1, p->m_colw1); - w2 = QMAX(w2, p->m_colw2); + w1 = TQMAX(w1, p->m_colw1); + w2 = TQMAX(w2, p->m_colw2); p = p->m_next; } @@ -425,20 +425,20 @@ TQSize KIntNumInput::minimumSizeHint() const int w; int h; - h = 2 + QMAX(m_sizeSpin.height(), m_sizeSlider.height()); + h = 2 + TQMAX(m_sizeSpin.height(), m_sizeSlider.height()); // if in extra row, then count it here if(m_label && (m_alignment & (AlignBottom|AlignTop))) h += 4 + m_sizeLabel.height(); else // label is in the same row as the other widgets - h = QMAX(h, m_sizeLabel.height() + 2); + h = TQMAX(h, m_sizeLabel.height() + 2); w = m_slider ? m_slider->sizeHint().width() + 8 : 0; w += m_colw1 + m_colw2; if(m_alignment & (AlignTop|AlignBottom)) - w = QMAX(w, m_sizeLabel.width() + 4); + w = TQMAX(w, m_sizeLabel.width() + 4); return TQSize(w, h); } @@ -467,7 +467,7 @@ void KIntNumInput::resizeEvent(TQResizeEvent* e) if (tqApp->reverseLayout()) { - m_spin->setGeometry(w, h, m_slider ? m_colw2 : QMAX(m_colw2, e->size().width() - w), m_sizeSpin.height()); + m_spin->setGeometry(w, h, m_slider ? m_colw2 : TQMAX(m_colw2, e->size().width() - w), m_sizeSpin.height()); w += m_colw2 + 8; if(m_slider) @@ -478,7 +478,7 @@ void KIntNumInput::resizeEvent(TQResizeEvent* e) m_spin->setGeometry(w + m_slider->size().width() + KDialog::spacingHint(), h, m_colw2, m_sizeSpin.height()); } else { - m_spin->setGeometry(w, h, QMAX(m_colw2, e->size().width() - w), m_sizeSpin.height()); + m_spin->setGeometry(w, h, TQMAX(m_colw2, e->size().width() - w), m_sizeSpin.height()); } h += m_sizeSpin.height() + 2; @@ -666,20 +666,20 @@ TQSize KDoubleNumInput::minimumSizeHint() const int w; int h; - h = 2 + QMAX(m_sizeEdit.height(), m_sizeSlider.height()); + h = 2 + TQMAX(m_sizeEdit.height(), m_sizeSlider.height()); // if in extra row, then count it here if(m_label && (m_alignment & (AlignBottom|AlignTop))) h += 4 + m_sizeLabel.height(); else // label is in the same row as the other widgets - h = QMAX(h, m_sizeLabel.height() + 2); + h = TQMAX(h, m_sizeLabel.height() + 2); w = m_slider ? m_slider->sizeHint().width() + 8 : 0; w += m_colw1 + m_colw2; if(m_alignment & (AlignTop|AlignBottom)) - w = QMAX(w, m_sizeLabel.width() + 4); + w = TQMAX(w, m_sizeLabel.width() + 4); return TQSize(w, h); } diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 40cbb8ee4..cf37c4403 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -177,7 +177,7 @@ void KScrollView::wheelEvent( TQWheelEvent *e ) { int pageStep = verticalScrollBar()->pageStep(); int lineStep = verticalScrollBar()->lineStep(); - int step = QMIN( TQApplication::wheelScrollLines()*lineStep, pageStep ); + int step = TQMIN( TQApplication::wheelScrollLines()*lineStep, pageStep ); if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) step = pageStep; diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp index d9b6a6954..65e8dc508 100644 --- a/tdeui/ksharedpixmap.cpp +++ b/tdeui/ksharedpixmap.cpp @@ -199,9 +199,9 @@ bool TDESharedPixmap::x11Event(XEvent *event) } unsigned w = d->rect.width(), h = d->rect.height(); - unsigned tw = QMIN(width, w), th = QMIN(height, h); + unsigned tw = TQMIN(width, w), th = TQMIN(height, h); unsigned xa = d->rect.x() % width, ya = d->rect.y() % height; - unsigned t1w = QMIN(width-xa,tw), t1h = QMIN(height-ya,th); + unsigned t1w = TQMIN(width-xa,tw), t1h = TQMIN(height-ya,th); TQPixmap::resize( tw+origin.x(), th+origin.y() ); diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 94606ca06..9e63fc929 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -293,7 +293,7 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, TDEConfig *config = TDEGlobal::config(); TDEConfigGroupSaver cs( config, "KSpell" ); d->disablePercentage = config->readNumEntry( "KSpell_AsYouTypeDisablePercentage", 42 ); - d->disablePercentage = QMIN( d->disablePercentage, 101 ); + d->disablePercentage = TQMIN( d->disablePercentage, 101 ); d->disableWordCount = config->readNumEntry( "KSpell_AsYouTypeDisableWordCount", 100 ); textEdit->installEventFilter( this ); diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index 4e043ed09..f1f507609 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -188,7 +188,7 @@ unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength ) if ( tab->iconSet() ) iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; x += ( tabBar()->style().tqsizeFromContents( TQStyle::CT_TabBarTab, this, - TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), + TQSize( TQMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), TQStyleOption( tab ) ) ).width(); } return x; @@ -265,9 +265,9 @@ void KTabWidget::resizeTabs( int changeTabIndex ) int tabBarHeight = tabBar()->sizeHint().height(); if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() ) - lcw = QMAX( cornerWidget( TopLeft )->width(), tabBarHeight ); + lcw = TQMAX( cornerWidget( TopLeft )->width(), tabBarHeight ); if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() ) - rcw = QMAX( cornerWidget( TopRight )->width(), tabBarHeight ); + rcw = TQMAX( cornerWidget( TopRight )->width(), tabBarHeight ); uint maxTabBarWidth = width() - lcw - rcw; diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index 749b4f5b5..539984466 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -410,14 +410,14 @@ TQRect KURLLabel::activeRect() const int hAlign = TQApplication::horizontalAlignment( alignment() ); int indentX = (hAlign && indent()>0) ? indent() : 0; TQFontMetrics fm(font()); - r.setWidth( QMIN(fm.width(text()), r.width())); + r.setWidth( TQMIN(fm.width(text()), r.width())); if ( hAlign & AlignLeft ) r.moveLeft(r.left() + indentX); if ( hAlign & AlignCenter ) r.moveLeft((contentsRect().width()-r.width())/2+margin()); if ( hAlign & AlignRight ) r.moveLeft(contentsRect().width()-r.width()-indentX+margin()); - int add = QMIN(3, margin()); + int add = TQMIN(3, margin()); r = TQRect(r.left()-add, r.top()-add, r.width()+2*add, r.height()+2*add); return r; } diff --git a/tdeui/kwordwrap.cpp b/tdeui/kwordwrap.cpp index d104b421a..de031c966 100644 --- a/tdeui/kwordwrap.cpp +++ b/tdeui/kwordwrap.cpp @@ -103,7 +103,7 @@ KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*fla kw->m_breakPositions.append( breakAt ); int thisLineWidth = lastBreak == -1 ? x + ww : lineWidth; kw->m_lineWidths.append( thisLineWidth ); - textwidth = QMAX( textwidth, thisLineWidth ); + textwidth = TQMAX( textwidth, thisLineWidth ); x = 0; y += height; wasBreakable = true; @@ -124,7 +124,7 @@ KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*fla wasBreakable = isBreakable; wasParens = isParens; } - textwidth = QMAX( textwidth, x ); + textwidth = TQMAX( textwidth, x ); kw->m_lineWidths.append( x ); y += height; //kdDebug() << "KWordWrap::formatText boundingRect:" << r.x() << "," << r.y() << " " << textwidth << "x" << y << endl; @@ -135,7 +135,7 @@ KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*fla { while ( realY > r.height() ) realY -= height; - realY = QMAX( realY, 0 ); + realY = TQMAX( realY, 0 ); } kw->m_boundingRect.setRect( 0, 0, textwidth, realY ); return kw; diff --git a/tdeui/tdeaboutdialog.cpp b/tdeui/tdeaboutdialog.cpp index 895247161..d0ab3dc3d 100644 --- a/tdeui/tdeaboutdialog.cpp +++ b/tdeui/tdeaboutdialog.cpp @@ -1105,7 +1105,7 @@ TDEAboutContributor::sizeHint() TQRect rect; // ----- first calculate name and email width: maxx=name->sizeHint().width(); - maxx=QMAX(maxx, email->sizeHint().width()+WORKTEXT_IDENTATION); + maxx=TQMAX(maxx, email->sizeHint().width()+WORKTEXT_IDENTATION); // ----- now determine "work" text rectangle: if(!work.isEmpty()) // save time { @@ -1116,7 +1116,7 @@ TDEAboutContributor::sizeHint() { maxx=WorkTextWidth+WORKTEXT_IDENTATION; } - maxx=QMAX(maxx, url->sizeHint().width()+WORKTEXT_IDENTATION); + maxx=TQMAX(maxx, url->sizeHint().width()+WORKTEXT_IDENTATION); // ----- maxy=2*(name->sizeHint().height()+Grid); // need a space above the KURLLabels maxy+=/* email */ name->sizeHint().height(); @@ -1193,8 +1193,8 @@ TQSize TDEAboutContributor::sizeHint( void ) int m = frameWidth(); int w = name->sizeHint().width(); - w = QMAX( w, email->sizeHint().width()+s); - w = QMAX( w, url->sizeHint().width()+s); + w = TQMAX( w, email->sizeHint().width()+s); + w = TQMAX( w, url->sizeHint().width()+s); if( work.isEmpty() == false ) { @@ -1203,9 +1203,9 @@ TQSize TDEAboutContributor::sizeHint( void ) (0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work); if( w < r.width() ) { - w = QMAX( w, WorkTextWidth+s ); + w = TQMAX( w, WorkTextWidth+s ); } - h += QMAX( fontMetrics().lineSpacing(), r.height() ) + s; + h += TQMAX( fontMetrics().lineSpacing(), r.height() ) + s; } return( TQSize( w + 2*m, h + 2*m ) ); @@ -1216,8 +1216,8 @@ TQSize TDEAboutContributor::sizeHint( void ) int h = ls * 3 + s * 2; int w = name->sizeHint().width(); - w = QMAX( w, email->sizeHint().width()+WORKTEXT_IDENTATION); - w = QMAX( w, url->sizeHint().width()+WORKTEXT_IDENTATION); + w = TQMAX( w, email->sizeHint().width()+WORKTEXT_IDENTATION); + w = TQMAX( w, url->sizeHint().width()+WORKTEXT_IDENTATION); if( work.isEmpty() == false ) { const int WorkTextWidth=200; @@ -1226,7 +1226,7 @@ TQSize TDEAboutContributor::sizeHint( void ) (0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work); if( w < r.width() ) { - w = QMAX( w, WorkTextWidth + WORKTEXT_IDENTATION ); + w = TQMAX( w, WorkTextWidth + WORKTEXT_IDENTATION ); } h += r.height() + s; } @@ -1361,15 +1361,15 @@ TDEAboutWidget::adjust() logo->adjustSize(); cy=version->sizeHint().height()+Grid; cx=logo->width(); - tempx=QMAX(total_size.width(), maintWidth); + tempx=TQMAX(total_size.width(), maintWidth); cx+=Grid+tempx; - cx=QMAX(cx, version->sizeHint().width()); - cy+=QMAX(logo->height(), + cx=TQMAX(cx, version->sizeHint().width()); + cy+=TQMAX(logo->height(), total_size.height()+(showMaintainer ? Grid+maintHeight : 0)); // ----- if(!contributors.isEmpty()) { - cx=QMAX(cx, cont->sizeHint().width()); + cx=TQMAX(cx, cont->sizeHint().width()); cy+=cont->sizeHint().height()+Grid; TQPtrListIterator _pos(contributors); TDEAboutContributor* currEntry; @@ -1472,7 +1472,7 @@ TDEAboutWidget::resizeEvent(TQResizeEvent*) maintainer->setGeometry (tempx, _y+author->height()+Grid, cx, maintainer->sizeHint().height()); - _y+=QMAX(logo->height(), + _y+=TQMAX(logo->height(), author->height()+(showMaintainer ? Grid+maintainer->height() : 0)); // ----- if(!contributors.isEmpty()) diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index 96c9c1794..a8a2bd237 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -333,10 +333,10 @@ TQRect TDECompletionBox::calculateGeometry() const { int x = 0, y = 0; int ih = itemHeight(); - int h = QMIN( 15 * ih, (int) count() * ih ) + 2*frameWidth(); + int h = TQMIN( 15 * ih, (int) count() * ih ) + 2*frameWidth(); int w = (d->m_parent) ? d->m_parent->width() : TDEListBox::minimumSizeHint().width(); - w = QMAX( TDEListBox::minimumSizeHint().width(), w ); + w = TQMAX( TDEListBox::minimumSizeHint().width(), w ); //If we're inside a combox, Qt by default makes the dropdown // as wide as the combo, and gives the style a chance @@ -348,7 +348,7 @@ TQRect TDECompletionBox::calculateGeometry() const const TQComboBox* cb = static_cast(TQT_TQWIDGET_CONST(combo)); //Expand to the combo width - w = QMAX( w, cb->width() ); + w = TQMAX( w, cb->width() ); TQPoint parentCorner = d->m_parent->mapToGlobal(TQPoint(0, 0)); TQPoint comboCorner = cb->mapToGlobal(TQPoint(0, 0)); diff --git a/tdeui/tdefontdialog.cpp b/tdeui/tdefontdialog.cpp index 75f4599e0..fcd50b16e 100644 --- a/tdeui/tdefontdialog.cpp +++ b/tdeui/tdefontdialog.cpp @@ -62,7 +62,7 @@ static int minimumListWidth( const TQListBox *list ) for( uint i=0; icount(); i++ ) { int itemWidth = list->item(i)->width(list); - w = QMAX(w,itemWidth); + w = TQMAX(w,itemWidth); } if( w == 0 ) { w = 40; } w += list->frameWidth() * 2; diff --git a/tdeui/tdemainwindow.cpp b/tdeui/tdemainwindow.cpp index a5dde30e3..51d873bd0 100644 --- a/tdeui/tdemainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -292,10 +292,10 @@ void TDEMainWindow::parseGeometry(bool parsewidth) w = width(); if ( !(m & HeightValue) ) h = height(); - w = QMIN(w,maxSize.width()); - h = QMIN(h,maxSize.height()); - w = QMAX(w,minSize.width()); - h = QMAX(h,minSize.height()); + w = TQMIN(w,maxSize.width()); + h = TQMIN(h,maxSize.height()); + w = TQMAX(w,minSize.width()); + h = TQMAX(h,minSize.height()); resize(w, h); } else { if ( parsewidth && !(m & XValue) ) diff --git a/tdeui/tdepopupmenu.cpp b/tdeui/tdepopupmenu.cpp index 46d5c758f..3fd8a90e2 100644 --- a/tdeui/tdepopupmenu.cpp +++ b/tdeui/tdepopupmenu.cpp @@ -82,7 +82,7 @@ void TDEPopupTitle::calcSize() TQFont f = font(); f.setBold(true); int w = miniicon.width()+TQFontMetrics(f).width(titleStr); - int h = QMAX( fontMetrics().height(), miniicon.height() ); + int h = TQMAX( fontMetrics().height(), miniicon.height() ); setMinimumSize( w+16, h+8 ); } diff --git a/tdeui/tdespell.cpp b/tdeui/tdespell.cpp index d764fa89d..e5d21d45b 100644 --- a/tdeui/tdespell.cpp +++ b/tdeui/tdespell.cpp @@ -1219,7 +1219,7 @@ void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_sl // the RichText display and highlight the possibly wrong word TQString marker( "_MARKER_" ); tmpBuf.replace( lastpos, word.length(), marker ); - TQString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length()); + TQString context = tmpBuf.mid(TQMAX(lastpos-18,0), 2*18+marker.length()); context.replace( '\n',TQString::fromLatin1(" ")); context.replace( '<', TQString::fromLatin1("<") ); context.replace( '>', TQString::fromLatin1(">") ); diff --git a/tdeutils/tdemultitabbar.cpp b/tdeutils/tdemultitabbar.cpp index da2f3b23e..aa4554141 100644 --- a/tdeutils/tdemultitabbar.cpp +++ b/tdeutils/tdemultitabbar.cpp @@ -468,7 +468,7 @@ TQSize KMultiTabBarButton::sizeHint() const int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height(); w += iw; - h = QMAX( h, ih ); + h = TQMAX( h, ih ); } #endif if ( isMenuButton() ) @@ -488,7 +488,7 @@ TQSize KMultiTabBarButton::sizeHint() const if(!empty || !w) w += sz.width(); if(!empty || !h) - h = QMAX(h, sz.height()); + h = TQMAX(h, sz.height()); } return (style().tqsizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). diff --git a/tdewallet/backend/tdewalletbackend.cc b/tdewallet/backend/tdewalletbackend.cc index 5fe313ed9..83e37a49a 100644 --- a/tdewallet/backend/tdewalletbackend.cc +++ b/tdewallet/backend/tdewalletbackend.cc @@ -161,7 +161,7 @@ static int password2hash(const TQByteArray& password, TQByteArray& hash) { TQByteArray block1(shasz); - sha.process(password.data(), QMIN(password.size(), 16)); + sha.process(password.data(), TQMIN(password.size(), 16)); // To make brute force take longer for (int i = 0; i < 2000; i++) { @@ -173,7 +173,7 @@ static int password2hash(const TQByteArray& password, TQByteArray& hash) { sha.reset(); if (password.size() > 16) { - sha.process(password.data() + 16, QMIN(password.size() - 16, 16)); + sha.process(password.data() + 16, TQMIN(password.size() - 16, 16)); TQByteArray block2(shasz); // To make brute force take longer for (int i = 0; i < 2000; i++) { @@ -185,7 +185,7 @@ static int password2hash(const TQByteArray& password, TQByteArray& hash) { sha.reset(); if (password.size() > 32) { - sha.process(password.data() + 32, QMIN(password.size() - 32, 16)); + sha.process(password.data() + 32, TQMIN(password.size() - 32, 16)); TQByteArray block3(shasz); // To make brute force take longer diff --git a/win/qeventloopex.cpp b/win/qeventloopex.cpp index 57c53a229..ac027b4ba 100644 --- a/win/qeventloopex.cpp +++ b/win/qeventloopex.cpp @@ -211,7 +211,7 @@ void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier ) FD_SET( sockfd, fds ); - d->sn_highest = QMAX( d->sn_highest, sockfd ); + d->sn_highest = TQMAX( d->sn_highest, sockfd ); LeaveCriticalSection(&d->m_csVec); #ifdef _DEBUG_EVENTLOOPEX @@ -267,7 +267,7 @@ void QEventLoopEx::unregisterSocketNotifier( TQSocketNotifier *notifier ) d->sn_highest = -1; for ( int i=0; i<3; i++ ) { if ( d->sn_vec[i].list && ! d->sn_vec[i].list->isEmpty() ) - d->sn_highest = QMAX( d->sn_highest, // list is fd-sorted + d->sn_highest = TQMAX( d->sn_highest, // list is fd-sorted d->sn_vec[i].list->getFirst()->fd ); } } @@ -412,7 +412,7 @@ void QEventLoopEx::run() } FD_SET(d->m_sockUpdate,&d->sn_vec[0].select_fds); - d->sn_highest = QMAX(d->sn_highest,(int)d->m_sockUpdate); + d->sn_highest = TQMAX(d->sn_highest,(int)d->m_sockUpdate); // FD_SET(m_sockUpdate,&sn_vec[1].select_fds); // FD_SET(m_sockUpdate,&sn_vec[2].select_fds);