1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
Laurent Cozic 2016-12-29 21:51:10 +01:00
parent 5f14d830e3
commit 42955187fa
11 changed files with 5 additions and 20 deletions

View File

@ -12,7 +12,6 @@ SOURCES += \
models/note.cpp \
application.cpp \
models/notecollection.cpp \
services/notecache.cpp \
models/qmlnote.cpp \
webapi.cpp \
synchronizer.cpp \
@ -40,7 +39,6 @@ HEADERS += \
models/note.h \
application.h \
models/notecollection.h \
services/notecache.h \
sparsevector.hpp \
models/qmlnote.h \
webapi.h \

View File

@ -7,7 +7,6 @@
#include "models/foldermodel.h"
#include "models/notecollection.h"
#include "models/foldercollection.h"
#include "services/notecache.h"
#include "models/notemodel.h"
#include "models/qmlnote.h"
#include "webapi.h"
@ -32,7 +31,6 @@ private:
NoteModel noteModel_;
QString selectedFolderId() const;
QString selectedNoteId() const;
NoteCache noteCache_;
QmlNote selectedQmlNote_;
WebApi api_;
Synchronizer synchronizer_;

View File

@ -59,7 +59,7 @@ int NoteCollection::count() const {
Note NoteCollection::byId(const QString& id) const {
std::vector<int> indexes = cache_.indexes();
for (int i = 0; i < indexes.size(); i++) {
for (size_t i = 0; i < indexes.size(); i++) {
Note note = cache_.get(indexes[i]);
if (note.id() == id) return note;
}

View File

@ -6,6 +6,7 @@ jop::NoteModel::NoteModel()
}
int jop::NoteModel::rowCount(const QModelIndex &parent) const {
Q_UNUSED(parent);
return collection_.count();
}

View File

@ -15,6 +15,4 @@ QString QmlNote::body() const {
void QmlNote::setNote(const Note &note) {
note_ = note;
emit changed();
//emit titleChanged();
//emit bodyChanged();
}

View File

@ -10,9 +10,6 @@ class QmlNote : public QObject {
Q_OBJECT
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(QString body READ body NOTIFY bodyChanged)
public:
QmlNote();
@ -22,8 +19,6 @@ public:
signals:
void titleChanged();
void bodyChanged();
void changed();
private:

View File

@ -5,8 +5,6 @@
<file>NoteList.qml</file>
<file>NoteEditor.qml</file>
<file>AddButton.qml</file>
<file>Test.qml</file>
<file>TestForm.ui.qml</file>
<file>EditableListItem.qml</file>
</qresource>
</RCC>

View File

@ -9,9 +9,6 @@ class Settings : public QSettings {
Q_OBJECT
//public:
// Settings();
};
}

View File

@ -96,7 +96,7 @@ public:
// Returns a vector containing the indexes that are not currently set around
// the given index, up to bufferSize indexes.
std::vector<int> availableBufferAround(int index, int bufferSize) const {
std::vector<int> availableBufferAround(int index, size_t bufferSize) const {
std::vector<int> temp;
// Doesn't make sense to search for an empty buffer around

View File

@ -44,7 +44,7 @@ void Synchronizer::start() {
api_.put("folders/" + folder.id(), QUrlQuery(), data, "putFolder:" + folder.id());
}
for (size_t i = 0; i < notes.size(); i++) {
for (int i = 0; i < notes.size(); i++) {
Note note = notes[i];
QUrlQuery data;
data.addQueryItem("id", note.id());

View File

@ -93,7 +93,7 @@ void WebApi::request_finished(QNetworkReply *reply) {
response = doc.object();
}
for (size_t i = 0; i < inProgressRequests_.size(); i++) {
for (int i = 0; i < inProgressRequests_.size(); i++) {
QueuedRequest r = inProgressRequests_[i];
if (r.reply == reply) {
inProgressRequests_.erase(inProgressRequests_.begin() + i);