aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/imageviewer
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-09-07 17:05:47 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-09-08 09:06:53 +0000
commit47886969cc340745a517d76c81b69fd7954fa173 (patch)
tree91875446d6f865510e071ede477b81e5c8aea5ad /src/plugins/imageviewer
parente3ae628584f2434b6cc9210726deafd55769c260 (diff)
Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were capturing "this". Change-Id: I6e006ba6f83d532478018550d148ee93eca59605 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/imageviewer')
-rw-r--r--src/plugins/imageviewer/imageviewerplugin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/imageviewer/imageviewerplugin.cpp b/src/plugins/imageviewer/imageviewerplugin.cpp
index 6d1419da44..6a453eb90e 100644
--- a/src/plugins/imageviewer/imageviewerplugin.cpp
+++ b/src/plugins/imageviewer/imageviewerplugin.cpp
@@ -64,56 +64,56 @@ void ImageViewerPlugin::extensionsInitialized()
{
QAction *a = registerNewAction(Constants::ACTION_ZOOM_IN, tr("Zoom In"),
QKeySequence(tr("Ctrl++")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->zoomIn();
});
a = registerNewAction(Constants::ACTION_ZOOM_OUT, tr("Zoom Out"),
QKeySequence(tr("Ctrl+-")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->zoomOut();
});
a = registerNewAction(Constants::ACTION_ORIGINAL_SIZE, tr("Original Size"),
QKeySequence(Core::UseMacShortcuts ? tr("Meta+0") : tr("Ctrl+0")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->resetToOriginalSize();
});
a = registerNewAction(Constants::ACTION_FIT_TO_SCREEN, tr("Fit to Screen"),
QKeySequence(tr("Ctrl+=")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->fitToScreen();
});
a = registerNewAction(Constants::ACTION_BACKGROUND, tr("Switch Background"),
QKeySequence(tr("Ctrl+[")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->switchViewBackground();
});
a = registerNewAction(Constants::ACTION_OUTLINE, tr("Switch Outline"),
QKeySequence(tr("Ctrl+]")));
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->switchViewOutline();
});
a = registerNewAction(Constants::ACTION_TOGGLE_ANIMATION, tr("Toggle Animation"),
QKeySequence());
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->togglePlay();
});
a = registerNewAction(Constants::ACTION_EXPORT_IMAGE, tr("Export Image"),
QKeySequence());
- connect(a, &QAction::triggered, this, [this]() {
+ connect(a, &QAction::triggered, this, []() {
if (ImageViewer *iv = currentImageViewer())
iv->exportImage();
});