Commit 5cfe618d authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Fix clang-tidy make-member-functions-static

parent bcfc2d4f
......@@ -157,7 +157,7 @@ void KateExternalToolsPlugin::removeTools(const std::vector<KateExternalTool *>
m_tools.erase(it, m_tools.end());
}
void KateExternalToolsPlugin::save(KateExternalTool *tool, const QString &oldName) const
void KateExternalToolsPlugin::save(KateExternalTool *tool, const QString &oldName)
{
const QString name = KateExternalTool::configFileName(tool->name);
KConfig config(toolsConfigDir() + name);
......
......@@ -136,7 +136,7 @@ public:
* was changed, and after saving the config (to a new file based on the
* new name), the old config file is removed.
*/
void save(KateExternalTool *tool, const QString &oldName) const;
static void save(KateExternalTool *tool, const QString &oldName);
private:
void migrateConfig();
......
......@@ -71,7 +71,7 @@ public Q_SLOTS:
{
setDir(QUrl(url));
}
void selectorViewChanged(QAbstractItemView *);
static void selectorViewChanged(QAbstractItemView *);
private Q_SLOTS:
void fileSelected(const KFileItem & /*file*/);
......
......@@ -685,7 +685,7 @@ bool KateFileTreeModel::hasChildren(const QModelIndex &parent) const
return item->childCount() > 0;
}
bool KateFileTreeModel::isDir(const QModelIndex &index) const
bool KateFileTreeModel::isDir(const QModelIndex &index)
{
if (!index.isValid()) {
return true;
......@@ -1008,7 +1008,7 @@ ProxyItemDir *KateFileTreeModel::findRootNode(const QString &name, const int r)
return nullptr;
}
ProxyItemDir *KateFileTreeModel::findChildNode(const ProxyItemDir *parent, const QString &name) const
ProxyItemDir *KateFileTreeModel::findChildNode(const ProxyItemDir *parent, const QString &name)
{
Q_ASSERT(parent != nullptr);
Q_ASSERT(!name.isEmpty());
......@@ -1267,7 +1267,7 @@ void KateFileTreeModel::handleNameChange(ProxyItem *item)
handleInsert(item);
}
void KateFileTreeModel::updateItemPathAndHost(ProxyItem *item) const
void KateFileTreeModel::updateItemPathAndHost(ProxyItem *item)
{
const KTextEditor::Document *doc = item->doc();
Q_ASSERT(doc); // this method should not be called at directory items
......@@ -1294,7 +1294,7 @@ void KateFileTreeModel::updateItemPathAndHost(ProxyItem *item) const
item->setHost(host);
}
void KateFileTreeModel::setupIcon(ProxyItem *item) const
void KateFileTreeModel::setupIcon(ProxyItem *item)
{
Q_ASSERT(item != nullptr);
......
......@@ -51,7 +51,7 @@ public:
/* extra api for view */
QModelIndex docIndex(const KTextEditor::Document *) const;
bool isDir(const QModelIndex &index) const;
static bool isDir(const QModelIndex &index);
bool listMode() const;
void setListMode(bool);
......@@ -83,13 +83,13 @@ Q_SIGNALS:
private:
ProxyItemDir *findRootNode(const QString &name, const int r = 1) const;
ProxyItemDir *findChildNode(const ProxyItemDir *parent, const QString &name) const;
static ProxyItemDir *findChildNode(const ProxyItemDir *parent, const QString &name);
void insertItemInto(ProxyItemDir *root, ProxyItem *item, bool move = false, ProxyItemDir **moveDest = nullptr);
void handleInsert(ProxyItem *item);
void handleNameChange(ProxyItem *item);
void handleEmptyParents(ProxyItemDir *item);
void setupIcon(ProxyItem *item) const;
void updateItemPathAndHost(ProxyItem *item) const;
static void setupIcon(ProxyItem *item);
static void updateItemPathAndHost(ProxyItem *item);
void handleDuplicitRootDisplay(ProxyItemDir *item);
void updateBackgrounds(bool force = false);
......
......@@ -26,7 +26,7 @@ public:
void setConfigs(const QStringList &cfgs);
private:
void setComboText(QComboBox *combo, const QString &str);
static void setComboText(QComboBox *combo, const QString &str);
private Q_SLOTS:
void slotBrowseGDB();
......
......@@ -52,7 +52,7 @@ public Q_SLOTS:
void slotQueryLocals(bool display);
private Q_SLOTS:
void slotError();
static void slotError();
void slotReadDebugStdOut();
void slotReadDebugStdErr();
void slotDebugFinished(int exitCode, QProcess::ExitStatus status);
......
......@@ -48,7 +48,7 @@ Q_SIGNALS:
private:
void createFifos();
QString createFifo(const QString &prefix);
static QString createFifo(const QString &prefix);
QTextEdit *m_output;
QLineEdit *m_input;
......
......@@ -23,7 +23,7 @@ int GotoGlobalSymbolModel::rowCount(const QModelIndex &) const
return m_rows.size();
}
QString GotoGlobalSymbolModel::filterName(QString tagName) const
QString GotoGlobalSymbolModel::filterName(QString tagName)
{
// remove anon namespace
int __anonIdx = tagName.indexOf(QStringLiteral("__anon"));
......
......@@ -30,7 +30,7 @@ public:
/**
* @brief removes useless symbols like anon namespace etc for better UI
*/
QString filterName(QString tagName) const;
static QString filterName(QString tagName);
void setSymbolsData(Tags::TagList rows)
{
......
......@@ -55,7 +55,7 @@ private Q_SLOTS:
void slotItemExpanded(QTreeWidgetItem *item);
private:
void deleteChildren(QTreeWidgetItem *item);
static void deleteChildren(QTreeWidgetItem *item);
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
bool isConnectionValidAndOpen();
......
......@@ -26,7 +26,7 @@ public:
ConnectionModel *connectionModel();
void createConnection(const Connection &conn);
bool testConnection(const Connection &conn, QSqlError &error);
static bool testConnection(const Connection &conn, QSqlError &error);
bool isValidAndOpen(const QString &connection);
KWallet::Wallet *openWallet();
......@@ -44,7 +44,7 @@ public Q_SLOTS:
void runQuery(const QString &text, const QString &connection);
protected:
void saveConnection(KConfigGroup *connectionsGroup, const Connection &conn);
static void saveConnection(KConfigGroup *connectionsGroup, const Connection &conn);
Q_SIGNALS:
void connectionCreated(const QString &name);
......
......@@ -180,7 +180,7 @@ private Q_SLOTS:
/**
* Handle that shortcuts are not eaten by console
*/
void overrideShortcut(QKeyEvent *event, bool &override);
static void overrideShortcut(QKeyEvent *event, bool &override);
/**
* hide terminal on Esc key press
......@@ -247,6 +247,6 @@ private Q_SLOTS:
/**
* Enable the warning dialog for the next "Run in terminal"
*/
void slotEnableRunWarning();
static void slotEnableRunWarning();
};
#endif
......@@ -18,7 +18,7 @@ class LatexCompletionTableTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testSorting()
static void testSorting()
{
for (int i = 0; i < n_completions - 1; ++i) {
QVERIFY(std::char_traits<char16_t>::compare(completiontable[i].completion,
......
......@@ -1300,7 +1300,7 @@ public:
});
}
QModelIndex getPrimaryModelIndex(QModelIndex index)
static QModelIndex getPrimaryModelIndex(QModelIndex index)
{
// in case of a multiline diagnostics item, a split secondary line has no data set
// so we need to go up to the primary parent item
......@@ -1633,7 +1633,7 @@ public:
}
};
void
static void
fillItemRoles(QStandardItem *item, const QUrl &url, const LSPRange _range, RangeData::KindEnum kind, const LSPClientRevisionSnapshot *snapshot = nullptr)
{
auto range = snapshot ? transformRange(url, *snapshot, _range) : _range;
......@@ -1992,7 +1992,7 @@ public:
}
}
void applyEdits(KTextEditor::Document *doc, const LSPClientRevisionSnapshot *snapshot, const QList<LSPTextEdit> &edits)
static void applyEdits(KTextEditor::Document *doc, const LSPClientRevisionSnapshot *snapshot, const QList<LSPTextEdit> &edits)
{
::applyEdits(doc, snapshot, edits);
}
......
......@@ -95,7 +95,7 @@ private:
void updatePreview();
void showAboutKPartPlugin();
void clearMenu();
std::optional<KPluginMetaData> findPreviewPart(const QStringList mimeTypes);
static std::optional<KPluginMetaData> findPreviewPart(const QStringList mimeTypes);
private:
KToggleAction *m_lockAction;
......
......@@ -129,7 +129,7 @@ class StatusProxyModel : public QSortFilterProxyModel
public:
using QSortFilterProxyModel::QSortFilterProxyModel;
bool isTopLevel(const QModelIndex &idx) const
static bool isTopLevel(const QModelIndex &idx)
{
return !idx.isValid();
}
......
......@@ -63,7 +63,7 @@ private Q_SLOTS:
/**
* Handle that shortcuts are not eaten by console
*/
void overrideShortcut(QKeyEvent *event, bool &override);
static void overrideShortcut(QKeyEvent *event, bool &override);
protected:
/**
......
......@@ -189,8 +189,8 @@ private:
void readConfig();
void writeConfig();
void registerVariables();
void unregisterVariables();
static void registerVariables();
static void unregisterVariables();
private:
/**
......
......@@ -300,7 +300,7 @@ private Q_SLOTS:
/**
* Show projects To-Dos and Fix-mes
*/
void showProjectTodos();
static void showProjectTodos();
/**
* Enable/disable project actions
......
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