const ref fixes

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776990
This commit is contained in:
Aaron J. Seigo 2008-02-19 09:19:02 +00:00
parent b19eb3eaff
commit 756041badd
8 changed files with 14 additions and 14 deletions

View File

@ -278,7 +278,7 @@ void AppletBrowserWidget::appletDestroyed(QObject* applet)
d->itemModel.setRunningApplets(name, count); d->itemModel.setRunningApplets(name, count);
} }
void AppletBrowserWidget::destroyApplets(QString name) void AppletBrowserWidget::destroyApplets(const QString &name)
{ {
Plasma::Corona *c = d->containment->corona(); Plasma::Corona *c = d->containment->corona();

View File

@ -72,7 +72,7 @@ protected Q_SLOTS:
/** /**
* Destroy all applets with this name * Destroy all applets with this name
*/ */
void destroyApplets(const QString name); void destroyApplets(const QString &name);
/** /**
* Launches a download dialog to retrieve new applets from the Internet * Launches a download dialog to retrieve new applets from the Internet

View File

@ -151,7 +151,7 @@ void PlasmaAppletItemModel::populateModel()
} }
} }
void PlasmaAppletItemModel::setRunningApplets(const QHash<QString, int> apps) void PlasmaAppletItemModel::setRunningApplets(const QHash<QString, int> &apps)
{ {
//foreach item, find that string and set the count //foreach item, find that string and set the count
for (int r=0; r<rowCount(); ++r) { for (int r=0; r<rowCount(); ++r) {
@ -163,7 +163,7 @@ void PlasmaAppletItemModel::setRunningApplets(const QHash<QString, int> apps)
} }
} }
void PlasmaAppletItemModel::setRunningApplets(const QString name, int count) void PlasmaAppletItemModel::setRunningApplets(const QString &name, int count)
{ {
for (int r=0; r<rowCount(); ++r) { for (int r=0; r<rowCount(); ++r) {
QStandardItem *i = item(r); QStandardItem *i = item(r);
@ -207,7 +207,7 @@ QMimeData* PlasmaAppletItemModel::mimeData(const QModelIndexList & indexes) cons
return data; return data;
} }
void PlasmaAppletItemModel::setFavorite(QString plugin, bool favorite) void PlasmaAppletItemModel::setFavorite(const QString &plugin, bool favorite)
{ {
if (favorite) { if (favorite) {
if (!m_favorites.contains(plugin)) { if (!m_favorites.contains(plugin)) {

View File

@ -69,10 +69,10 @@ public:
QMimeData* mimeData(const QModelIndexList & indexes) const; QMimeData* mimeData(const QModelIndexList & indexes) const;
void setFavorite(QString plugin, bool favorite); void setFavorite(const QString &plugin, bool favorite);
void setApplication(const QString& app); void setApplication(const QString& app);
void setRunningApplets(const QHash<QString, int> apps); void setRunningApplets(const QHash<QString, int> &apps);
void setRunningApplets(const QString name, int count); void setRunningApplets(const QString &name, int count);
QString& Application(); QString& Application();
private: private:

View File

@ -205,7 +205,7 @@ Qt::Alignment Meter::labelAlignment(int index) const
return d->alignments[index]; return d->alignments[index];
} }
void Meter::dataUpdated(QString sourceName, Plasma::DataEngine::Data data) void Meter::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
{ {
Q_UNUSED(sourceName) Q_UNUSED(sourceName)
@ -217,7 +217,7 @@ void Meter::dataUpdated(QString sourceName, Plasma::DataEngine::Data data)
} }
} }
void Meter::setSvg(QString svg) void Meter::setSvg(const QString &svg)
{ {
d->svg = svg; d->svg = svg;
delete d->image; delete d->image;

View File

@ -113,7 +113,7 @@ public:
/** /**
* Set svg file name * Set svg file name
*/ */
void setSvg(QString svg); void setSvg(const QString &svg);
/** /**
* @return svg file name * @return svg file name
@ -192,7 +192,7 @@ public Q_SLOTS:
/** /**
* Used when connecting to a DataEngine * Used when connecting to a DataEngine
*/ */
void dataUpdated(QString sourceName, Plasma::DataEngine::Data data); void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
protected: protected:
/** /**

View File

@ -430,7 +430,7 @@ void Widget::managingLayoutChanged()
} }
} }
QPoint Widget::popupPosition(const QSize s) const QPoint Widget::popupPosition(const QSize &s) const
{ {
QPoint pos = view()->mapFromScene(scenePos()); QPoint pos = view()->mapFromScene(scenePos());
pos = view()->mapToGlobal(pos); pos = view()->mapToGlobal(pos);

View File

@ -285,7 +285,7 @@ public:
* @param s size of the popup * @param s size of the popup
* @returns recomended position * @returns recomended position
*/ */
QPoint popupPosition(const QSize s) const; QPoint popupPosition(const QSize &s) const;
/** /**
* Reimplemented from QGraphicsItem * Reimplemented from QGraphicsItem