修复邮件发送模块不支持Qt6的BUG

This commit is contained in:
feiyangqingyun
2022-04-26 16:56:56 +08:00
parent 7d5ac875a9
commit 4f2801a821
28 changed files with 100 additions and 112 deletions

View File

@@ -96,7 +96,7 @@ void DeviceSizeTable::load()
{
//清空原有数据
int row = this->rowCount();
for (int i = 0; i < row; i++) {
for (int i = 0; i < row; ++i) {
this->removeRow(0);
}
@@ -215,7 +215,7 @@ void DeviceSizeTable::checkSize(const QString &result, const QString &name)
QStringList list = result.split(" ");
int index = 0;
for (int i = 0; i < list.count(); i++) {
for (int i = 0; i < list.count(); ++i) {
QString s = list.at(i).trimmed();
if (s == "") {
continue;

View File

@@ -328,7 +328,7 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
widget->setStyleSheet(qss.join(""));
//可能会重复调用设置所以先要移除上一次的
for (int i = 0; i < btnCount; i++) {
for (int i = 0; i < btnCount; ++i) {
for (int j = 0; j < this->btns.count(); j++) {
if (this->btns.at(j) == btns.at(i)) {
disconnect(btns.at(i), SIGNAL(toggled(bool)), this, SLOT(toggled(bool)));
@@ -345,7 +345,7 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
//存储对应按钮对象,方便鼠标移上去的时候切换图片
int checkedIndex = -1;
for (int i = 0; i < btnCount; i++) {
for (int i = 0; i < btnCount; ++i) {
int icon = icons.at(i);
QPixmap pixNormal = getPixmap1(styleColor.normalTextColor, icon, iconSize, iconWidth, iconHeight);
QPixmap pixHover = getPixmap1(styleColor.hoverTextColor, icon, iconSize, iconWidth, iconHeight);

View File

@@ -46,11 +46,7 @@ NavButton::NavButton(QWidget *parent) : QPushButton(parent)
setText("导航按钮");
}
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
void NavButton::enterEvent(QEnterEvent *)
#else
void NavButton::enterEvent(QEvent *)
#endif
{
hover = true;
this->update();

View File

@@ -92,11 +92,7 @@ public:
explicit NavButton(QWidget *parent = 0);
protected:
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
void enterEvent(QEnterEvent *);
#else
void enterEvent(QEvent *);
#endif
void leaveEvent(QEvent *);
void paintEvent(QPaintEvent *);
void drawBg(QPainter *painter);

View File

@@ -51,13 +51,13 @@ void SmoothCurve::calculateFirstControlPoints(double *&result, const double *rhs
double b = 2.0;
result[0] = rhs[0] / b;
for (int i = 1; i < n; i++) {
for (int i = 1; i < n; ++i) {
tmp[i] = 1 / b;
b = (i < n - 1 ? 4.0 : 3.5) - tmp[i];
result[i] = (rhs[i] - result[i - 1]) / b;
}
for (int i = 1; i < n; i++) {
for (int i = 1; i < n; ++i) {
result[n - i - 1] -= tmp[n - i] * result[n - i];
}

View File

@@ -277,7 +277,7 @@ QString ZhToPY::zhToJP(const QString &chinese)
QString str;
int index = 0;
for (int i = 0; i < chinese.length(); i++) {
for (int i = 0; i < chinese.length(); ++i) {
//若是字母或数字则直接输出
ushort vChar = chinese.at(i).unicode() ;
if ((vChar >= 'a' && vChar <= 'z') || (vChar >= 'A' && vChar <= 'Z')) {