Fix warnings about unused variables and functions in tests
Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
f418a96f9b
commit
bd3088ceb3
|
|
@ -715,7 +715,6 @@ void tst_QMutex::try_lock_for_recursive()
|
|||
public:
|
||||
void run()
|
||||
{
|
||||
const std::chrono::milliseconds systemTimersResolutionAsDuration(systemTimersResolution);
|
||||
testsTurn.release();
|
||||
|
||||
threadsTurn.acquire();
|
||||
|
|
|
|||
|
|
@ -2737,14 +2737,12 @@ void instantiatePairAssociative()
|
|||
{
|
||||
instantiateMutableIterationContainer<ContainerType, KeyType>();
|
||||
|
||||
typename ContainerType::iterator it;
|
||||
typename ContainerType::const_iterator constIt;
|
||||
const KeyType key = KeyType();
|
||||
const ValueType value = ValueType();
|
||||
ContainerType container;
|
||||
const ContainerType constContainer(container);
|
||||
|
||||
it = container.insert(key, value);
|
||||
auto it = container.insert(key, value);
|
||||
container.erase(it);
|
||||
container.find(key);
|
||||
container.constFind(key);
|
||||
|
|
|
|||
|
|
@ -1041,22 +1041,6 @@ void tst_QArrayData::arrayOps2()
|
|||
|
||||
Q_DECLARE_METATYPE(QArrayDataPointer<int>)
|
||||
|
||||
static inline bool arrayIsFilledWith(const QArrayDataPointer<int> &array,
|
||||
int fillValue, size_t size)
|
||||
{
|
||||
const int *iter = array->begin();
|
||||
const int *const end = array->end();
|
||||
|
||||
for (size_t i = 0; i < size; ++i, ++iter)
|
||||
if (*iter != fillValue)
|
||||
return false;
|
||||
|
||||
if (iter != end)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct ResetOnDtor
|
||||
{
|
||||
ResetOnDtor()
|
||||
|
|
|
|||
|
|
@ -77,11 +77,6 @@ static bool operator<(const MacSpecialKey &entry, int key)
|
|||
return entry.key < key;
|
||||
}
|
||||
|
||||
static bool operator<(int key, const MacSpecialKey &entry)
|
||||
{
|
||||
return key < entry.key;
|
||||
}
|
||||
|
||||
static const MacSpecialKey * const MacSpecialKeyEntriesEnd = entries + NumEntries;
|
||||
|
||||
static QChar macSymbolForQtKey(int key)
|
||||
|
|
|
|||
|
|
@ -955,18 +955,12 @@ void tst_QPainterPath::operators()
|
|||
QCOMPARE(test, expected);
|
||||
}
|
||||
|
||||
static inline bool pathFuzzyCompare(double p1, double p2)
|
||||
template <typename T>
|
||||
static inline bool pathFuzzyCompare(T p1, T p2)
|
||||
{
|
||||
return qAbs(p1 - p2) < 0.001;
|
||||
}
|
||||
|
||||
|
||||
static inline bool pathFuzzyCompare(float p1, float p2)
|
||||
{
|
||||
return qAbs(p1 - p2) < 0.001;
|
||||
}
|
||||
|
||||
|
||||
void tst_QPainterPath::testArcMoveTo()
|
||||
{
|
||||
QFETCH(QRectF, rect);
|
||||
|
|
|
|||
|
|
@ -475,13 +475,13 @@ void tst_QRhi::nativeHandles()
|
|||
rt->setRenderPassDescriptor(rpDesc.data());
|
||||
QVERIFY(rt->create());
|
||||
|
||||
const QRhiNativeHandles *rpHandles = rpDesc->nativeHandles();
|
||||
switch (impl) {
|
||||
case QRhi::Null:
|
||||
break;
|
||||
#ifdef TST_VK
|
||||
case QRhi::Vulkan:
|
||||
{
|
||||
const QRhiNativeHandles *rpHandles = rpDesc->nativeHandles();
|
||||
const QRhiVulkanRenderPassNativeHandles *vkHandles = static_cast<const QRhiVulkanRenderPassNativeHandles *>(rpHandles);
|
||||
QVERIFY(vkHandles);
|
||||
QVERIFY(vkHandles->renderPass);
|
||||
|
|
|
|||
|
|
@ -859,7 +859,6 @@ void tst_QSqlTableModel::insertRowFailure()
|
|||
values.setGenerated(1, true);
|
||||
|
||||
// populate 1 row
|
||||
const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
|
||||
QVERIFY_SQL(model, insertRecord(0, values));
|
||||
QVERIFY_SQL(model, submitAll());
|
||||
QVERIFY_SQL(model, select());
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ void tst_QDialog::showSizeGrip()
|
|||
{
|
||||
QDialog dialog(nullptr);
|
||||
dialog.show();
|
||||
QWidget *ext = new QWidget(&dialog);
|
||||
new QWidget(&dialog);
|
||||
QVERIFY(!dialog.isSizeGripEnabled());
|
||||
|
||||
dialog.setSizeGripEnabled(true);
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
#include <QtWidgets>
|
||||
#include <private/qstylehelper_p.h>
|
||||
|
||||
const int N = 1;
|
||||
|
||||
Q_DECLARE_METATYPE(QStyleHelper::WidgetSizePolicy);
|
||||
|
||||
#define CT(E) \
|
||||
|
|
@ -40,22 +38,13 @@ Q_DECLARE_METATYPE(QStyleHelper::WidgetSizePolicy);
|
|||
|
||||
typedef QSizePolicy::ControlType ControlType;
|
||||
|
||||
CT(DefaultType)
|
||||
CT(ButtonBox)
|
||||
CT(CheckBox)
|
||||
CT(ComboBox)
|
||||
CT(Frame)
|
||||
CT(GroupBox)
|
||||
CT(Label)
|
||||
CT(Line)
|
||||
CT(LineEdit)
|
||||
CT(PushButton)
|
||||
CT(RadioButton)
|
||||
CT(Slider)
|
||||
CT(SpinBox)
|
||||
CT(TabWidget)
|
||||
CT(ToolButton)
|
||||
|
||||
|
||||
class tst_QMacStyle : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -608,10 +608,12 @@ void tst_QMdiArea::showWindows()
|
|||
|
||||
//#define USE_SHOW
|
||||
|
||||
#if !defined(Q_OS_DARWIN)
|
||||
static inline QString windowTitle(const QString &t, const QString &f)
|
||||
{
|
||||
return t + QLatin1String(" - [") + f + QLatin1Char(']');
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QMdiArea::changeWindowTitle()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue