← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~mzanetti/reminders-app/fix-compile-warnings into lp:reminders-app

 

Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/fix-compile-warnings into lp:reminders-app.

Commit message:
fix compile warnings

Requested reviews:
  Ubuntu Reminders app developers (reminders-app-dev)

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/fix-compile-warnings/+merge/251825
-- 
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/fix-compile-warnings into lp:reminders-app.
=== modified file '3rdParty/libthrift/concurrency/PosixThreadFactory.cpp'
--- 3rdParty/libthrift/concurrency/PosixThreadFactory.cpp	2015-02-26 00:59:08 +0000
+++ 3rdParty/libthrift/concurrency/PosixThreadFactory.cpp	2015-03-04 20:57:31 +0000
@@ -248,7 +248,11 @@
    * then pro-rate accordingly.
    */
   static int toPthreadPriority(POLICY policy, PRIORITY priority) {
+#if defined HAVE_SCHED_GET_PRIORITY_MIN || defined HAVE_SCHED_GET_PRIORITY_MAX
     int pthread_policy = toPthreadPolicy(policy);
+#else
+    (void) policy;
+#endif
     int min_priority = 0;
     int max_priority = 0;
 #ifdef HAVE_SCHED_GET_PRIORITY_MIN

=== modified file 'src/libqtevernote/note.cpp'
--- src/libqtevernote/note.cpp	2015-02-28 00:45:09 +0000
+++ src/libqtevernote/note.cpp	2015-03-04 20:57:31 +0000
@@ -34,15 +34,15 @@
 
 Note::Note(const QString &guid, quint32 updateSequenceNumber, QObject *parent) :
     QObject(parent),
+    m_deleted(false),
     m_isSearchResult(false),
-    m_deleted(false),
     m_updateSequenceNumber(updateSequenceNumber),
     m_loading(false),
     m_loadingHighPriority(false),
     m_loaded(false),
+    m_needsContentSync(false),
     m_syncError(false),
-    m_conflicting(false),
-    m_needsContentSync(false)
+    m_conflicting(false)
 {
     setGuid(guid);
     m_cacheFile.setFileName(NotesStore::instance()->storageLocation() + "note-" + guid + ".enml");
@@ -451,12 +451,12 @@
     }
 }
 
-quint32 Note::updateSequenceNumber() const
+qint32 Note::updateSequenceNumber() const
 {
     return m_updateSequenceNumber;
 }
 
-void Note::setUpdateSequenceNumber(quint32 updateSequenceNumber)
+void Note::setUpdateSequenceNumber(qint32 updateSequenceNumber)
 {
     if (m_updateSequenceNumber != updateSequenceNumber) {
         m_updateSequenceNumber = updateSequenceNumber;
@@ -469,12 +469,12 @@
     }
 }
 
-quint32 Note::lastSyncedSequenceNumber() const
+qint32 Note::lastSyncedSequenceNumber() const
 {
     return m_lastSyncedSequenceNumber;
 }
 
-void Note::setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber)
+void Note::setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber)
 {
     if (m_lastSyncedSequenceNumber != lastSyncedSequenceNumber) {
         m_lastSyncedSequenceNumber = lastSyncedSequenceNumber;

=== modified file 'src/libqtevernote/note.h'
--- src/libqtevernote/note.h	2015-02-27 22:15:02 +0000
+++ src/libqtevernote/note.h	2015-03-04 20:57:31 +0000
@@ -138,8 +138,8 @@
     bool isSearchResult() const;
     void setIsSearchResult(bool isSearchResult);
 
-    quint32 updateSequenceNumber() const;
-    quint32 lastSyncedSequenceNumber() const;
+    qint32 updateSequenceNumber() const;
+    qint32 lastSyncedSequenceNumber() const;
 
     bool isCached() const;
     bool loaded() const;
@@ -198,8 +198,8 @@
     void syncToCacheFile();
     void syncToInfoFile();
     void deleteFromCache();
-    void setUpdateSequenceNumber(quint32 updateSequenceNumber);
-    void setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber);
+    void setUpdateSequenceNumber(qint32 updateSequenceNumber);
+    void setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber);
     void setConflicting(bool conflicting);
 
     // const because we want to load on demand in getters. Keep this private!
@@ -221,8 +221,8 @@
     bool m_deleted;
     bool m_isSearchResult;
     QHash<QString, Resource*> m_resources;
-    quint32 m_updateSequenceNumber;
-    quint32 m_lastSyncedSequenceNumber;
+    qint32 m_updateSequenceNumber;
+    qint32 m_lastSyncedSequenceNumber;
     mutable QFile m_cacheFile;
     QString m_infoFile;
 

=== modified file 'src/libqtevernote/notebook.cpp'
--- src/libqtevernote/notebook.cpp	2015-03-04 00:23:45 +0000
+++ src/libqtevernote/notebook.cpp	2015-03-04 20:57:31 +0000
@@ -258,12 +258,12 @@
     return m_syncError;
 }
 
-quint32 Notebook::updateSequenceNumber() const
+qint32 Notebook::updateSequenceNumber() const
 {
     return m_updateSequenceNumber;
 }
 
-void Notebook::setUpdateSequenceNumber(quint32 updateSequenceNumber)
+void Notebook::setUpdateSequenceNumber(qint32 updateSequenceNumber)
 {
     if (m_updateSequenceNumber != updateSequenceNumber) {
         m_updateSequenceNumber = updateSequenceNumber;
@@ -273,12 +273,12 @@
     }
 }
 
-quint32 Notebook::lastSyncedSequenceNumber() const
+qint32 Notebook::lastSyncedSequenceNumber() const
 {
     return m_lastSyncedSequenceNumber;
 }
 
-void Notebook::setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber)
+void Notebook::setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber)
 {
     if (m_lastSyncedSequenceNumber != lastSyncedSequenceNumber) {
         m_lastSyncedSequenceNumber = lastSyncedSequenceNumber;

=== modified file 'src/libqtevernote/notebook.h'
--- src/libqtevernote/notebook.h	2015-03-04 00:23:45 +0000
+++ src/libqtevernote/notebook.h	2015-03-04 20:57:31 +0000
@@ -65,8 +65,8 @@
     bool isDefaultNotebook() const;
     void setIsDefaultNotebook(bool isDefaultNotebook);
 
-    quint32 updateSequenceNumber() const;
-    quint32 lastSyncedSequenceNumber() const;
+    qint32 updateSequenceNumber() const;
+    qint32 lastSyncedSequenceNumber() const;
 
     bool loading() const;
     bool synced() const;
@@ -99,15 +99,15 @@
 
     void setLoading(bool loading);
     void setSyncError(bool syncError);
-    void setUpdateSequenceNumber(quint32 updateSequenceNumber);
-    void setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber);
+    void setUpdateSequenceNumber(qint32 updateSequenceNumber);
+    void setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber);
 
     void syncToInfoFile();
     void deleteInfoFile();
 
 private:
-    quint32 m_updateSequenceNumber;
-    quint32 m_lastSyncedSequenceNumber;
+    qint32 m_updateSequenceNumber;
+    qint32 m_lastSyncedSequenceNumber;
     QString m_guid;
     QString m_name;
     bool m_published;

=== modified file 'src/libqtevernote/notesstore.cpp'
--- src/libqtevernote/notesstore.cpp	2015-03-04 00:23:45 +0000
+++ src/libqtevernote/notesstore.cpp	2015-03-04 20:57:31 +0000
@@ -272,7 +272,9 @@
 
 void NotesStore::createNotebook(const QString &name)
 {
-    Notebook *notebook = new Notebook(QUuid::createUuid().toString().remove(QRegExp("[\{\}]*")), 1, this);
+    QString newGuid = QUuid::createUuid().toString();
+    newGuid.remove("{").remove("}");
+    Notebook *notebook = new Notebook(newGuid, 1, this);
     notebook->setName(name);
     if (m_notebooks.isEmpty()) {
         notebook->setIsDefaultNotebook(true);
@@ -469,7 +471,9 @@
 
 Tag* NotesStore::createTag(const QString &name)
 {
-    Tag *tag = new Tag(QUuid::createUuid().toString().remove(QRegExp("[\{\}]*")), 1);
+    QString newGuid = QUuid::createUuid().toString();
+    newGuid.remove("{").remove("}");
+    Tag *tag = new Tag(newGuid, 1, this);
     tag->setName(name);
     m_tags.append(tag);
     m_tagsHash.insert(tag->guid(), tag);
@@ -1132,7 +1136,9 @@
 
 Note* NotesStore::createNote(const QString &title, const QString &notebookGuid, const EnmlDocument &content)
 {
-    Note *note = new Note(QUuid::createUuid().toString().remove(QRegExp("[\{\}]*")), 1, this);
+    QString newGuid = QUuid::createUuid().toString();
+    newGuid.remove("{").remove("}");
+    Note *note = new Note(newGuid, 1, this);
     connect(note, &Note::reminderChanged, this, &NotesStore::emitDataChanged);
     connect(note, &Note::reminderDoneChanged, this, &NotesStore::emitDataChanged);
 

=== modified file 'src/libqtevernote/tag.cpp'
--- src/libqtevernote/tag.cpp	2015-03-04 00:23:45 +0000
+++ src/libqtevernote/tag.cpp	2015-03-04 20:57:31 +0000
@@ -77,12 +77,12 @@
     emit guidChanged();
 }
 
-quint32 Tag::updateSequenceNumber() const
+qint32 Tag::updateSequenceNumber() const
 {
     return m_updateSequenceNumber;
 }
 
-void Tag::setUpdateSequenceNumber(quint32 updateSequenceNumber)
+void Tag::setUpdateSequenceNumber(qint32 updateSequenceNumber)
 {
     if (m_updateSequenceNumber != updateSequenceNumber) {
         m_updateSequenceNumber = updateSequenceNumber;
@@ -92,12 +92,12 @@
     }
 }
 
-quint32 Tag::lastSyncedSequenceNumber() const
+qint32 Tag::lastSyncedSequenceNumber() const
 {
     return m_lastSyncedSequenceNumber;
 }
 
-void Tag::setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber)
+void Tag::setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber)
 {
     if (m_lastSyncedSequenceNumber != lastSyncedSequenceNumber) {
         m_lastSyncedSequenceNumber = lastSyncedSequenceNumber;

=== modified file 'src/libqtevernote/tag.h'
--- src/libqtevernote/tag.h	2015-03-04 00:23:45 +0000
+++ src/libqtevernote/tag.h	2015-03-04 20:57:31 +0000
@@ -52,10 +52,10 @@
     QString guid() const;
     void setGuid(const QString &guid);
 
-    quint32 updateSequenceNumber() const;
-    void setUpdateSequenceNumber(quint32 updateSequenceNumber);
+    qint32 updateSequenceNumber() const;
+    void setUpdateSequenceNumber(qint32 updateSequenceNumber);
 
-    quint32 lastSyncedSequenceNumber() const;
+    qint32 lastSyncedSequenceNumber() const;
 
     QString name() const;
     void setName(const QString &guid);
@@ -86,13 +86,13 @@
 private:
     void syncToInfoFile();
     void deleteInfoFile();
-    void setLastSyncedSequenceNumber(quint32 lastSyncedSequenceNumber);
+    void setLastSyncedSequenceNumber(qint32 lastSyncedSequenceNumber);
     void setLoading(bool loading);
     void setSyncError(bool syncError);
 
 private:
-    quint32 m_updateSequenceNumber;
-    quint32 m_lastSyncedSequenceNumber;
+    qint32 m_updateSequenceNumber;
+    qint32 m_lastSyncedSequenceNumber;
     QString m_guid;
     QString m_name;