Skip to content

Commit

Permalink
fix: unit test failed, due to QDataStream set qt version.
Browse files Browse the repository at this point in the history
单元测试里面的 datastream 设置了 qt 版本号导致单元测试失败。
在qt5.11下ok,社区版默认qt5.15。读写不同版本出错。

Log: 修复社区版下单元测试失败的问题
Influence: 
Change-Id: I4693070762b653373bf5a4fcac4598fca69f8356
(cherry picked from commit 0bc6f75)
  • Loading branch information
AlexOne authored and kegechen committed Oct 25, 2021
1 parent 71eabfd commit a346d55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/ut_dpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ TEST_F(TDPalette, testColorFunction)
#ifndef QT_NO_DATASTREAM
QByteArray inArray;
QDataStream in(&inArray, QIODevice::WriteOnly);
in.setVersion(QDataStream::Qt_5_11);
// in.setVersion(QDataStream::Qt_5_11);

// 直接调用左移运算符会出现二异性 先直接执行一次生成结果
in << static_cast<const QPalette &>(palette);
Expand Down

0 comments on commit a346d55

Please sign in to comment.