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)
|
void ServiceProvider::ruleChanged(Plasma::AuthorizationRule *rule)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (Jolie::Message message, m_messagesPendingAuthorization) {
|
foreach (const Jolie::Message &message, m_messagesPendingAuthorization) {
|
||||||
QByteArray id = Message::field(Message::Field::IDENTITYID, message);
|
QByteArray id = Message::field(Message::Field::IDENTITYID, message);
|
||||||
//Credentials identity = AuthorizationManager::self()->d->getCredentials(id);
|
//Credentials identity = AuthorizationManager::self()->d->getCredentials(id);
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ QSize WindowPreview::sizeHint() const
|
||||||
int maxHeight = 0;
|
int maxHeight = 0;
|
||||||
int totalWidth = 0;
|
int totalWidth = 0;
|
||||||
|
|
||||||
foreach (QSize s, windowSizes) {
|
foreach (const QSize &s, windowSizes) {
|
||||||
if (s.height() > maxHeight) {
|
if (s.height() > maxHeight) {
|
||||||
maxHeight = s.height();
|
maxHeight = s.height();
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ void WindowPreview::paintEvent(QPaintEvent *e)
|
||||||
qreal left, top, right, bottom;
|
qreal left, top, right, bottom;
|
||||||
m_background->getMargins(left, top, right, bottom);
|
m_background->getMargins(left, top, right, bottom);
|
||||||
|
|
||||||
foreach (QRect r, m_thumbnailRects) {
|
foreach (const QRect &r, m_thumbnailRects) {
|
||||||
//kWarning()<<r;
|
//kWarning()<<r;
|
||||||
m_background->resizeFrame(r.size()+QSize(left+right, top+bottom));
|
m_background->resizeFrame(r.size()+QSize(left+right, top+bottom));
|
||||||
m_background->paintFrame(&painter, r.topLeft()-pos()-QPoint(left,top));
|
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(' ');
|
QStringList words = text.split(' ');
|
||||||
|
|
||||||
qreal maxWidth = 0;
|
qreal maxWidth = 0;
|
||||||
foreach (QString word, words) {
|
foreach (const QString &word, words) {
|
||||||
maxWidth = qMax(maxWidth, fm.width(word));
|
maxWidth = qMax(maxWidth, fm.width(word));
|
||||||
}
|
}
|
||||||
return maxWidth;
|
return maxWidth;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user