diff options
author | Javier <dev.git@javispedro.com> | 2020-09-10 23:26:12 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2020-09-10 23:26:12 +0200 |
commit | 20de09ffbaa00ab3adf91e49b847eb0061315b1e (patch) | |
tree | 19d34e3ed81b86a415809b2d213d582ff524d263 | |
parent | 554a87c601dbd67b45fddc9a8362b82a5b89c5e4 (diff) | |
download | scribiu-20de09ffbaa00ab3adf91e49b847eb0061315b1e.tar.gz scribiu-20de09ffbaa00ab3adf91e49b847eb0061315b1e.zip |
cleanup redundant endls and others
-rw-r--r-- | afdnotebook.cc | 4 | ||||
-rw-r--r-- | notebookmodel.cc | 2 | ||||
-rw-r--r-- | paperreplay.cc | 1 | ||||
-rw-r--r-- | smartpen.cc | 4 | ||||
-rw-r--r-- | smartpen.h | 4 |
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"); @@ -45,8 +45,8 @@ public: bool isConnected() const; - enum Parameters { - PenName = 8011 + enum Parameters : quint16 { + PenName = 0x8011 }; QByteArray getObject(const QString& name); |