diff src/gui/window.cpp @ 63:3d2decf093bb

*: fix many clang warnings
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:39:47 -0400
parents 4c6dd5999b39
children fe719c109dbc
line wrap: on
line diff
--- a/src/gui/window.cpp	Sun Oct 01 06:16:06 2023 -0400
+++ b/src/gui/window.cpp	Sun Oct 01 06:39:47 2023 -0400
@@ -13,16 +13,16 @@
 #include "gui/pages/torrents.h"
 #include "gui/widgets/sidebar.h"
 #include "services/services.h"
+#include <QActionGroup>
 #include <QApplication>
 #include <QFile>
 #include <QMainWindow>
 #include <QMenuBar>
+#include <QMessageBox>
 #include <QPlainTextEdit>
 #include <QStackedWidget>
+#include <QTextStream>
 #include <QTimer>
-#include <QActionGroup>
-#include <QMessageBox>
-#include <QTextStream>
 #if MACOSX
 #	include "sys/osx/dark_theme.h"
 #elif defined(WIN32)
@@ -91,7 +91,7 @@
 	action = menu->addAction(tr("E&xit"), qApp, &QApplication::quit);
 
 	menu = menubar->addMenu(tr("&Services"));
-	action = menu->addAction(tr("Synchronize &list"), [this, stack] {
+	action = menu->addAction(tr("Synchronize &list"), [stack] {
 		Services::Synchronize();
 		((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh();
 	});
@@ -171,13 +171,11 @@
 	action->setCheckable(true);
 	page_to_index_map[action] = 6;
 
-	connect(sidebar, &SideBar::CurrentItemChanged, this, [pages_group](int index){
-		pages_group->actions()[index]->setChecked(true);
-	});
+	connect(sidebar, &SideBar::CurrentItemChanged, this,
+	        [pages_group](int index) { pages_group->actions()[index]->setChecked(true); });
 
-	connect(pages_group, &QActionGroup::triggered, this, [page_to_index_map, sidebar](QAction* action) {
-		sidebar->SetCurrentItem(page_to_index_map.at(action));
-	});
+	connect(pages_group, &QActionGroup::triggered, this,
+	        [page_to_index_map, sidebar](QAction* action) { sidebar->SetCurrentItem(page_to_index_map.at(action)); });
 
 	menu->addSeparator();
 	menu->addAction(tr("Show sidebar"));