[vlmc-devel] [PATCH 2/3] Fix misconnection between projectUpdated(QVariant) and projectUpdated(QString)
Yikai Lu
luyikei.qmltu at gmail.com
Tue Mar 8 06:17:33 CET 2016
I fix this by creating a proxy slot.
---
src/Project/Project.cpp | 7 ++++++-
src/Project/Project.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index fc9fda5..1c3d4ab 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -216,7 +216,7 @@ Project::initSettings()
QT_TRANSLATE_NOOP( "PreferenceWidget", "Project name" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ),
SettingValue::NotEmpty );
- connect( pName, SIGNAL( changed( QVariant ) ), this, SIGNAL( projectUpdated( QVariant ) ) );
+ connect( pName, SIGNAL( changed( QVariant ) ), this, SLOT( projectUpdated( QVariant ) ) );
}
void
@@ -314,6 +314,11 @@ Project::libraryCleanChanged(bool val)
emit cleanStateChanged( val );
}
+void Project::projectUpdated(const QVariant &projectName)
+{
+ emit projectUpdated( projectName.toString() );
+}
+
void
Project::autoSaveRequired()
{
diff --git a/src/Project/Project.h b/src/Project/Project.h
index 3d53d05..42c0db7 100644
--- a/src/Project/Project.h
+++ b/src/Project/Project.h
@@ -84,6 +84,7 @@ class Project : public QObject
public slots:
void cleanChanged( bool val );
void libraryCleanChanged( bool val );
+ void projectUpdated( const QVariant& projectName); // Proxy slot for projectUpdated(QString)
void autoSaveRequired();
void autoSaveEnabledChanged( const QVariant& enabled );
void autoSaveIntervalChanged( const QVariant& interval );
--
1.9.1
More information about the Vlmc-devel
mailing list