src/main.cpp

changeset 200
ca23936b455b
parent 158
5bd755eaa5a8
child 201
5d201ee4a9c3
--- a/src/main.cpp	Wed May 25 20:36:34 2022 +0300
+++ b/src/main.cpp	Mon Jun 06 22:01:22 2022 +0300
@@ -19,30 +19,21 @@
 #include <QApplication>
 #include "mainwindow.h"
 #include "version.h"
-#include <iostream>
-#include <QMessageBox>
-#include <QLabel>
-#include <QImageReader>
-#include <QPushButton>
 
-int main(int argc, char *argv[])
+static void doQtRegistrations()
 {
 	QCoreApplication::setApplicationName(::appName);
 	QCoreApplication::setOrganizationName("hecknology.net");
 	QCoreApplication::setOrganizationDomain("hecknology.net");
-	::qRegisterMetaTypeStreamOperators<Library>("Library");
-	::qRegisterMetaTypeStreamOperators<Libraries>("Libraries");
+	qRegisterMetaTypeStreamOperators<Library>("Library");
+	qRegisterMetaTypeStreamOperators<Libraries>("Libraries");
+}
+
+int main(int argc, char *argv[])
+{
+	doQtRegistrations();
 	QApplication app{argc, argv};
 	MainWindow mainwindow;
 	mainwindow.show();
 	return app.exec();
 }
-
-QDataStream& operator<<(QDataStream& stream, const glm::vec3& vec)
-{
-	return stream << vec.x << vec.y << vec.z;
-}
-QDataStream& operator>>(QDataStream& stream, glm::vec3& vec)
-{
-	return stream >> vec.x >> vec.y >> vec.z;
-}

mercurial