1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Use 4-arg connect with labmdas

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-06-15 12:30:29 +02:00
parent 2d8b79bc3e
commit abcd1c9415
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -136,19 +136,19 @@ SiteInfo::SiteInfo(WebView *view)
auto *shortcutTagsCopyAll = new QShortcut(QKeySequence(QSL("Ctrl+C")), ui->treeTags); auto *shortcutTagsCopyAll = new QShortcut(QKeySequence(QSL("Ctrl+C")), ui->treeTags);
shortcutTagsCopyAll->setContext(Qt::WidgetShortcut); shortcutTagsCopyAll->setContext(Qt::WidgetShortcut);
connect(shortcutTagsCopyAll, &QShortcut::activated, [=]{copySelectedItems(ui->treeTags, false);}); connect(shortcutTagsCopyAll, &QShortcut::activated, this, [=]{copySelectedItems(ui->treeTags, false);});
auto *shortcutTagsCopyValues = new QShortcut(QKeySequence(QSL("Ctrl+Shift+C")), ui->treeTags); auto *shortcutTagsCopyValues = new QShortcut(QKeySequence(QSL("Ctrl+Shift+C")), ui->treeTags);
shortcutTagsCopyValues->setContext(Qt::WidgetShortcut); shortcutTagsCopyValues->setContext(Qt::WidgetShortcut);
connect(shortcutTagsCopyValues, &QShortcut::activated, [=]{copySelectedItems(ui->treeTags, true);}); connect(shortcutTagsCopyValues, &QShortcut::activated, this, [=]{copySelectedItems(ui->treeTags, true);});
auto *shortcutImagesCopyAll = new QShortcut(QKeySequence(QSL("Ctrl+C")), ui->treeImages); auto *shortcutImagesCopyAll = new QShortcut(QKeySequence(QSL("Ctrl+C")), ui->treeImages);
shortcutImagesCopyAll->setContext(Qt::WidgetShortcut); shortcutImagesCopyAll->setContext(Qt::WidgetShortcut);
connect(shortcutImagesCopyAll, &QShortcut::activated, [=]{copySelectedItems(ui->treeImages, false);}); connect(shortcutImagesCopyAll, &QShortcut::activated, this, [=]{copySelectedItems(ui->treeImages, false);});
auto *shortcutImagesCopyValues = new QShortcut(QKeySequence(QSL("Ctrl+Shift+C")), ui->treeImages); auto *shortcutImagesCopyValues = new QShortcut(QKeySequence(QSL("Ctrl+Shift+C")), ui->treeImages);
shortcutImagesCopyValues->setContext(Qt::WidgetShortcut); shortcutImagesCopyValues->setContext(Qt::WidgetShortcut);
connect(shortcutImagesCopyValues, &QShortcut::activated, [=]{copySelectedItems(ui->treeImages, true);}); connect(shortcutImagesCopyValues, &QShortcut::activated, this, [=]{copySelectedItems(ui->treeImages, true);});
ui->treeImages->setContextMenuPolicy(Qt::CustomContextMenu); ui->treeImages->setContextMenuPolicy(Qt::CustomContextMenu);
ui->treeImages->sortByColumn(-1, Qt::AscendingOrder); ui->treeImages->sortByColumn(-1, Qt::AscendingOrder);