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
4
Merge Requests
4
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
148180d3
Commit
148180d3
authored
Jan 09, 2018
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[weather] Use non-nested class and QScopedPointer for pimpl object
parent
537afd72
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
27 deletions
+16
-27
libs/plasmaweather/weatherlocation.cpp
libs/plasmaweather/weatherlocation.cpp
+4
-7
libs/plasmaweather/weatherlocation.h
libs/plasmaweather/weatherlocation.h
+1
-2
libs/plasmaweather/weatherpopupapplet.cpp
libs/plasmaweather/weatherpopupapplet.cpp
+4
-7
libs/plasmaweather/weatherpopupapplet.h
libs/plasmaweather/weatherpopupapplet.h
+2
-2
libs/plasmaweather/weathervalidator.cpp
libs/plasmaweather/weathervalidator.cpp
+4
-7
libs/plasmaweather/weathervalidator.h
libs/plasmaweather/weathervalidator.h
+1
-2
No files found.
libs/plasmaweather/weatherlocation.cpp
View file @
148180d3
...
...
@@ -21,10 +21,10 @@
#include "weathervalidator.h"
class
WeatherLocation
::
Private
class
WeatherLocationPrivate
{
public:
Private
(
WeatherLocation
*
location
)
WeatherLocation
Private
(
WeatherLocation
*
location
)
:
q
(
location
),
locationEngine
(
nullptr
)
{}
...
...
@@ -46,16 +46,13 @@ public:
WeatherLocation
::
WeatherLocation
(
QObject
*
parent
)
:
QObject
(
parent
)
,
d
(
new
Private
(
this
))
,
d
(
new
WeatherLocation
Private
(
this
))
{
QObject
::
connect
(
&
d
->
validator
,
SIGNAL
(
finished
(
QMap
<
QString
,
QString
>
)),
this
,
SLOT
(
validatorFinished
(
QMap
<
QString
,
QString
>
)));
}
WeatherLocation
::~
WeatherLocation
()
{
delete
d
;
}
WeatherLocation
::~
WeatherLocation
()
=
default
;
void
WeatherLocation
::
setDataEngines
(
Plasma
::
DataEngine
*
location
,
Plasma
::
DataEngine
*
weather
)
{
...
...
libs/plasmaweather/weatherlocation.h
View file @
148180d3
...
...
@@ -57,8 +57,7 @@ public Q_SLOTS:
void
dataUpdated
(
const
QString
&
source
,
const
Plasma
::
DataEngine
::
Data
&
data
);
private:
class
Private
;
Private
*
const
d
;
const
QScopedPointer
<
class
WeatherLocationPrivate
>
d
;
Q_PRIVATE_SLOT
(
d
,
void
validatorFinished
(
const
QMap
<
QString
,
QString
>
&
results
))
};
...
...
libs/plasmaweather/weatherpopupapplet.cpp
View file @
148180d3
...
...
@@ -31,10 +31,10 @@
using
namespace
KUnitConversion
;
class
Q_DECL_HIDDEN
WeatherPopupApplet
::
Private
class
WeatherPopupApplet
Private
{
public:
Private
(
WeatherPopupApplet
*
weatherapplet
)
WeatherPopupApplet
Private
(
WeatherPopupApplet
*
weatherapplet
)
:
q
(
weatherapplet
)
,
updateInterval
(
0
)
,
location
(
nullptr
)
...
...
@@ -206,14 +206,11 @@ public:
WeatherPopupApplet
::
WeatherPopupApplet
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
Plasma
::
Applet
(
parent
,
args
)
,
d
(
new
Private
(
this
))
,
d
(
new
WeatherPopupApplet
Private
(
this
))
{
}
WeatherPopupApplet
::~
WeatherPopupApplet
()
{
delete
d
;
}
WeatherPopupApplet
::~
WeatherPopupApplet
()
=
default
;
void
WeatherPopupApplet
::
init
()
{
...
...
libs/plasmaweather/weatherpopupapplet.h
View file @
148180d3
...
...
@@ -110,9 +110,9 @@ class PLASMAWEATHER_EXPORT WeatherPopupApplet : public Plasma::Applet, public Pl
void
connectToEngine
();
private:
class
Private
;
Private
*
const
d
;
const
QScopedPointer
<
class
WeatherPopupAppletPrivate
>
d
;
friend
class
WeatherPopupAppletPrivate
;
Q_PRIVATE_SLOT
(
d
,
void
locationReady
(
const
QString
&
source
))
Q_PRIVATE_SLOT
(
d
,
void
giveUpBeingBusy
())
Q_PRIVATE_SLOT
(
d
,
void
onTimeoutNotificationClosed
())
...
...
libs/plasmaweather/weathervalidator.cpp
View file @
148180d3
...
...
@@ -22,10 +22,10 @@
#include <KLocalizedString>
#include <KMessageBox>
class
WeatherValidator
::
Private
class
WeatherValidatorPrivate
{
public:
Private
()
WeatherValidator
Private
()
:
dataengine
(
nullptr
)
{}
...
...
@@ -37,14 +37,11 @@ public:
WeatherValidator
::
WeatherValidator
(
QObject
*
parent
)
:
QObject
(
parent
)
,
d
(
new
Private
())
,
d
(
new
WeatherValidator
Private
())
{
}
WeatherValidator
::~
WeatherValidator
()
{
delete
d
;
}
WeatherValidator
::~
WeatherValidator
()
=
default
;
QString
WeatherValidator
::
ion
()
const
{
...
...
libs/plasmaweather/weathervalidator.h
View file @
148180d3
...
...
@@ -87,8 +87,7 @@ public Q_SLOTS:
void
dataUpdated
(
const
QString
&
source
,
const
Plasma
::
DataEngine
::
Data
&
data
);
private:
class
Private
;
Private
*
const
d
;
const
QScopedPointer
<
class
WeatherValidatorPrivate
>
d
;
};
#endif
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