[vlmc-devel] MainWindow: Use Qt5 connections for Project
Yikai Lu
git at videolan.org
Tue Aug 23 18:01:09 CEST 2016
vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 22 20:22:44 2016 -0500| [aab27d34daa11bdf1ef9c934cfc4a21ed43c0dee] | committer: Hugo Beauzée-Luyssen
MainWindow: Use Qt5 connections for Project
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/aab27d34daa11bdf1ef9c934cfc4a21ed43c0dee
---
src/Gui/MainWindow.cpp | 16 ++++++++--------
src/Project/Project.cpp | 6 ------
src/Project/Project.h | 1 -
3 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 4181a09..0f90e94 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -92,14 +92,14 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
setupCrashTester();
#endif
- connect( Core::instance()->project(), SIGNAL( projectNameChanged(QString) ),
- this, SLOT( projectNameChanged( QString ) ) );
- connect( Core::instance()->project(), SIGNAL( outdatedBackupFileFound() ),
- this, SLOT( onOudatedBackupFile() ) );
- connect( Core::instance()->project(), SIGNAL( backupProjectLoaded() ),
- this, SLOT( onBackupFileLoaded() ) );
- connect( Core::instance()->project(), SIGNAL( projectSaved() ),
- this, SLOT( onProjectSaved() ) );
+ connect( Core::instance()->project(), &Project::projectNameChanged,
+ this, &MainWindow::projectNameChanged );
+ connect( Core::instance()->project(), &Project::outdatedBackupFileFound,
+ this, &MainWindow::onOudatedBackupFile );
+ connect( Core::instance()->project(), &Project::backupProjectLoaded,
+ this, &MainWindow::onBackupFileLoaded );
+ connect( Core::instance()->project(), &Project::projectSaved,
+ this, &MainWindow::onProjectSaved );
connect( Core::instance()->project(), &Project::cleanStateChanged,
this, &MainWindow::cleanStateChanged );
diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index e21a588..382856f 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -352,12 +352,6 @@ Project::libraryCleanChanged( bool val )
}
void
-Project::projectNameChanged( const QVariant& projectName )
-{
- emit projectNameChanged( projectName.toString() );
-}
-
-void
Project::autoSaveRequired()
{
if ( m_projectFile == nullptr )
diff --git a/src/Project/Project.h b/src/Project/Project.h
index 09d9797..0481ae4 100644
--- a/src/Project/Project.h
+++ b/src/Project/Project.h
@@ -91,7 +91,6 @@ class Project : public QObject
public slots:
void cleanChanged( bool val );
void libraryCleanChanged( bool val );
- void projectNameChanged( const QVariant& projectName ); // Proxy slot for projectNameChanged(QString)
void autoSaveRequired();
void autoSaveEnabledChanged( const QVariant& enabled );
void autoSaveIntervalChanged( const QVariant& interval );
More information about the Vlmc-devel
mailing list