aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--afdnotebook.cc4
-rw-r--r--notebookmodel.cc2
-rw-r--r--paperreplay.cc1
-rw-r--r--smartpen.cc4
-rw-r--r--smartpen.h4
5 files changed, 9 insertions, 6 deletions
diff --git a/afdnotebook.cc b/afdnotebook.cc
index eaff949..c4a4964 100644
--- a/afdnotebook.cc
+++ b/afdnotebook.cc
@@ -358,7 +358,7 @@ bool AfdNotebook::findPenData()
qDebug() << " stroke data" << strokeFile;
if (strokeFile.length() != 25) {
- qWarning() << "Invalid stroke filename format" << strokeFile << endl;
+ qWarning() << "Invalid stroke filename format" << strokeFile;
continue;
}
@@ -370,7 +370,7 @@ bool AfdNotebook::findPenData()
if (ok) stroke.end = Smartpen::fromPenTime(strokeFile.mid(13, 8).toLongLong(&ok, 16) * 1000ULL);
if (!ok) {
- qWarning() << "Invalid stroke filename format" << strokeFile << endl;
+ qWarning() << "Invalid stroke filename format" << strokeFile;
continue;
}
diff --git a/notebookmodel.cc b/notebookmodel.cc
index b9c897e..8a58ebf 100644
--- a/notebookmodel.cc
+++ b/notebookmodel.cc
@@ -124,7 +124,7 @@ QVariant NotebookModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole:
switch (index.column()) {
case 0:
- return notebooks.at(index.row());
+ return notebookName;
case 1:
if (notebookName != PAPER_REPLAY) {
return estimatePagesOfNotebook(penName, notebookName);
diff --git a/paperreplay.cc b/paperreplay.cc
index cae62f7..bec39f1 100644
--- a/paperreplay.cc
+++ b/paperreplay.cc
@@ -176,6 +176,7 @@ bool PaperReplay::open(const QString &path, quint64 notebookGuid)
_byPageTime[page].insert(session.d->start, session);
}
}
+
return true;
}
diff --git a/smartpen.cc b/smartpen.cc
index 1282e33..ce26a31 100644
--- a/smartpen.cc
+++ b/smartpen.cc
@@ -88,7 +88,7 @@ QByteArray Smartpen::getObject(const QString &name)
QString Smartpen::getParameter(Parameters parameter)
{
- QString objectName = QString("ppdata?key=pp%1").arg(int(parameter), 4);
+ QString objectName = QString("ppdata?key=pp%1").arg(uint(parameter), 4, 16);
QByteArray data = getObject(objectName);
QXmlStreamReader r(data);
@@ -120,6 +120,8 @@ QVariantMap Smartpen::getPenInfo()
QByteArray data = getObject("peninfo");
QXmlStreamReader r(data);
+ qDebug() << "PenInfo: " << QString::fromLatin1(data);
+
advanceToFirstChildElement(r, "xml");
advanceToFirstChildElement(r, "peninfo");
diff --git a/smartpen.h b/smartpen.h
index 30c1f74..c75c494 100644
--- a/smartpen.h
+++ b/smartpen.h
@@ -45,8 +45,8 @@ public:
bool isConnected() const;
- enum Parameters {
- PenName = 8011
+ enum Parameters : quint16 {
+ PenName = 0x8011
};
QByteArray getObject(const QString& name);