Skip to content

Commit

Permalink
Bring method tool-tip back, update libshv, APP_VERSION "1.9.8"
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Sep 18, 2024
1 parent 006fbf2 commit d8772ef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/libshv
2 changes: 1 addition & 1 deletion shvspy/src/appversion.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define APP_VERSION "1.9.7"
#define APP_VERSION "1.9.8"

8 changes: 4 additions & 4 deletions shvspy/src/attributesmodel/attributesmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ QVariant AttributesModel::data(const QModelIndex &ix, int role) const
return is_notify? tr("Method is notify signal"): QVariant();
}
if(ix.column() == ColMethodName) {
auto attrs = m_rows[static_cast<unsigned>(ix.row())][ColAttributes].asMap();
auto mm = shv::chainpack::MetaMethod::fromRpcValue(m_rows[static_cast<unsigned>(ix.row())][ColMetaMethod]);
QStringList lines;
for(const auto &kv : attrs) {
lines << tr("%1: %2").arg(kv.first.c_str(), kv.second.toCpon().c_str());
for(const auto &[k, v] : mm.toMap()) {
lines << tr("%1: %2").arg(k.c_str(), v.toCpon().c_str());
}
return lines.join('\n');
}
Expand Down Expand Up @@ -308,7 +308,7 @@ void AttributesModel::loadRow(unsigned method_ix)
rv[ColFlags] = mtd->flagsStr();
rv[ColAccessLevel] = mtd->accessLevelStr();
rv[ColParams] = mtd->params;
rv[ColAttributes] = mtd->metamethod.toRpcValue();
rv[ColMetaMethod] = mtd->metamethod.toRpcValue();
shvDebug() << "\t response:" << mtd->response.toCpon() << "is valid:" << mtd->response.isValid();
if(mtd->response.isError()) {
rv[ColResult] = mtd->response.error().toRpcValue();
Expand Down
2 changes: 1 addition & 1 deletion shvspy/src/attributesmodel/attributesmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AttributesModel : public QAbstractTableModel
private:
typedef QAbstractTableModel Super;
public:
enum Columns {ColMethodName = 0, ColParamType, ColResultType, ColSignals, ColFlags, ColAccessLevel, ColParams, ColResult, ColBtRun, ColError, ColAttributes, ColCnt};
enum Columns {ColMethodName = 0, ColParamType, ColResultType, ColSignals, ColFlags, ColAccessLevel, ColParams, ColResult, ColBtRun, ColError, ColMetaMethod, ColCnt};
enum Roles {RpcValueRole = Qt::UserRole };
public:
AttributesModel(QObject *parent = nullptr);
Expand Down

0 comments on commit d8772ef

Please sign in to comment.