diff --git a/clients/keramik/keramik.cpp b/clients/keramik/keramik.cpp index 9f09cd2e1f..aaf32d30fe 100644 --- a/clients/keramik/keramik.cpp +++ b/clients/keramik/keramik.cpp @@ -46,14 +46,14 @@ static void flip( QPixmap *&pix ) { - QPixmap *tmp = new QPixmap( pix->transformed( QWMatrix(-1,0,0,1,pix->width(),0) ) ); + QPixmap *tmp = new QPixmap( pix->transformed( QMatrix(-1,0,0,1,pix->width(),0) ) ); delete pix; pix = tmp; } static void flip( QBitmap *&pix ) { - QBitmap *tmp = new QBitmap( pix->transformed( QWMatrix(-1,0,0,1,pix->width(),0) ) ); + QBitmap *tmp = new QBitmap( pix->transformed( QMatrix(-1,0,0,1,pix->width(),0) ) ); delete pix; pix = tmp; } @@ -610,9 +610,9 @@ QPixmap *KeramikHandler::composite( QImage *over, QImage *under ) *dst = *src; else if ( a != 0x00 ) - *dst = qRgba( Q_UINT8( r1 + (((r2 - r1) * a) >> 8) ), - Q_UINT8( g1 + (((g2 - g1) * a) >> 8) ), - Q_UINT8( b1 + (((b2 - b1) * a) >> 8) ), + *dst = qRgba( quint8( r1 + (((r2 - r1) * a) >> 8) ), + quint8( g1 + (((g2 - g1) * a) >> 8) ), + quint8( b1 + (((b2 - b1) * a) >> 8) ), 0xff ); else if ( qAlpha(*dst) == 0x00 ) @@ -1639,10 +1639,10 @@ void KeramikClient::resizeEvent( QResizeEvent *e ) int dy = 0; if ( e->oldSize().width() != width() ) - dx = 32 + QABS( e->oldSize().width() - width() ); + dx = 32 + qAbs( e->oldSize().width() - width() ); if ( e->oldSize().height() != height() ) - dy = 8 + QABS( e->oldSize().height() - height() ); + dy = 8 + qAbs( e->oldSize().height() - height() ); if ( dy ) widget()->update( 0, height() - dy + 1, width(), dy ); diff --git a/effects/desktopgrid.cpp b/effects/desktopgrid.cpp index bcb90abcb4..fc07edae33 100644 --- a/effects/desktopgrid.cpp +++ b/effects/desktopgrid.cpp @@ -507,7 +507,7 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e ) QRect rect = windowRect( window_move ); int desktop = posToDesktop( rect.center()); // to desktop's coordinates - rect.moveBy( -desktopRect( desktop, true ).topLeft()); + rect.translate( -desktopRect( desktop, true ).topLeft()); int x, y; Qt::Orientation orientation; effects->calcDesktopLayout( &x, &y, &orientation ); diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 2ec724cbbe..f70016fb35 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -770,12 +770,12 @@ void PresentWindowsEffect::updateFilterTexture() rect.adjust( -border, -border, border, border ); QRect area = effects->clientArea( PlacementArea, QPoint( 0, 0 ), effects->currentDesktop()); QImage im( rect.width(), rect.height(), QImage::Format_ARGB32 ); - QColor col = QPalette().highlight(); + QColor col = QPalette().color( QPalette::Highlight ); col.setAlpha( 128 ); // 0.5 im.fill( col.rgba()); QPainter p( &im ); p.setFont( font ); - p.setPen( QPalette().highlightedText()); + p.setPen( QPalette().color( QPalette::HighlightedText ) ); p.drawText( -rect.topLeft(), windowFilter ); p.end(); filterTexture = new GLTexture( im ); diff --git a/geometry.cpp b/geometry.cpp index 8777ae3927..1f2da78d52 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -318,23 +318,23 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos ) int snap = options->borderSnapZone; //snap trigger if (snap) { - if ((sOWO?(cxxmax):true) && (QABS(rx-xmax)xmax):true) && (qAbs(rx-xmax)ymax):true) && (QABS(ry-ymax)ymax):true) && (qAbs(ry-ymax)= ly ) && ( ry <= lry )) || (( cy <= ly ) && ( ry >= lry )) ) { - if ((sOWO?(cxlx):true) && (QABS(rx-lx)lx):true) && (qAbs(rx-lx)= lx ) && ( rx <= lrx )) || (( cx <= lx ) && ( rx >= lrx )) ) { - if ((sOWO?(cyly):true) && (QABS(ry-ly)ly):true) && (qAbs(ry-ly)ymax):true) && (QABS(ymax-newry)ymax):true) && (qAbs(ymax-newry)xmax):true) && (QABS(xmax-newrx)xmax):true) && (qAbs(xmax-newrx)ly):true) \ && WITHIN_WIDTH \ - && (QABS( ly - newry ) < deltaY) ) { \ - deltaY = QABS( ly - newry ); \ + && (qAbs( ly - newry ) < deltaY) ) { \ + deltaY = qAbs( ly - newry ); \ newry=ly; \ } #define SNAP_WINDOW_LEFT if ( (sOWO?(newcxlx):true) \ && WITHIN_HEIGHT \ - && (QABS( lx - newrx ) < deltaX)) \ + && (qAbs( lx - newrx ) < deltaX)) \ { \ - deltaX = QABS( lx - newrx ); \ + deltaX = qAbs( lx - newrx ); \ newrx=lx; \ } diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index d61d5e095a..3d6315b89f 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -415,7 +415,7 @@ void KFocusConfig::updateActiveMouseScreen() // on by default for non click to focus policies KConfigGroup cfg( config, "Windows" ); if( !cfg.hasKey( KWIN_ACTIVE_MOUSE_SCREEN )) - setActiveMouseScreen( focusCombo->currentItem() != 0 ); + setActiveMouseScreen( focusCombo->currentIndex() != 0 ); } void KFocusConfig::setAltTabMode(bool a) { @@ -467,7 +467,7 @@ void KFocusConfig::load( void ) setSeparateScreenFocus( cg.readEntry(KWIN_SEPARATE_SCREEN_FOCUS, true)); // on by default for non click to focus policies - setActiveMouseScreen( cg.readEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentItem() != 0 )); + setActiveMouseScreen( cg.readEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentIndex() != 0 )); key = cg.readEntry(KWIN_ALTTABMODE, "KDE"); setAltTabMode(key == "KDE"); @@ -555,7 +555,7 @@ void KFocusConfig::defaults() setClickRaise(true); setSeparateScreenFocus( true ); // on by default for non click to focus policies - setActiveMouseScreen( focusCombo->currentItem() != 0 ); + setActiveMouseScreen( focusCombo->currentIndex() != 0 ); setAltTabMode(true); setTraverseAll( false ); setRollOverDesktops(true); diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 57f04d399d..319f80ad34 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -511,7 +511,7 @@ GLShader::~GLShader() bool GLShader::loadFromFiles(const QString& vertexfile, const QString& fragmentfile) { QFile vf(vertexfile); - if(!vf.open(IO_ReadOnly)) + if(!vf.open(QIODevice::ReadOnly)) { kError(1212) << k_funcinfo << "Couldn't open '" << vertexfile << "' for reading!" << endl; return false; @@ -519,7 +519,7 @@ bool GLShader::loadFromFiles(const QString& vertexfile, const QString& fragmentf QString vertexsource(vf.readAll()); QFile ff(fragmentfile); - if(!ff.open(IO_ReadOnly)) + if(!ff.open(QIODevice::ReadOnly)) { kError(1212) << k_funcinfo << "Couldn't open '" << fragmentfile << "' for reading!" << endl; return false; diff --git a/options.cpp b/options.cpp index 7dcac9edfb..cc1cc121d5 100644 --- a/options.cpp +++ b/options.cpp @@ -201,7 +201,7 @@ unsigned long Options::updateSettings() refreshRate = config.readEntry( "RefreshRate", 0 ); smoothScale = qBound( -1, config.readEntry( "SmoothScale", -1 ), 2 ); - QString glmode = config.readEntry("GLMode", "TFP" ).upper(); + QString glmode = config.readEntry("GLMode", "TFP" ).toUpper(); if( glmode == "TFP" ) glMode = GLTFP; else if( glmode == "SHM" ) diff --git a/popupinfo.cpp b/popupinfo.cpp index 3a806fbd66..5d3b76a9f5 100644 --- a/popupinfo.cpp +++ b/popupinfo.cpp @@ -36,7 +36,7 @@ namespace KWin { PopupInfo::PopupInfo( Workspace* ws, const char *name ) - : QWidget( 0, name ), workspace( ws ) + : QWidget( 0 ), workspace( ws ) { setObjectName( name );