Skip to content

Commit 57d508f

Browse files
committed
消除警告
1 parent 19dd3cd commit 57d508f

5 files changed

+6
-5
lines changed

aboutscreen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void AboutScreen::initUI() {
3838
int radius = btnSize.height() / 2;
3939
QString btnStyle = QString("border-radius: %1px;").arg(radius);
4040
// 设置按钮字体
41-
QString fontName = std::move(ZZZFont::get());
41+
QString fontName = ZZZFont::get();
4242
QFont btnFont(fontName, btnSize.height() / 3);
4343
// 设置按钮样式
4444
CustomBtn::setCustomBtn(ui->pushButton_1, btnSize, btnStyle, btnFont);

exitscreen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void ExitScreen::initUI() {
2626
screenSize.width() * 0.5, screenSize.height() * 0.5);
2727
ui->label->setGeometry(screenSize.width() * 0.3, screenSize.height() * 0.3,
2828
screenSize.width() * 0.2, screenSize.height() * 0.2);
29-
QString fontName = std::move(ZZZFont::get());
29+
QString fontName = ZZZFont::get();
3030
QSize btnSize(screenSize.width() / 6, screenSize.height() / 25);
3131
int btnRadius = btnSize.height() / 2;
3232
QString btnStyle = QString("border-radius: %1px;").arg(btnRadius);

mainwindow.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <QTimer>
1111
// #include <cassert>
1212
#include <chrono>
13+
#include <cstddef>
1314
#include <sstream>
1415
#include <string>
1516
#include <thread>
@@ -69,7 +70,7 @@ MainWindow::~MainWindow() {
6970

7071
void MainWindow::selfTestUpdate() {
7172
QTextEdit *textEdit = ui->textEdit;
72-
static int count = 0;
73+
static size_t count = 0;
7374
if (count < m_sysinfo->m_data.size()) {
7475
// 显示系统信息
7576
textEdit->append(m_sysinfo->m_data[count].c_str());

paintwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "uiconfig.h"
44

55
PaintWidget::PaintWidget(QWidget *parent)
6-
: QWidget(parent), m_timer(new QTimer(this)), m_startAngle(0) {
6+
: QWidget(parent), m_startAngle(0), m_timer(new QTimer(this)) {
77
initUI();
88
m_timer->start(100);
99
connect(m_timer, &QTimer::timeout, this, &PaintWidget::repaintCircle);

titlescreen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void TitleScreen::initUI() {
176176
int btnRadius = btnSize.height() / 2;
177177
QString btnStyle = QString("border-radius: %1px;").arg(btnRadius);
178178
// 设置按钮字体
179-
QString fontName = std::move(ZZZFont::get());
179+
QString fontName = ZZZFont::get();
180180
QFont btnFont(fontName, btnSize.height() / 3);
181181
// 设置按钮样式
182182
CustomBtn::setCustomBtn(ui->pushButton_1, btnSize, btnStyle, btnFont);

0 commit comments

Comments
 (0)