[wesather] More const ref argument passing

parent 09d748fd
......@@ -83,13 +83,13 @@ WeatherApplet::~WeatherApplet()
{
}
QString WeatherApplet::convertTemperature(KUnitConversion::Unit format, const QVariant &value,
QString WeatherApplet::convertTemperature(const KUnitConversion::Unit& format, const QVariant& value,
int type, bool rounded, bool degreesOnly)
{
return convertTemperature(format, value.toFloat(), type, rounded, degreesOnly);
}
QString WeatherApplet::convertTemperature(KUnitConversion::Unit format, float value,
QString WeatherApplet::convertTemperature(const KUnitConversion::Unit& format, float value,
int type, bool rounded, bool degreesOnly)
{
KUnitConversion::Value v(value, static_cast<KUnitConversion::UnitId>(type));
......
......@@ -59,9 +59,9 @@ private:
void updateFiveDaysModel(const Plasma::DataEngine::Data &data);
void updateDetailsModel(const Plasma::DataEngine::Data &data);
void updateNoticesModel(const Plasma::DataEngine::Data &data);
QString convertTemperature(KUnitConversion::Unit format, float value,
QString convertTemperature(const KUnitConversion::Unit& format, float value,
int type, bool rounded = false, bool degreesOnly = false);
QString convertTemperature(KUnitConversion::Unit format, const QVariant &value,
QString convertTemperature(const KUnitConversion::Unit& format, const QVariant& value,
int type, bool rounded = false, bool degreesOnly = false);
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment