Skip to content

Commit

Permalink
perf: 修改接口名称
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoth committed Dec 2, 2023
1 parent c1105a0 commit 5dd9050
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/WoodenFish/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
layout->addWidget(btn, 0, Qt::AlignCenter);
connect(c, &knock::Knock::num_changed, btn, [btn](int num) { btn->setText("功德: " + QString::number(num)); });
c->set_num(0);
connect(btn, &QPushButton::clicked, c, &knock::Knock::num_Knock);
connect(btn, &QPushButton::clicked, c, &knock::Knock::knock);

// 版本&系统信息
QString str("<h1>" + qAppName() + " " + qApp->applicationVersion() + "</h1>");
Expand Down
4 changes: 2 additions & 2 deletions include/knock/internal/Knock.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class KNOCK_EXPORT Knock : public QObject
/// @brief 设置计数值
/// @param[in] num
void set_num(int num);
/// @brief +1
void num_Knock();
/// @brief +1 +1 +1 +1
void knock();

Q_SIGNALS:
/// @brief 计数值改变
Expand Down
2 changes: 1 addition & 1 deletion src/Knock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void Knock::set_num(int num)
Q_EMIT num_changed(_num);
}

void Knock::num_Knock()
void Knock::knock()
{
_num++;
Q_EMIT num_changed(_num);
Expand Down

0 comments on commit 5dd9050

Please sign in to comment.