diff src/gui/window.cc @ 190:2d5823df870f

dep/animia: finalize de-objc-ifying quartz this also fixes up some... rather dumb mistakes in window.cc :) HG Enter commit message. Lines beginning with 'HG:' are removed.
author Paper <mrpapersonic@gmail.com>
date Wed, 06 Dec 2023 21:26:13 -0500
parents f88eda79c60a
children 975a3f0965e2
line wrap: on
line diff
--- a/src/gui/window.cc	Wed Dec 06 19:42:33 2023 -0500
+++ b/src/gui/window.cc	Wed Dec 06 21:26:13 2023 -0500
@@ -36,6 +36,8 @@
 #include <QToolBar>
 #include <QToolButton>
 
+#include <iostream>
+
 #ifdef MACOSX
 #	include "sys/osx/dark_theme.h"
 #elif defined(WIN32)
@@ -64,7 +66,7 @@
 	setWindowIcon(QIcon(":/favicon.png"));
 
 	main_widget.reset(new QWidget(this));
-	/*QHBoxLayout* layout = */new QHBoxLayout(main_widget.get());
+	new QHBoxLayout(main_widget.get());
 
 	AddMainWidgets();
 
@@ -78,12 +80,12 @@
 
 	thread.reset(new PlayingThread(this));
 
-	QTimer* timer = new QTimer;
+	QTimer* timer = new QTimer(this);
 
 	connect(timer, &QTimer::timeout, this, [this, page] {
 		if (!thread.get() || thread->isRunning())
 			return;
-		connect(thread.get(), &QThread::finished, thread.get(), &QThread::deleteLater);
+
 		connect(thread.get(), &PlayingThread::Done, this, [page](const std::vector<std::string>& files) {
 			for (const auto& file : files) {
 				anitomy::Anitomy anitomy;
@@ -103,7 +105,6 @@
 	});
 
 	timer->start(5000);
-	timer->moveToThread(thread.get());
 }
 
 void MainWindow::AddMainWidgets() {