src/config/*: mark methods const when possible and semantically sensible

parent eef291c3
......@@ -83,7 +83,7 @@ void Alias_Config::setAliasListView(const QStringList& aliasList)
m_oldAliasList=aliasList;
}
QStringList Alias_Config::currentAliasList()
QStringList Alias_Config::currentAliasList() const
{
QStringList newList;
......
......@@ -42,11 +42,11 @@ class Alias_Config : public QWidget, public KonviSettingsPage, private Ui::Alias
protected:
void setAliasListView(const QStringList& aliasList);
QStringList currentAliasList() const;
bool m_newItemSelected;
QStringList m_oldAliasList;
QStringList currentAliasList();
};
#endif
......@@ -151,7 +151,7 @@ void Autoreplace_Config::restorePageToDefaults()
setAutoreplaceListView(Preferences::defaultAutoreplaceList());
}
QList<QStringList> Autoreplace_Config::currentAutoreplaceList()
QList<QStringList> Autoreplace_Config::currentAutoreplaceList() const
{
// get first item of the autoreplace listview
QTreeWidgetItem* item=patternListView->topLevelItem(0);
......
......@@ -44,11 +44,11 @@ class Autoreplace_Config : public QWidget, public KonviSettingsPage, private Ui:
protected:
void setAutoreplaceListView(const QList<QStringList> &autoreplaceList);
QList<QStringList> currentAutoreplaceList() const;
bool m_newItemSelected;
QList<QStringList> m_oldAutoreplaceList;
QList<QStringList> currentAutoreplaceList();
};
#endif
......@@ -250,7 +250,7 @@ void Highlight_Config::removeHighlight()
updateButtons();
}
QList<Highlight*> Highlight_Config::getHighlightList()
QList<Highlight*> Highlight_Config::getHighlightList() const
{
QList<Highlight*> newList;
......@@ -265,7 +265,7 @@ QList<Highlight*> Highlight_Config::getHighlightList()
return newList;
}
QStringList Highlight_Config::currentHighlightList()
QStringList Highlight_Config::currentHighlightList() const
{
QStringList newList;
......
......@@ -48,9 +48,10 @@ class Highlight_Config : public QWidget, public KonviSettingsPage, private Ui::H
void addHighlight();
void removeHighlight();
void playSound();
QList<Highlight*> getHighlightList(); // prefs format
QStringList currentHighlightList(); // hasChanged() format
protected:
QList<Highlight*> getHighlightList() const; // prefs format
QStringList currentHighlightList() const; // hasChanged() format
void updateButtons();
bool newItemSelected;
......
......@@ -76,7 +76,7 @@ void Ignore_Config::removeIgnore()
emit modified();
}
QList<Ignore*> Ignore_Config::getIgnoreList()
QList<Ignore*> Ignore_Config::getIgnoreList() const
{
QList<Ignore*> newList;
......@@ -92,7 +92,7 @@ QList<Ignore*> Ignore_Config::getIgnoreList()
}
// returns the currently visible ignore list as QStringList to make comparing easy
QStringList Ignore_Config::currentIgnoreList()
QStringList Ignore_Config::currentIgnoreList() const
{
QStringList newList;
......
......@@ -34,8 +34,8 @@ class Ignore_Config : public QWidget, public KonviSettingsPage, private Ui::Igno
private:
QStringList m_oldIgnoreList;
QStringList currentIgnoreList(); // in hasChanged() format
QList<Ignore*> getIgnoreList(); // in prefs format
QStringList currentIgnoreList() const; // in hasChanged() format
QList<Ignore*> getIgnoreList() const; // in prefs format
void updateEnabledness();
public Q_SLOTS:
......
......@@ -60,7 +60,7 @@ void NicklistBehavior_Config::setNickList(const QString &sortingOrder)
}
}
QString NicklistBehavior_Config::currentSortingOrder()
QString NicklistBehavior_Config::currentSortingOrder() const
{
// get the uppermost entry of the sorting list
QTreeWidgetItem* item=sortOrder->topLevelItem(0);
......
......@@ -33,7 +33,7 @@ class NicklistBehavior_Config : public QWidget, public KonviSettingsPage, privat
private:
void setNickList(const QString &sortingOrder);
QString currentSortingOrder();
QString currentSortingOrder() const;
QString m_oldSortingOrder;
......
......@@ -241,7 +241,7 @@ void Warnings_Config::loadSettings()
}
// get a list of checked/unchecked items for hasChanged()
QString Warnings_Config::currentWarningsChecked()
QString Warnings_Config::currentWarningsChecked() const
{
// prepare list
QString newList;
......
......@@ -35,7 +35,7 @@ class Warnings_Config : public QWidget, public KonviSettingsPage, private Ui::Wa
virtual void languageChange();
protected:
QString currentWarningsChecked(); // for hasChanged()
QString currentWarningsChecked() const; // for hasChanged()
QString m_oldWarningsChecked; // for hasChanged()
......
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