Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Add-ons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma Add-ons
Commits
c73ff7a5
Commit
c73ff7a5
authored
Jan 10, 2018
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wesather] More const ref argument passing
parent
09d748fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
applets/weather/weatherapplet.cpp
applets/weather/weatherapplet.cpp
+2
-2
applets/weather/weatherapplet.h
applets/weather/weatherapplet.h
+2
-2
No files found.
applets/weather/weatherapplet.cpp
View file @
c73ff7a5
...
...
@@ -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
));
...
...
applets/weather/weatherapplet.h
View file @
c73ff7a5
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment