const & in foreach variables
svn path=/trunk/KDE/kdelibs/; revision=1027710
This commit is contained in:
parent
9936c19eae
commit
376e23e095
@ -262,7 +262,7 @@ void ServiceProvider::operationCompleted(Plasma::ServiceJob *job)
|
||||
void ServiceProvider::ruleChanged(Plasma::AuthorizationRule *rule)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (Jolie::Message message, m_messagesPendingAuthorization) {
|
||||
foreach (const Jolie::Message &message, m_messagesPendingAuthorization) {
|
||||
QByteArray id = Message::field(Message::Field::IDENTITYID, message);
|
||||
//Credentials identity = AuthorizationManager::self()->d->getCredentials(id);
|
||||
|
||||
|
@ -108,7 +108,7 @@ QSize WindowPreview::sizeHint() const
|
||||
int maxHeight = 0;
|
||||
int totalWidth = 0;
|
||||
|
||||
foreach (QSize s, windowSizes) {
|
||||
foreach (const QSize &s, windowSizes) {
|
||||
if (s.height() > maxHeight) {
|
||||
maxHeight = s.height();
|
||||
}
|
||||
@ -224,7 +224,7 @@ void WindowPreview::paintEvent(QPaintEvent *e)
|
||||
qreal left, top, right, bottom;
|
||||
m_background->getMargins(left, top, right, bottom);
|
||||
|
||||
foreach (QRect r, m_thumbnailRects) {
|
||||
foreach (const QRect &r, m_thumbnailRects) {
|
||||
//kWarning()<<r;
|
||||
m_background->resizeFrame(r.size()+QSize(left+right, top+bottom));
|
||||
m_background->paintFrame(&painter, r.topLeft()-pos()-QPoint(left,top));
|
||||
|
@ -347,7 +347,7 @@ int IconWidgetPrivate::maxWordWidth(const QString text) const
|
||||
QStringList words = text.split(' ');
|
||||
|
||||
qreal maxWidth = 0;
|
||||
foreach (QString word, words) {
|
||||
foreach (const QString &word, words) {
|
||||
maxWidth = qMax(maxWidth, fm.width(word));
|
||||
}
|
||||
return maxWidth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user