pass-by-value -> reference-to-count fixes

svn path=/trunk/KDE/kdebase/workspace/; revision=707741
icc-effect-5.14.5
Arto Hytönen 2007-09-02 20:01:17 +00:00
parent 8f6cd4277f
commit e1c6433c8e
16 changed files with 22 additions and 22 deletions

View File

@ -80,7 +80,7 @@ bool Bridge::isSetShade() const
return c->shadeMode() != ShadeNone; return c->shadeMode() != ShadeNone;
} }
void Bridge::showWindowMenu( QPoint p ) void Bridge::showWindowMenu( const QPoint &p )
{ {
c->workspace()->showWindowMenu( p, c ); c->workspace()->showWindowMenu( p, c );
} }

View File

@ -41,7 +41,7 @@ class Bridge : public KDecorationBridge
virtual QIcon icon() const; virtual QIcon icon() const;
virtual QString caption() const; virtual QString caption() const;
virtual void processMousePressEvent( QMouseEvent* ); virtual void processMousePressEvent( QMouseEvent* );
virtual void showWindowMenu( QPoint ); virtual void showWindowMenu( const QPoint & );
virtual void showWindowMenu( const QRect & ); virtual void showWindowMenu( const QRect & );
virtual void performWindowOperation( WindowOperation ); virtual void performWindowOperation( WindowOperation );
virtual void setMask( const QRegion&, int ); virtual void setMask( const QRegion&, int );

View File

@ -209,7 +209,7 @@ class Client
KShortcut shortcut() const; KShortcut shortcut() const;
void setShortcut( const QString& cut ); void setShortcut( const QString& cut );
bool performMouseCommand( Options::MouseCommand, QPoint globalPos, bool handled = false ); bool performMouseCommand( Options::MouseCommand, const QPoint &globalPos, bool handled = false );
QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const; QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;

View File

@ -456,7 +456,7 @@ void B2Client::init()
titlebar->installEventFilter(this); titlebar->installEventFilter(this);
} }
void B2Client::addButtons(const QString& s, const QString tips[], void B2Client::addButtons(const QString& s, const QString &tips[],
B2Titlebar* tb, QBoxLayout* titleLayout) B2Titlebar* tb, QBoxLayout* titleLayout)
{ {
if (s.length() <= 0) if (s.length() <= 0)

View File

@ -67,7 +67,7 @@ QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int
return result; return result;
} }
QImage recolorImage(QImage *img, QColor color) { QImage recolorImage(QImage *img, const QColor &color) {
QImage destImg(img->width(),img->height(), QImage::Format_ARGB32); QImage destImg(img->width(),img->height(), QImage::Format_ARGB32);
for (int x = 0; x < img->width(); x++) { for (int x = 0; x < img->width(); x++) {
for (int y = 0; y < img->height(); y++) { for (int y = 0; y < img->height(); y++) {

View File

@ -465,7 +465,7 @@ void BoxSwitchEffect::paintFrame()
#endif #endif
} }
void BoxSwitchEffect::paintHighlight( QRect area ) void BoxSwitchEffect::paintHighlight( const QRect &area )
{ {
QColor color = KColorScheme( KColorScheme::Selection ).background(); QColor color = KColorScheme( KColorScheme::Selection ).background();
color.setAlphaF( 0.9 ); color.setAlphaF( 0.9 );

View File

@ -110,7 +110,7 @@ void MagnifierEffect::postPaintScreen()
effects->postPaintScreen(); effects->postPaintScreen();
} }
QRect MagnifierEffect::magnifierArea( QPoint pos ) const QRect MagnifierEffect::magnifierArea( const QPoint &pos ) const
{ {
return QRect( pos.x() - magnifier_size.width() / 2, pos.y() - magnifier_size.height() / 2, return QRect( pos.x() - magnifier_size.width() / 2, pos.y() - magnifier_size.height() / 2,
magnifier_size.width(), magnifier_size.height()); magnifier_size.width(), magnifier_size.height());

View File

@ -261,7 +261,7 @@ int ButtonDropSiteItem::height()
return 20; return 20;
} }
void ButtonDropSiteItem::draw(QPainter *p, const QPalette& cg, QRect r) void ButtonDropSiteItem::draw(QPainter *p, const QPalette& cg, const QRect &r)
{ {
// p->fillRect(r, cg.base() ); // p->fillRect(r, cg.base() );
if (m_button.supported) if (m_button.supported)
@ -529,7 +529,7 @@ void ButtonDropSite::recalcItemGeometry()
} }
} }
ButtonDropSiteItem *ButtonDropSite::buttonAt(QPoint p) { ButtonDropSiteItem *ButtonDropSite::buttonAt(const QPoint &p) {
// try to find the item in the left button list // try to find the item in the left button list
for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) { for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) {
if ( (*it)->rect.contains(p) ) { if ( (*it)->rect.contains(p) ) {

View File

@ -342,7 +342,7 @@ void KDecorationPreviewBridge::showWindowMenu( const QRect &)
{ {
} }
void KDecorationPreviewBridge::showWindowMenu( QPoint ) void KDecorationPreviewBridge::showWindowMenu( const QPoint & )
{ {
} }

View File

@ -81,7 +81,7 @@ class KDecorationBridge : public KDecorationDefines
virtual QString caption() const = 0; virtual QString caption() const = 0;
virtual void processMousePressEvent( QMouseEvent* ) = 0; virtual void processMousePressEvent( QMouseEvent* ) = 0;
virtual void showWindowMenu( const QRect &) = 0; virtual void showWindowMenu( const QRect &) = 0;
virtual void showWindowMenu( QPoint ) = 0; virtual void showWindowMenu( const QPoint & ) = 0;
virtual void performWindowOperation( WindowOperation ) = 0; virtual void performWindowOperation( WindowOperation ) = 0;
virtual void setMask( const QRegion&, int ) = 0; virtual void setMask( const QRegion&, int ) = 0;
virtual bool isPreview() const = 0; virtual bool isPreview() const = 0;

View File

@ -131,7 +131,7 @@ void PopupInfo::reconfigure()
m_delayTime = cg.readEntry("PopupHideDelay", 350 ); m_delayTime = cg.readEntry("PopupHideDelay", 350 );
} }
void PopupInfo::showInfo(QString infoString) void PopupInfo::showInfo(const QString &infoString)
{ {
if (m_show) if (m_show)
{ {

View File

@ -28,7 +28,7 @@ class PopupInfo : public QWidget
void reset(); void reset();
void hide(); void hide();
void showInfo(QString infoString); void showInfo(const QString &infoString);
void reconfigure(); void reconfigure();

View File

@ -291,11 +291,11 @@ void KDecorationPreviewBridge::processMousePressEvent( QMouseEvent* )
{ {
} }
void KDecorationPreviewBridge::showWindowMenu( const QRect &) void KDecorationPreviewBridge::showWindowMenu( const QRect & )
{ {
} }
void KDecorationPreviewBridge::showWindowMenu( QPoint ) void KDecorationPreviewBridge::showWindowMenu( const QPoint & )
{ {
} }

View File

@ -534,7 +534,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
/*! /*!
Performs a mouse command on this client (see options.h) Performs a mouse command on this client (see options.h)
*/ */
bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPos, bool handled ) bool Client::performMouseCommand( Options::MouseCommand command, const QPoint &globalPos, bool handled )
{ {
bool replay = false; bool replay = false;
switch (command) switch (command)

View File

@ -1630,7 +1630,7 @@ void Workspace::checkActiveScreen( const Client* c )
// called e.g. when a user clicks on a window, set active screen to be the screen // called e.g. when a user clicks on a window, set active screen to be the screen
// where the click occurred // where the click occurred
void Workspace::setActiveScreenMouse( QPoint mousepos ) void Workspace::setActiveScreenMouse( const QPoint &mousepos )
{ {
if( !options->xineramaEnabled ) if( !options->xineramaEnabled )
return; return;
@ -1644,7 +1644,7 @@ QRect Workspace::screenGeometry( int screen ) const
return qApp->desktop()->screenGeometry( screen ); return qApp->desktop()->screenGeometry( screen );
} }
int Workspace::screenNumber( QPoint pos ) const int Workspace::screenNumber( const QPoint &pos ) const
{ {
if( !options->xineramaEnabled ) if( !options->xineramaEnabled )
return 0; return 0;
@ -1855,7 +1855,7 @@ WId Workspace::getMouseEmulationWindow()
/*! /*!
Sends a faked mouse event to the specified window. Returns the new button state. Sends a faked mouse event to the specified window. Returns the new button state.
*/ */
unsigned int Workspace::sendFakedMouseEvent( QPoint pos, WId w, MouseEmulation type, int button, unsigned int state ) unsigned int Workspace::sendFakedMouseEvent( const QPoint &pos, WId w, MouseEmulation type, int button, unsigned int state )
{ {
if ( !w ) if ( !w )
return state; return state;

View File

@ -153,9 +153,9 @@ class Workspace : public QObject, public KDecorationDefines
int activeScreen() const; int activeScreen() const;
int numScreens() const; int numScreens() const;
void checkActiveScreen( const Client* c ); void checkActiveScreen( const Client* c );
void setActiveScreenMouse( QPoint mousepos ); void setActiveScreenMouse( const QPoint &mousepos );
QRect screenGeometry( int screen ) const; QRect screenGeometry( int screen ) const;
int screenNumber( QPoint pos ) const; int screenNumber( const QPoint &pos ) const;
QWidget* desktopWidget(); QWidget* desktopWidget();
// for TabBox // for TabBox
@ -529,7 +529,7 @@ class Workspace : public QObject, public KDecorationDefines
// mouse emulation // mouse emulation
WId getMouseEmulationWindow(); WId getMouseEmulationWindow();
enum MouseEmulation { EmuPress, EmuRelease, EmuMove }; enum MouseEmulation { EmuPress, EmuRelease, EmuMove };
unsigned int sendFakedMouseEvent( QPoint pos, WId win, MouseEmulation type, int button, unsigned int state ); // returns the new state unsigned int sendFakedMouseEvent( const QPoint &pos, WId win, MouseEmulation type, int button, unsigned int state ); // returns the new state
void tabBoxKeyPress( int key ); void tabBoxKeyPress( int key );
void tabBoxKeyRelease( const XKeyEvent& ev ); void tabBoxKeyRelease( const XKeyEvent& ev );