Merge lp:~mandel/ubuntu-download-manager/remove-process-factory-pimpl into lp:ubuntu-download-manager

Proposed by Manuel de la Peña
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 172
Merged at revision: 182
Proposed branch: lp:~mandel/ubuntu-download-manager/remove-process-factory-pimpl
Merge into: lp:ubuntu-download-manager
Diff against target: 77 lines (+3/-40)
2 files modified
libubuntudownloadmanager/system/process_factory.cpp (+3/-34)
libubuntudownloadmanager/system/process_factory.h (+0/-6)
To merge this branch: bzr merge lp:~mandel/ubuntu-download-manager/remove-process-factory-pimpl
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+195256@code.launchpad.net

Commit message

Remove the pimpl pattern from the ProcessFactory.

Description of the change

Remove the pimpl pattern from the ProcessFactory.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntudownloadmanager/system/process_factory.cpp'
2--- libubuntudownloadmanager/system/process_factory.cpp 2013-10-29 13:42:44 +0000
3+++ libubuntudownloadmanager/system/process_factory.cpp 2013-11-14 16:15:05 +0000
4@@ -24,46 +24,15 @@
5
6 namespace System {
7
8-/*
9- * PRIVATE IMPLEMENTATION
10- */
11-
12-class ProcessFactoryPrivate {
13- Q_DECLARE_PUBLIC(ProcessFactory)
14- public:
15- explicit ProcessFactoryPrivate(ProcessFactory* parent);
16-
17- Process* createProcess();
18-
19- private:
20- ProcessFactory* q_ptr;
21-};
22-
23-
24-ProcessFactoryPrivate::ProcessFactoryPrivate(ProcessFactory* parent)
25- : q_ptr(parent) {
26+ProcessFactory::ProcessFactory(QObject* parent)
27+ : QObject(parent) {
28 }
29
30 Process*
31-ProcessFactoryPrivate::createProcess() {
32+ProcessFactory::createProcess() {
33 return new Process();
34 }
35
36-/*
37- * PUBLIC IMPLEMENTATION
38- */
39-
40-ProcessFactory::ProcessFactory(QObject *parent)
41- : QObject(parent),
42- d_ptr(new ProcessFactoryPrivate(this)) {
43-}
44-
45-Process*
46-ProcessFactory::createProcess() {
47- Q_D(ProcessFactory);
48- return d->createProcess();
49-}
50-
51 } // System
52
53 } // DownloadManager
54
55=== modified file 'libubuntudownloadmanager/system/process_factory.h'
56--- libubuntudownloadmanager/system/process_factory.h 2013-10-29 13:42:44 +0000
57+++ libubuntudownloadmanager/system/process_factory.h 2013-11-14 16:15:05 +0000
58@@ -28,19 +28,13 @@
59
60 namespace System {
61
62-class ProcessFactoryPrivate;
63 class ProcessFactory : public QObject {
64 Q_OBJECT
65- Q_DECLARE_PRIVATE(ProcessFactory)
66
67 public:
68 explicit ProcessFactory(QObject *parent = 0);
69
70 virtual Process* createProcess();
71-
72- private:
73- // use pimpl so that we can mantains ABI compatibility
74- ProcessFactoryPrivate* d_ptr;
75 };
76
77 } // System

Subscribers

People subscribed via source and target branches