Skip to content

Commit

Permalink
const
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 20, 2023
1 parent e297190 commit 8b89852
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gui/codeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ CodeEditor::CodeEditor(QWidget *parent) :
QShortcut *copyText = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_C),this);
QShortcut *allText = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_A),this);
#else
QShortcut *copyText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_C),this);
QShortcut *allText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_A),this);
const QShortcut *copyText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_C),this);
const QShortcut *allText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_A),this);
#endif

connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int)));
Expand Down
12 changes: 6 additions & 6 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)

//Create an action for the application
QAction *recheckSelectedFiles = new QAction(tr("Recheck"), &menu);
QAction *copy = new QAction(tr("Copy"), &menu);
QAction *hide = new QAction(tr("Hide"), &menu);
const QAction *copy = new QAction(tr("Copy"), &menu);
const QAction *hide = new QAction(tr("Hide"), &menu);
QAction *hideallid = new QAction(tr("Hide all with id"), &menu);
QAction *opencontainingfolder = new QAction(tr("Open containing folder"), &menu);

Expand All @@ -683,7 +683,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
menu.addAction(hide);
menu.addAction(hideallid);

QAction *suppress = new QAction(tr("Suppress selected id(s)"), &menu);
const QAction *suppress = new QAction(tr("Suppress selected id(s)"), &menu);
menu.addAction(suppress);
connect(suppress, &QAction::triggered, this, &ResultsTree::suppressSelectedIds);

Expand All @@ -701,15 +701,15 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
menu.addSeparator();
QMenu *tagMenu = menu.addMenu(tr("Tag"));
{
QAction *action = new QAction(tr("No tag"), tagMenu);
const QAction *action = new QAction(tr("No tag"), tagMenu);
tagMenu->addAction(action);
connect(action, &QAction::triggered, [=]() {
tagSelectedItems(QString());
});
}

for (const QString& tagstr : currentProject->getTags()) {
QAction *action = new QAction(tagstr, tagMenu);
const QAction *action = new QAction(tagstr, tagMenu);
tagMenu->addAction(action);
connect(action, &QAction::triggered, [=]() {
tagSelectedItems(tagstr);
Expand All @@ -725,7 +725,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
mContextItem = mModel.itemFromIndex(index);
if (mContextItem && mApplications->getApplicationCount() > 0 && mContextItem->parent()) {
//Disconnect all signals
for (QAction* action : actions) {
for (const QAction* action : actions) {
disconnect(action, SIGNAL(triggered()), signalMapper, SLOT(map()));
}

Expand Down

0 comments on commit 8b89852

Please sign in to comment.