diff --git a/client.cpp b/client.cpp
index 5d051e90ae..d2e4eec3a1 100644
--- a/client.cpp
+++ b/client.cpp
@@ -775,7 +775,7 @@ void Client::setShade( ShadeMode mode )
// FRAME repaint( FALSE );
// bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents );
- int step = QMAX( 4, QABS( h - s.height() ) / as )+1;
+ int step = qMax( 4, QABS( h - s.height() ) / as )+1;
do
{
h -= step;
@@ -805,7 +805,7 @@ void Client::setShade( ShadeMode mode )
QSize s( sizeForClientSize( clientSize()));
// FRAME bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents );
- int step = QMAX( 4, QABS( h - s.height() ) / as )+1;
+ int step = qMax( 4, QABS( h - s.height() ) / as )+1;
do
{
h += step;
diff --git a/clients/keramik/keramik.cpp b/clients/keramik/keramik.cpp
index 2c9cb19b5e..ada87e173c 100644
--- a/clients/keramik/keramik.cpp
+++ b/clients/keramik/keramik.cpp
@@ -1255,7 +1255,7 @@ void KeramikClient::updateCaptionBuffer()
int tw = p.fontMetrics().width( caption() ) +
( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 );
- int xpos = QMAX( (captionRect.width() - tw) / 3, 8 );
+ int xpos = qMax( (captionRect.width() - tw) / 3, 8 );
QRect tr = QStyle::visualRect( QApplication::isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight, QRect(xpos, 1, captionRect.width() - xpos - 10,
captionRect.height() - 4), captionBuffer.rect() );
@@ -1324,7 +1324,7 @@ void KeramikClient::calculateCaptionRect()
if ( clientHandler->showAppIcons() )
cw += 16 + 4; // icon width + space
- cw = QMIN( cw, titlebar->geometry().width() );
+ cw = qMin( cw, titlebar->geometry().width() );
captionRect = QStyle::visualRect( QApplication::isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight, QRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY),
cw, clientHandler->titleBarHeight(largeCaption) ),
titlebar->geometry() );
@@ -1527,8 +1527,8 @@ void KeramikClient::paintEvent( QPaintEvent *e )
// Space between the top left corner and the caption bubble
if ( updateRect.x() < captionRect.left() && updateRect.right() >= 15 ) {
- int x1 = QMAX( 15, updateRect.x() );
- int x2 = QMIN( captionRect.left(), updateRect.right() );
+ int x1 = qMax( 15, updateRect.x() );
+ int x2 = qMin( captionRect.left(), updateRect.right() );
p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight,
*clientHandler->tile( TitleCenter, active ) );
@@ -1545,8 +1545,8 @@ void KeramikClient::paintEvent( QPaintEvent *e )
// Space between the caption bubble and the top right corner
if ( updateRect.right() > captionRect.right() && updateRect.x() < width() - 15 ) { // FRAME
- int x1 = QMAX( captionRect.right() + 1, updateRect.x() );
- int x2 = QMIN( width() - 15, updateRect.right() );
+ int x1 = qMax( captionRect.right() + 1, updateRect.x() );
+ int x2 = qMin( width() - 15, updateRect.right() );
p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight,
*clientHandler->tile( TitleCenter, active ) );
@@ -1563,8 +1563,8 @@ void KeramikClient::paintEvent( QPaintEvent *e )
if ( updateRect.bottom() >= titleBarHeight &&
updateRect.top() < height() - grabBarHeight )
{
- int top = QMAX( titleBarHeight, updateRect.top() );
- int bottom = QMIN( updateRect.bottom(), height() - grabBarHeight );
+ int top = qMax( titleBarHeight, updateRect.top() );
+ int bottom = qMin( updateRect.bottom(), height() - grabBarHeight );
// Left border
if ( updateRect.x() < leftBorderWidth )
@@ -1587,8 +1587,8 @@ void KeramikClient::paintEvent( QPaintEvent *e )
// Space between the left corner and the right corner
if ( updateRect.x() < width() - 9 ) {
- int x1 = QMAX( 9, updateRect.x() );
- int x2 = QMIN( width() - 9, updateRect.right() );
+ int x1 = qMax( 9, updateRect.x() );
+ int x2 = qMin( width() - 9, updateRect.right() );
p.drawTiledPixmap( x1, height() - grabBarHeight, x2 - x1 + 1,
grabBarHeight, *clientHandler->tile( GrabBarCenter, active ) );
diff --git a/clients/modernsystem/config/config.cpp b/clients/modernsystem/config/config.cpp
index 178e787f4e..41ddb212bb 100644
--- a/clients/modernsystem/config/config.cpp
+++ b/clients/modernsystem/config/config.cpp
@@ -109,7 +109,7 @@ void ModernSysConfig::load(KConfig* /*conf*/)
handleSizeSlider->setEnabled(i);
handleWidth = clientrc->readEntry("HandleWidth", 6);
handleSize = clientrc->readEntry("HandleSize", 30);
- handleSizeSlider->setValue(QMIN((handleWidth - 6) / 2, (uint)4));
+ handleSizeSlider->setValue(qMin((handleWidth - 6) / 2, (uint)4));
}
diff --git a/clients/plastik/plastik.cpp b/clients/plastik/plastik.cpp
index d526161e7f..f7e2330d14 100644
--- a/clients/plastik/plastik.cpp
+++ b/clients/plastik/plastik.cpp
@@ -172,7 +172,7 @@ void PlastikHandler::readConfig()
QFontMetrics fm(m_titleFont); // active font = inactive font
int titleHeightMin = config.readEntry("MinTitleHeight", 16);
// The title should strech with bigger font sizes!
- m_titleHeight = QMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
+ m_titleHeight = qMax(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
// have an even title/button size so the button icons are fully centered...
if ( m_titleHeight%2 == 0)
m_titleHeight++;
@@ -180,7 +180,7 @@ void PlastikHandler::readConfig()
fm = QFontMetrics(m_titleFontTool); // active font = inactive font
int titleHeightToolMin = config.readEntry("MinTitleHeightTool", 13);
// The title should strech with bigger font sizes!
- m_titleHeightTool = QMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
+ m_titleHeightTool = qMax(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
// have an even title/button size so the button icons are fully centered...
if ( m_titleHeightTool%2 == 0)
m_titleHeightTool++;
@@ -535,7 +535,7 @@ const QBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const QSize &size,
delete m_bitmaps[toolWindow][typeIndex];
m_bitmaps[toolWindow][typeIndex] = 0;
- QBitmap bmp = IconEngine::icon(type /*icon*/, QMIN(w,h) );
+ QBitmap bmp = IconEngine::icon(type /*icon*/, qMin(w,h) );
QBitmap *bitmap = new QBitmap(bmp);
m_bitmaps[toolWindow][typeIndex] = bitmap;
return *bitmap;
diff --git a/clients/plastik/plastikbutton.cpp b/clients/plastik/plastikbutton.cpp
index 8184aed6dc..09ff51ee7f 100644
--- a/clients/plastik/plastikbutton.cpp
+++ b/clients/plastik/plastikbutton.cpp
@@ -538,7 +538,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size)
lw2 = 1;
}
- int h = QMAX( (r.width()/2), (lw1+2*lw2) );
+ int h = qMax( (r.width()/2), (lw1+2*lw2) );
// horizontal bars
drawObject(p, HorizontalLine, r.x(), r.y(), r.width(), lw1);
diff --git a/clients/web/Web.cpp b/clients/web/Web.cpp
index 8ca0bd23d8..9573573362 100644
--- a/clients/web/Web.cpp
+++ b/clients/web/Web.cpp
@@ -181,7 +181,7 @@ WebClient::init()
default:
borderSize_ = 4;
}
- titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_);
+ titleHeight_ = qMax(qMax(14, fm.height() + textVMargin * 2), borderSize_);
if (0 != titleHeight_ % 2)
titleHeight_ += 1;
@@ -204,7 +204,7 @@ WebClient::reset( unsigned long changed )
// title height
const int textVMargin = 2;
QFontMetrics fm(options()->font(isActive(), isToolWindow()));
- titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_);
+ titleHeight_ = qMax(qMax(14, fm.height() + textVMargin * 2), borderSize_);
if (0 != titleHeight_ % 2)
titleHeight_ += 1;
diff --git a/geometry.cpp b/geometry.cpp
index 52e0300837..11105894bf 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -671,10 +671,10 @@ void Client::keepInArea( QRect area, bool partial )
if( partial )
{
// increase the area so that can have only 100 pixels in the area
- area.setLeft( QMIN( area.left() - width() + 100, area.left()));
- area.setTop( QMIN( area.top() - height() + 100, area.top()));
- area.setRight( QMAX( area.right() + width() - 100, area.right()));
- area.setBottom( QMAX( area.bottom() + height() - 100, area.bottom()));
+ area.setLeft( qMin( area.left() - width() + 100, area.left()));
+ area.setTop( qMin( area.top() - height() + 100, area.top()));
+ area.setRight( qMax( area.right() + width() - 100, area.right()));
+ area.setBottom( qMax( area.bottom() + height() - 100, area.bottom()));
}
if ( geometry().right() > area.right() && width() < area.width() )
move( area.right() - width(), y() );
@@ -1051,10 +1051,10 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode, bool noframe
if( decominsize.height() > min_size.height())
min_size.setHeight( decominsize.height());
}
- w = QMIN( max_size.width(), w );
- h = QMIN( max_size.height(), h );
- w = QMAX( min_size.width(), w );
- h = QMAX( min_size.height(), h );
+ w = qMin( max_size.width(), w );
+ h = qMin( max_size.height(), h );
+ w = qMax( min_size.width(), w );
+ h = qMax( min_size.height(), h );
int w1 = w;
int h1 = h;
@@ -1227,8 +1227,8 @@ void Client::getWmNormalHints()
xSizeHint.max_width = xSizeHint.max_height = INT_MAX;
else
{
- xSizeHint.max_width = QMAX( xSizeHint.max_width, 1 );
- xSizeHint.max_height = QMAX( xSizeHint.max_height, 1 );
+ xSizeHint.max_width = qMax( xSizeHint.max_width, 1 );
+ xSizeHint.max_height = qMax( xSizeHint.max_height, 1 );
}
if( xSizeHint.flags & PResizeInc )
{
diff --git a/geometrytip.cpp b/geometrytip.cpp
index 6c60ac5b26..8b12ec68fa 100644
--- a/geometrytip.cpp
+++ b/geometrytip.cpp
@@ -49,7 +49,7 @@ void GeometryTip::setGeometry( const QRect& geom )
}
}
- h = QMAX( h, 0 ); // in case of isShade() and PBaseSize
+ h = qMax( h, 0 ); // in case of isShade() and PBaseSize
QString pos;
pos.sprintf( "%+d,%+d
(%d x %d)",
geom.x(), geom.y(), w, h );
diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp
index 6f1bf9d13a..5e84256511 100644
--- a/kcmkwin/kwinoptions/windows.cpp
+++ b/kcmkwin/kwinoptions/windows.cpp
@@ -195,7 +195,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, KInstance *inst,
connect(clickRaiseOn,SIGNAL(toggled(bool)), this, SLOT(clickRaiseOnTog(bool)));
fLay->addWidget(clickRaiseOn);
-// fLay->addColSpacing(0,QMAX(autoRaiseOn->sizeHint().width(),
+// fLay->addColSpacing(0,qMax(autoRaiseOn->sizeHint().width(),
// clickRaiseOn->sizeHint().width()) + 15);
autoRaiseOn->setWhatsThis( i18n("When this option is enabled, a window in the background will automatically"
diff --git a/lib/kcommondecoration.cpp b/lib/kcommondecoration.cpp
index d844b9d835..77be2f446f 100644
--- a/lib/kcommondecoration.cpp
+++ b/lib/kcommondecoration.cpp
@@ -500,8 +500,8 @@ void KCommonDecoration::resize( const QSize& s )
QSize KCommonDecoration::minimumSize() const
{
- const int minWidth = QMAX(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft))
- +QMAX(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight))
+ const int minWidth = qMax(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft))
+ +qMax(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight))
+layoutMetric(LM_TitleBorderLeft)+layoutMetric(LM_TitleBorderRight);
return QSize(minWidth,
layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)
diff --git a/placement.cpp b/placement.cpp
index 223b95c5b6..b36148a8d9 100644
--- a/placement.cpp
+++ b/placement.cpp
@@ -188,8 +188,8 @@ void Placement::placeSmart(Client* c, const QRect& area, Policy /*next*/ )
if((cxl < xr) && (cxr > xl) &&
(cyt < yb) && (cyb > yt))
{
- xl = QMAX(cxl, xl); xr = QMIN(cxr, xr);
- yt = QMAX(cyt, yt); yb = QMIN(cyb, yb);
+ xl = qMax(cxl, xl); xr = qMin(cxr, xr);
+ yt = qMax(cyt, yt); yb = qMin(cyb, yb);
if((*l)->keepAbove())
overlap += 16 * (xr - xl) * (yb - yt);
else if((*l)->keepBelow() && !(*l)->isDock()) // ignore KeepBelow windows
diff --git a/rules.cpp b/rules.cpp
index 248ad25020..190b168eb7 100644
--- a/rules.cpp
+++ b/rules.cpp
@@ -85,8 +85,8 @@ Rules::Rules( const QString& str, bool temporary )
#define READ_MATCH_STRING( var, func ) \
var = cfg.readEntry( #var ) func; \
- var##match = (StringMatch) QMAX( FirstStringMatch, \
- QMIN( LastStringMatch, static_cast< StringMatch >( cfg.readEntry( #var "match",0 ))));
+ var##match = (StringMatch) qMax( FirstStringMatch, \
+ qMin( LastStringMatch, static_cast< StringMatch >( cfg.readEntry( #var "match",0 ))));
#define READ_SET_RULE( var, func, def ) \
var = func ( cfg.readEntry( #var, def)); \
@@ -112,7 +112,7 @@ Rules::Rules( KConfig& cfg )
readFromCfg( cfg );
}
-static int limit0to4( int i ) { return QMAX( 0, QMIN( 4, i )); }
+static int limit0to4( int i ) { return qMax( 0, qMin( 4, i )); }
void Rules::readFromCfg( KConfig& cfg )
{
diff --git a/tabbox.cpp b/tabbox.cpp
index db3ece7505..329b7a6c60 100644
--- a/tabbox.cpp
+++ b/tabbox.cpp
@@ -143,7 +143,7 @@ void TabBox::reset()
// calculate height of 1 line
// fontheight + 1 pixel above + 1 pixel below, or 32x32 icon + 2 pixel above + below
- lineHeight = QMAX(fontMetrics().height() + 2, 32 + 4);
+ lineHeight = qMax(fontMetrics().height() + 2, 32 + 4);
if ( mode() == WindowsMode )
{
@@ -178,7 +178,7 @@ void TabBox::reset()
{
showMiniIcon = true;
// fontheight + 1 pixel above + 1 pixel below, or 16x16 icon + 1 pixel above + below
- lineHeight = QMAX(fontMetrics().height() + 2, 16 + 2);
+ lineHeight = qMax(fontMetrics().height() + 2, 16 + 2);
h = clients.count() * lineHeight;
@@ -436,11 +436,11 @@ void TabBox::drawContents( QPainter * )
int wmax = 0;
for ( int i = 1; i <= workspace()->numberOfDesktops(); i++ )
{
- wmax = QMAX(wmax, fontMetrics().width(workspace()->desktopName(i)));
+ wmax = qMax(wmax, fontMetrics().width(workspace()->desktopName(i)));
// calculate max width of desktop-number text
QString num = QString::number(i);
- iconWidth = QMAX(iconWidth - 4, fm.boundingRect(num).width()) + 4;
+ iconWidth = qMax(iconWidth - 4, fm.boundingRect(num).width()) + 4;
}
// In DesktopMode, start at the current desktop