libksysguard: process.h: encapsulate private fields

Review Request #121831 - Created Jan. 4, 2015 and submitted

Information
Gregor Mi
libksysguard
master
Reviewers
kde-baseapps
dhaumann, hein, johnflux

This is a follow-up to https://git.reviewboard.kde.org/r/121717/:

In process.h there are several public fields which easily trigger BIC changes. This RR introduces a d-ptr.

(In a separate commit I would add the .reviewboardrc file)

Compiles and runs. Data is still shown; no visible error. Unit tests succeed.

Issues

  • 1
  • 8
  • 1
  • 10
Description From Last Updated
Don't you change behavior here? Before, we just wrote into the varialbes. Now, we use the setters, which also sets ... Dominik Haumann Dominik Haumann
Gregor Mi
Gregor Mi
Gregor Mi
Gregor Mi
Gregor Mi
Gregor Mi
Aleix Pol Gonzalez
Gregor Mi
Gregor Mi
Dominik Haumann
Gregor Mi
Gregor Mi
Alex Richardson
Gregor Mi
Gregor Mi
Gregor Mi
David Edmundson
Gregor Mi
Review request changed

Status: Closed (submitted)

Hrvoje Senjan

can you check what needs to be adjusted in plasma-workspace? it fails to build with your change:

[ 451s] /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:471:43: error: 'proc->KSysGuard::Process::command' does not have class type
[ 451s] QString cmdline = proc ? proc->command.simplified() : QString(); // proc->command has a trailing space???
[ 451s] ^
[ 451s] /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:501:103: error: no matching function for call to 'KService::KService(<unresolved overloaded function type>, QString&, QString)'
[ 451s] services << QExplicitlySharedDataPointer<KService>(new KService(proc->name, cmdline, QString()));
[ 451s] ^
[ 451s] /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:501:103: note: candidates are:
[ 451s] In file included from /usr/include/KF5/KService/KService:1:0,
[ 451s] from /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:32:
[ 451s] /usr/include/KF5/KService/kservice.h:580:5: note: KService::KService(QDataStream&, int)
[ 451s] KService(QDataStream &str, int offset);
[ 451s] ^
[ 451s] /usr/include/KF5/KService/kservice.h:580:5: note: candidate expects 2 arguments, 3 provided
[ 451s] In file included from /usr/include/KF5/KService/KService:1:0,
[ 451s] from /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:32:
[ 451s] /usr/include/KF5/KService/kservice.h:82:14: note: KService::KService(const KDesktopFile, const QString&)
[ 451s] explicit KService(const KDesktopFile
config, const QString &entryPath = QString());
[ 451s] ^
[ 451s] /usr/include/KF5/KService/kservice.h:82:14: note: candidate expects 2 arguments, 3 provided
[ 451s] /usr/include/KF5/KService/kservice.h:75:14: note: KService::KService(const QString&)
[ 451s] explicit KService(const QString &fullpath);
[ 451s] ^
[ 451s] /usr/include/KF5/KService/kservice.h:75:14: note: candidate expects 1 argument, 3 provided
[ 451s] /usr/include/KF5/KService/kservice.h:68:5: note: KService::KService(const QString&, const QString&, const QString&)
[ 451s] KService(const QString &name, const QString &exec, const QString &icon);
[ 451s] ^
[ 451s] /usr/include/KF5/KService/kservice.h:68:5: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const QString&'
[ 451s] /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp: In function 'QUrl TaskManager::getServiceLauncherUrl(int, const QString&, const QStringList&)':
[ 451s] /home/abuild/rpmbuild/BUILD/plasma-workspace-5.2.90git/libtaskmanager/taskitem.cpp:516:43: error: 'proc->KSysGuard::Process::command' does not have class type
[ 451s] QString cmdline = proc ? proc->command.simplified() : QString(); // proc->command has a trailing space???
[ 451s] ^

  1. Probably proc->command must be replace with proc->command(). I'll check that.

  2. How can I find out if which branch was compiled? I assume it is the master branch.

  3. How can I find out if which branch was compiled? I assume it is the master branch.

    Yes its master branch

  4. Aleix and me have fixed plasma-workspace's build. Update the master branch.

Loading...