Commit f3919e5e authored by Laurent Montel's avatar Laurent Montel 😁

Consti'fy

parent 0f7d0ee3
...@@ -240,7 +240,7 @@ void PackageKitNotifier::refreshDatabase() ...@@ -240,7 +240,7 @@ void PackageKitNotifier::refreshDatabase()
} }
} }
QProcess* PackageKitNotifier::checkAptVariable(const QString &aptconfig, const QLatin1String& varname, std::function<void(const QStringRef& val)> func) QProcess* PackageKitNotifier::checkAptVariable(const QString &aptconfig, const QLatin1String& varname, const std::function<void(const QStringRef& val)> &func)
{ {
QProcess* process = new QProcess; QProcess* process = new QProcess;
process->start(aptconfig, {QStringLiteral("dump")}); process->start(aptconfig, {QStringLiteral("dump")});
......
...@@ -56,7 +56,7 @@ private: ...@@ -56,7 +56,7 @@ private:
void recheckSystemUpdate(); void recheckSystemUpdate();
void checkOfflineUpdates(); void checkOfflineUpdates();
void setupGetUpdatesTransaction(PackageKit::Transaction* transaction); void setupGetUpdatesTransaction(PackageKit::Transaction* transaction);
QProcess* checkAptVariable(const QString &aptconfig, const QLatin1String& varname, std::function<void(const QStringRef& val)> func); QProcess* checkAptVariable(const QString &aptconfig, const QLatin1String& varname, const std::function<void(const QStringRef& val)> &func);
bool m_needsReboot = false; bool m_needsReboot = false;
uint m_securityUpdates; uint m_securityUpdates;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "PackageState.h" #include "PackageState.h"
#include "libdiscover_debug.h" #include "libdiscover_debug.h"
PackageState::PackageState(QString name, QString description, bool installed) PackageState::PackageState(const QString &name, const QString &description, bool installed)
: PackageState(name, name, description, installed) : PackageState(name, name, description, installed)
{} {}
......
...@@ -33,7 +33,7 @@ class DISCOVERCOMMON_EXPORT PackageState ...@@ -33,7 +33,7 @@ class DISCOVERCOMMON_EXPORT PackageState
{ {
public: public:
PackageState(QString packageName, QString name, QString description, bool installed); PackageState(QString packageName, QString name, QString description, bool installed);
PackageState(QString name, QString description, bool installed); PackageState(const QString &name, const QString &description, bool installed);
PackageState& operator=(const PackageState& other); PackageState& operator=(const PackageState& other);
QString packageName() const; QString packageName() const;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
class OneTimeAction : public QObject class OneTimeAction : public QObject
{ {
public: public:
OneTimeAction(std::function<void()> func, QObject* parent) : QObject(parent), m_function(func) {} OneTimeAction(const std::function<void()> &func, QObject* parent) : QObject(parent), m_function(func) {}
void trigger() { void trigger() {
m_function(); m_function();
......
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