[vlmc-devel] Core has no reason to be a QObject
Hugo Beauzée-Luyssen
git at videolan.org
Mon Jul 4 15:34:25 CEST 2016
vlmc | branch: medialibrary | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jun 21 16:19:27 2016 +0200| [94d51a4de346e43379b25695a18c83729152e9f3] | committer: Hugo Beauzée-Luyssen
Core has no reason to be a QObject
> https://code.videolan.org/videolan/vlmc/commit/94d51a4de346e43379b25695a18c83729152e9f3
---
src/Main/Core.cpp | 12 ++++++------
src/Main/Core.h | 7 ++-----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/Main/Core.cpp b/src/Main/Core.cpp
index 82cffda..34d98f5 100644
--- a/src/Main/Core.cpp
+++ b/src/Main/Core.cpp
@@ -50,14 +50,14 @@ Core::Core()
m_workflow = new MainWorkflow( m_currentProject->settings() );
m_undoStack = new Commands::AbstractUndoStack;
- connect( m_undoStack, &Commands::AbstractUndoStack::cleanChanged,
+ QObject::connect( m_undoStack, &Commands::AbstractUndoStack::cleanChanged,
m_currentProject, &Project::cleanChanged );
- connect( m_currentProject, &Project::projectSaved,
+ QObject::connect( m_currentProject, &Project::projectSaved,
m_undoStack, &Commands::AbstractUndoStack::setClean );
- connect( m_library, &Library::cleanStateChanged, m_currentProject, &Project::libraryCleanChanged );
- connect( m_currentProject, &Project::projectLoaded, m_recentProjects, &RecentProjects::projectLoaded );
- connect( m_currentProject, &Project::projectClosed, m_library, &Library::clear );
- connect( m_currentProject, &Project::projectClosed, m_workflow, &MainWorkflow::clear );
+ QObject::connect( m_library, &Library::cleanStateChanged, m_currentProject, &Project::libraryCleanChanged );
+ QObject::connect( m_currentProject, &Project::projectLoaded, m_recentProjects, &RecentProjects::projectLoaded );
+ QObject::connect( m_currentProject, &Project::projectClosed, m_library, &Library::clear );
+ QObject::connect( m_currentProject, &Project::projectClosed, m_workflow, &MainWorkflow::clear );
m_timer.start();
}
diff --git a/src/Main/Core.h b/src/Main/Core.h
index 3ecdb79..ed10319 100644
--- a/src/Main/Core.h
+++ b/src/Main/Core.h
@@ -43,13 +43,10 @@ namespace Commands
class AbstractUndoStack;
}
-#include <QObject>
#include <QElapsedTimer>
-class Core : public QObject
+class Core
{
- Q_OBJECT
-
public:
Backend::IBackend* backend();
Settings* settings();
@@ -72,7 +69,7 @@ class Core : public QObject
private:
Core();
- virtual ~Core();
+ ~Core();
void createSettings();
void connectComponents();
More information about the Vlmc-devel
mailing list