ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04906
[Merge] lp:~nik90/ubuntu-clock-app/correct-public-slots into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-clock-app/correct-public-slots into lp:ubuntu-clock-app.
Commit message:
Fixes the usage of public slots and Q_INVOKABLE in the Sound and FormatTime class.
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1494756 in Ubuntu Clock App: "[Code] Incorrect use of public slots in the c++ classes"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1494756
For more details, see:
https://code.launchpad.net/~nik90/ubuntu-clock-app/correct-public-slots/+merge/270826
Fixes the usage of public slots and Q_INVOKABLE in the Sound and FormatTime class.
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/correct-public-slots into lp:ubuntu-clock-app.
=== modified file 'backend/modules/Alarm/sound.h'
--- backend/modules/Alarm/sound.h 2015-08-25 15:41:50 +0000
+++ backend/modules/Alarm/sound.h 2015-09-11 14:05:36 +0000
@@ -36,21 +36,20 @@
QString customAlarmSoundDirectory() const;
-public slots:
- void deleteCustomAlarmSound(const QString &soundName);
+ Q_INVOKABLE void deleteCustomAlarmSound(const QString &soundName);
// Function to delete old alarm file sound according to file name from full path.
// It will able to replace sound alarm with new version
- void prepareToAddAlarmSound(const QString &soundPath);
-
- void createCustomAlarmSoundDirectory();
-
- bool isAlarmSoundValid(const QString &soundFileName);
- bool isAlarmSoundValid(const QUrl &soundUrl);
-
- QString getDefaultAlarmSoundPath(const QString &soundFileName) const;
-
- QString getSoundName(const QString &soundPath) const;
+ Q_INVOKABLE void prepareToAddAlarmSound(const QString &soundPath);
+
+ Q_INVOKABLE void createCustomAlarmSoundDirectory();
+
+ Q_INVOKABLE bool isAlarmSoundValid(const QString &soundFileName);
+ Q_INVOKABLE bool isAlarmSoundValid(const QUrl &soundUrl);
+
+ Q_INVOKABLE QString getDefaultAlarmSoundPath(const QString &soundFileName) const;
+
+ Q_INVOKABLE QString getSoundName(const QString &soundPath) const;
private:
QString m_customAlarmDir;
=== modified file 'backend/modules/Stopwatch/formattime.h'
--- backend/modules/Stopwatch/formattime.h 2015-08-26 22:41:34 +0000
+++ backend/modules/Stopwatch/formattime.h 2015-09-11 14:05:36 +0000
@@ -28,11 +28,10 @@
public:
FormatTime(QObject *parent=0);
-public slots:
- QString millisToString(int millis) const;
- QString millisToTimeString(int millis, bool showHours) const;
- QString addZeroPrefix(QString str, int totalLength) const;
- QString lapTimeToString(int millis) const;
+ Q_INVOKABLE QString millisToString(int millis) const;
+ Q_INVOKABLE QString millisToTimeString(int millis, bool showHours) const;
+ Q_INVOKABLE QString addZeroPrefix(QString str, int totalLength) const;
+ Q_INVOKABLE QString lapTimeToString(int millis) const;
};
#endif
=== modified file 'debian/changelog'
--- debian/changelog 2015-09-10 11:10:13 +0000
+++ debian/changelog 2015-09-11 14:05:36 +0000
@@ -6,6 +6,7 @@
* Added sections headers to separate custom and default alarm sounds (LP: #1487735)
* Removed ListItemWithActions upstream component and also fixed the user
world city list count never decreasing to 0. (LP: #1368393)
+ * Fixed incorrect usage of public slots and Q_INVOKABLE in c++ classes (LP: #1494756)
[ Bartosz Kosiorek ]
* Fix wrong time after changing timezone, when stopwatch is running (LP: #1491024)
Follow ups