refactor: clean up verbose migration comments
Remove redundant Qt6 migration comments that restate obvious API changes: - QtConcurrent::run parameter order explanations (preserved where lambda wrapping needed) - QStringRef/QStringView API changes (shortened to essential info) - QComboBox::activated signal signature change - QMap::unite() removal semantics - QAction include path change - QMouseEvent/QWheelEvent position() API - QList/QVector equivalence in Qt6 - QFuture continuation API - Code generation comments Preserved comments explaining non-obvious Qt6 behavior or necessary API migration details. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
33 files changed
+54
-91
No files matched your search
@@ -25,7 +25,7 @@ TEST(Qt6ApiTest, QStringView_Sliced)
|
||||
QString testString = QStringLiteral("Hello World");
|
||||
QStringView view(testString);
|
||||
|
||||
// Qt6: slice() -> sliced()
|
||||
// QBitArray::sliced() in Qt6 (was slice())
|
||||
QStringView subView = view.sliced(0, 5);
|
||||
EXPECT_EQ(subView.toString(), QStringLiteral("Hello"));
|
||||
|
||||
@@ -61,7 +61,6 @@ TEST(Qt6ApiTest, QFuture_Continuation)
|
||||
return 42;
|
||||
});
|
||||
|
||||
// Qt6: QFuture supports .then() continuations
|
||||
QFuture<QString> continued = future.then([](QFuture<int> result) {
|
||||
return QString::number(result.result());
|
||||
});
|
||||
@@ -73,7 +72,7 @@ TEST(Qt6ApiTest, QFuture_Continuation)
|
||||
// Test Qt::MiddleButton enum (Qt6 replacement for Qt::MidButton)
|
||||
TEST(Qt6ApiTest, Qt_MiddleButton_Enum)
|
||||
{
|
||||
// Qt6: Qt::MidButton -> Qt::MiddleButton
|
||||
// Qt::MiddleButton in Qt6 (was MidButton)
|
||||
Qt::MouseButton middleBtn = Qt::MiddleButton;
|
||||
EXPECT_EQ(middleBtn, Qt::MiddleButton);
|
||||
EXPECT_NE(middleBtn, Qt::LeftButton);
|
||||
@@ -88,7 +87,7 @@ TEST(Qt6ApiTest, QVariantMap_Iteration)
|
||||
map1.insert(QStringLiteral("key2"), 2);
|
||||
|
||||
QVariantMap map2;
|
||||
// Qt6: Replace unite() with iterate/insert pattern
|
||||
// QMap::unite() removed in Qt6
|
||||
for (auto it = map1.begin(); it != map1.end(); ++it)
|
||||
{
|
||||
map2.insert(it.key(), it.value());
|
||||
@@ -103,8 +102,7 @@ TEST(Qt6ApiTest, QVariantMap_Iteration)
|
||||
TEST(Qt6ApiTest, QTouchEvent_API)
|
||||
{
|
||||
// This test verifies the API exists - actual touch testing requires GUI
|
||||
// Qt6: touchPoints() -> points()
|
||||
// Qt6: QEventPoint::screenPos() -> globalPosition()
|
||||
// QTouchEvent::points() and QEventPoint::globalPosition() in Qt6
|
||||
|
||||
// Create a mock test - in real code, QTouchEvent is created by system
|
||||
// We verify the types compile correctly
|
||||
@@ -121,7 +119,7 @@ TEST(Qt6ApiTest, QTouchEvent_API)
|
||||
// Test QMouseEvent position API (Qt6)
|
||||
TEST(Qt6ApiTest, QMouseEvent_Position_API)
|
||||
{
|
||||
// Qt6: event.x()/y() -> event.position().x()/y()
|
||||
// QMouseEvent::position() in Qt6 (was x()/y())
|
||||
// Create a mouse event with Qt6 API
|
||||
QMouseEvent event(QEvent::MouseButtonPress,
|
||||
QPointF(100.0, 200.0), // globalPos
|
||||
@@ -142,7 +140,7 @@ TEST(Qt6ApiTest, QMouseEvent_Position_API)
|
||||
// Test QWheelEvent position API (Qt6)
|
||||
TEST(Qt6ApiTest, QWheelEvent_Position_API)
|
||||
{
|
||||
// Qt6: event.x()/y() -> event.position().x()/y()
|
||||
// QWheelEvent::position() in Qt6 (was x()/y())
|
||||
QWheelEvent event(QPointF(100.0, 200.0), // pos
|
||||
QPointF(100.0, 200.0), // globalPos
|
||||
QPoint(0, 0), // pixelDelta
|
||||
|
||||
Reference in new issue
Block a user