Skip to content

Commit

Permalink
qt
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Dec 16, 2024
1 parent fec6e29 commit 1f51e94
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/cfg/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <QStack>
#include <QByteArray>
#include <QList>
#include <QLinkedList>
#include <QMap>
#include <QMultiMap>
#include <QQueue>
Expand All @@ -34,6 +33,11 @@
#include <QRegion>
#include <QTransform>

// TODO: this is actually avilable via Core5Compat but I could not get it to work with pkg-config
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#include <QLinkedList>
#endif

#include <cstdio>

int ignoredReturnValue_QSize_height(const QSize &s)
Expand Down Expand Up @@ -323,6 +327,7 @@ QList<int>::iterator QList3()
return it;
}

#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
void QLinkedList1()
{
// cppcheck-suppress unreadVariable
Expand Down Expand Up @@ -359,6 +364,7 @@ QLinkedList<int>::iterator QLinkedList3()
// cppcheck-suppress returnDanglingLifetime
return it;
}
#endif

void QStringList1(QStringList stringlistArg)
{
Expand Down Expand Up @@ -569,11 +575,13 @@ void MacroTest2_test()
QByteArray ba = str.toLatin1();
printf(ba.data());

#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#ifndef QT_NO_DEPRECATED
str = MacroTest2::trUtf8("test2");
ba = str.toLatin1();
printf(ba.data());
#endif
#endif
}

void MacroTest3()
Expand Down Expand Up @@ -616,10 +624,6 @@ void validCode(int * pIntPtr, QString & qstrArg, double d)
qstr1.chop(1);
if (qstr1.length() == 1) {}
}
if (qstr1.length() == 1) {} else {
qstr1.remove(1);
if (qstr1.length() == 1) {}
}
}

void ignoredReturnValue()
Expand Down

0 comments on commit 1f51e94

Please sign in to comment.