Commit 26d62776 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

remove useless pass-by-reference

parent 10780c3b
......@@ -754,17 +754,17 @@ void KgpgEditor::modified()
m_editor->document()->setModified(m_textchanged);
}
void KgpgEditor::slotUndoAvailable(const bool &v)
void KgpgEditor::slotUndoAvailable(const bool v)
{
m_editundo->setEnabled(v);
}
void KgpgEditor::slotRedoAvailable(const bool &v)
void KgpgEditor::slotRedoAvailable(const bool v)
{
m_editredo->setEnabled(v);
}
void KgpgEditor::slotCopyAvailable(const bool &v)
void KgpgEditor::slotCopyAvailable(const bool v)
{
m_editcopy->setEnabled(v);
m_editcut->setEnabled(v);
......
......@@ -106,9 +106,9 @@ private slots:
// Options menu
void slotOptions();
void slotUndoAvailable(const bool &v);
void slotRedoAvailable(const bool &v);
void slotCopyAvailable(const bool &v);
void slotUndoAvailable(const bool v);
void slotRedoAvailable(const bool v);
void slotCopyAvailable(const bool v);
void modified();
void newText();
......
......@@ -351,7 +351,7 @@ void KgpgTextEdit::signVerifyText(const QString &message)
slotSign(message);
}
void KgpgTextEdit::slotHighlightText(const QString &, const int &matchingindex, const int &matchedlength)
void KgpgTextEdit::slotHighlightText(const QString &, const int matchingindex, const int matchedlength)
{
highlightWord(matchedlength, matchingindex);
}
......
......@@ -49,7 +49,7 @@ public slots:
void slotSign(const QString &message);
void slotVerify(const QString &message);
void slotSignVerify();
void slotHighlightText(const QString &, const int &matchingindex, const int &matchedlength);
void slotHighlightText(const QString &, const int matchingindex, const int matchedlength);
void slotVerifyDone(int result);
protected:
......
......@@ -278,7 +278,7 @@ void KgpgKeyInfo::slotChangeDate()
delete dialog;
}
void KgpgKeyInfo::slotDisableKey(const bool &ison)
void KgpgKeyInfo::slotDisableKey(const bool ison)
{
keychange->setDisable(ison);
enableButtonApply(keychange->wasChanged());
......@@ -320,7 +320,7 @@ void KgpgKeyInfo::slotChangeTrust(const int newtrust)
enableButtonApply(keychange->wasChanged());
}
void KgpgKeyInfo::setControlEnable(const bool &b)
void KgpgKeyInfo::setControlEnable(const bool b)
{
m_owtrust->setEnabled(b);
m_disable->setEnabled(b);
......
......@@ -82,14 +82,14 @@ private:
void reloadKey();
void reloadNode();
void displayKey();
void setControlEnable(const bool &b);
void setControlEnable(const bool b);
private slots:
void slotOpenUrl(const QString &url) const;
void slotChangeDate();
void slotDisableKey(const bool &ison);
void slotDisableKey(const bool ison);
void slotChangePass();
void slotInfoPasswordChanged(int result);
......
......@@ -293,12 +293,12 @@ void KeyServer::slotSetExportAttribute(const QString &state)
expattr.clear();
}
void KeyServer::slotEnableProxyI(const bool &on)
void KeyServer::slotEnableProxyI(const bool on)
{
page->kLEproxyI->setEnabled(on);
}
void KeyServer::slotEnableProxyE(const bool &on)
void KeyServer::slotEnableProxyE(const bool on)
{
page->kLEproxyE->setEnabled(on);
}
......
......@@ -93,8 +93,8 @@ public slots:
void slotSetText(const QString &text);
void slotTextChanged(const QString &text);
void slotSetExportAttribute(const QString &attr);
void slotEnableProxyI(const bool &on);
void slotEnableProxyE(const bool &on);
void slotEnableProxyI(const bool on);
void slotEnableProxyE(const bool on);
void slotSetKeyserver(const QString &server);
void transferKeyID();
......
......@@ -45,7 +45,7 @@ void KGpgChangeKey::setExpiration(const QDateTime &date)
m_expiration = date;
}
void KGpgChangeKey::setDisable(const bool &disable)
void KGpgChangeKey::setDisable(const bool disable)
{
m_disable = disable;
}
......@@ -164,7 +164,7 @@ bool KGpgChangeKey::wasChanged()
return false;
}
void KGpgChangeKey::selfdestruct(const bool &applyChanges)
void KGpgChangeKey::selfdestruct(const bool applyChanges)
{
m_autodestroy = true;
......
......@@ -83,7 +83,7 @@ public:
*
* @param disable if the key should become disabled or not
*/
void setDisable(const bool &disable);
void setDisable(const bool disable);
/**
* Cache new owner trust
......@@ -130,7 +130,7 @@ public:
* false and apply() is not running or if no work has to be done the
* object is destroyed the next time the event loop runs.
*/
void selfdestruct(const bool &applyChanges);
void selfdestruct(const bool applyChanges);
/**
* @brief set a new parent widget for the transactions
......
......@@ -25,7 +25,7 @@
using namespace KgpgCore;
GroupEditProxyModel::GroupEditProxyModel(QObject *parent, const bool &invert, QList<KGpgNode *> *ids, const KgpgCore::KgpgKeyTrust mintrust)
GroupEditProxyModel::GroupEditProxyModel(QObject *parent, const bool invert, QList<KGpgNode *> *ids, const KgpgCore::KgpgKeyTrust mintrust)
: QSortFilterProxyModel(parent),
m_model(NULL),
m_invert(invert),
......
......@@ -29,7 +29,7 @@ class KGpgItemModel;
class GroupEditProxyModel: public QSortFilterProxyModel
{
public:
explicit GroupEditProxyModel(QObject * parent, const bool &invert, QList<KGpgNode *> *ids, const KgpgCore::KgpgKeyTrust mintrust = KgpgCore::TRUST_FULL);
explicit GroupEditProxyModel(QObject * parent, const bool invert, QList<KGpgNode *> *ids, const KgpgCore::KgpgKeyTrust mintrust = KgpgCore::TRUST_FULL);
void setKeyModel(KGpgItemModel *);
void setMinTrust(const KgpgCore::KgpgKeyTrust mintrust);
......
......@@ -36,8 +36,8 @@ class KeyListProxyModelPrivate {
public:
KeyListProxyModelPrivate(KeyListProxyModel *parent, const KeyListProxyModel::DisplayMode mode);
bool lessThan(const KGpgNode *left, const KGpgNode *right, const int &column) const;
bool nodeLessThan(const KGpgNode *left, const KGpgNode *right, const int &column) const;
bool lessThan(const KGpgNode *left, const KGpgNode *right, const int column) const;
bool nodeLessThan(const KGpgNode *left, const KGpgNode *right, const int column) const;
KGpgItemModel *m_model;
bool m_onlysecret;
bool m_encryptionKeys;
......@@ -270,7 +270,7 @@ KeyListProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) c
}
bool
KeyListProxyModelPrivate::lessThan(const KGpgNode *left, const KGpgNode *right, const int &column) const
KeyListProxyModelPrivate::lessThan(const KGpgNode *left, const KGpgNode *right, const int column) const
{
const KGpgRootNode * const r = m_model->getRootNode();
Q_ASSERT(r != left);
......@@ -315,7 +315,7 @@ KeyListProxyModelPrivate::lessThan(const KGpgNode *left, const KGpgNode *right,
}
bool
KeyListProxyModelPrivate::nodeLessThan(const KGpgNode *left, const KGpgNode *right, const int &column) const
KeyListProxyModelPrivate::nodeLessThan(const KGpgNode *left, const KGpgNode *right, const int column) const
{
Q_ASSERT(left->getType() == right->getType());
......
......@@ -34,8 +34,8 @@ public:
bool m_validPub; // true when the "pub" line passed to constructor was valid
void addUid(const QString &id);
const QString &getName(const int &index) const;
const QString &getEmail(const int &index) const;
const QString &getName(const int index) const;
const QString &getEmail(const int index) const;
int getUidCount() const;
QString m_fingerprint;
......@@ -99,13 +99,13 @@ SearchResult::addUid(const QString &id)
}
const QString &
SearchResult::getName(const int &index) const
SearchResult::getName(const int index) const
{
return m_names.at(index);
}
const QString &
SearchResult::getEmail(const int &index) const
SearchResult::getEmail(const int index) const
{
return m_emails.at(index);
}
......
......@@ -163,7 +163,7 @@ SelectKeyProxyModel::showUntrusted() const
}
void
SelectKeyProxyModel::setShowUntrusted(const bool &b)
SelectKeyProxyModel::setShowUntrusted(const bool b)
{
m_showUntrusted = b;
invalidate();
......
......@@ -45,7 +45,7 @@ public:
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
bool showUntrusted() const;
void setShowUntrusted(const bool &b);
void setShowUntrusted(const bool b);
protected:
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
......
......@@ -13,7 +13,7 @@
#include "kgpgchangedisable.h"
KGpgChangeDisable::KGpgChangeDisable(QObject *parent, const QString &keyid, const bool &disable)
KGpgChangeDisable::KGpgChangeDisable(QObject *parent, const QString &keyid, const bool disable)
: KGpgEditKeyTransaction(parent, keyid, QString(), false)
{
setDisable(disable);
......
......@@ -26,7 +26,7 @@ class KGpgChangeDisable: public KGpgEditKeyTransaction {
Q_DISABLE_COPY(KGpgChangeDisable)
public:
KGpgChangeDisable(QObject *parent, const QString &keyid, const bool &disable);
KGpgChangeDisable(QObject *parent, const QString &keyid, const bool disable);
virtual ~KGpgChangeDisable();
void setDisable(bool disable);
......
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