[vlmc-devel] Project: cosmetics
Yikai Lu
git at videolan.org
Thu Jun 30 08:35:08 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jun 30 13:53:50 2016 +0900| [82face27e79ff380d201b7a5f40e621139902482] | committer: Yikai Lu
Project: cosmetics
> https://code.videolan.org/videolan/vlmc/commit/82face27e79ff380d201b7a5f40e621139902482
---
src/Project/Project.cpp | 25 +++++++++++++------------
src/Project/Project.h | 6 +++---
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index 38ea36a..e016e0d 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -54,15 +54,15 @@ Project::Project( Settings* settings )
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
"between two automatic save" ), SettingValue::Clamped );
- automaticBackupInterval->setLimits(1, QVariant(QVariant::Invalid));
+ automaticBackupInterval->setLimits( 1, QVariant( QVariant::Invalid ) );
- connect( m_timer, SIGNAL( timeout() ), this, SLOT(autoSaveRequired() ) );
- connect( this, SIGNAL( destroyed() ), m_timer, SLOT( stop() ) );
+ connect( m_timer, &QTimer::timeout, this, &Project::autoSaveRequired );
+ connect( this, &Project::destroyed, m_timer, &QTimer::stop );
- connect( automaticBackup, SIGNAL( changed( QVariant ) ),
- this, SLOT( autoSaveEnabledChanged( QVariant ) ) );
- connect( automaticBackupInterval, SIGNAL( changed( QVariant ) ), this,
- SLOT( autoSaveIntervalChanged( QVariant ) ) );
+ connect( automaticBackup, &SettingValue::changed,
+ this, &Project::autoSaveEnabledChanged );
+ connect( automaticBackupInterval, &SettingValue::changed,
+ this, &Project::autoSaveIntervalChanged );
}
Project::~Project()
@@ -320,7 +320,8 @@ Project::nbChannels() const
return m_settings->value( "audio/NbChannels" )->get().toUInt();
}
-QFile* Project::emergencyBackupFile()
+QFile*
+Project::emergencyBackupFile()
{
const QString lastProject = Core::instance()->settings()->value( "private/EmergencyBackup" )->get().toString();
if ( lastProject.isEmpty() == true )
@@ -338,7 +339,7 @@ Project::cleanChanged( bool val )
}
void
-Project::libraryCleanChanged(bool val)
+Project::libraryCleanChanged( bool val )
{
Q_ASSERT( m_libraryCleanState != val);
m_libraryCleanState = val;
@@ -346,7 +347,7 @@ Project::libraryCleanChanged(bool val)
}
void
-Project::projectNameChanged(const QVariant &projectName)
+Project::projectNameChanged( const QVariant& projectName )
{
emit projectNameChanged( projectName.toString() );
}
@@ -361,7 +362,7 @@ Project::autoSaveRequired()
void
-Project::autoSaveEnabledChanged(const QVariant &enabled)
+Project::autoSaveEnabledChanged( const QVariant& enabled )
{
if ( enabled.toBool() == true )
{
@@ -373,7 +374,7 @@ Project::autoSaveEnabledChanged(const QVariant &enabled)
}
void
-Project::autoSaveIntervalChanged(const QVariant &interval)
+Project::autoSaveIntervalChanged( const QVariant& interval )
{
bool enabled = Core::instance()->settings()->value( "vlmc/AutomaticBackup" )->get().toBool();
diff --git a/src/Project/Project.h b/src/Project/Project.h
index c4959f4..f69c72c 100644
--- a/src/Project/Project.h
+++ b/src/Project/Project.h
@@ -51,7 +51,7 @@ class Project : public QObject
virtual ~Project();
void save();
- void saveAs(const QString& fileName);
+ void saveAs( const QString& fileName );
void newProject( const QString& projectName, const QString& projectFilePath );
/**
* @brief Check for a project backup file, and load the appropriate file,
@@ -59,7 +59,7 @@ class Project : public QObject
* @param fileName The path of the project file to load. This is expected to be
* an absolute file path.
*/
- bool load(const QString& path);
+ bool load( const QString& path );
void emergencyBackup();
bool isClean() const;
void closeProject();
@@ -91,7 +91,7 @@ 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 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