Merge integration refs/builds/qtci/dev/1617183127
This commit is contained in:
commit
293d556fb4
@ -4643,7 +4643,8 @@ template<typename Enum> void testVariant(Enum value, bool *ok)
|
|||||||
QVERIFY(var2.convert(QMetaType::Int));
|
QVERIFY(var2.convert(QMetaType::Int));
|
||||||
QCOMPARE(var2.value<int>(), static_cast<int>(value));
|
QCOMPARE(var2.value<int>(), static_cast<int>(value));
|
||||||
|
|
||||||
if ((static_cast<qint64>(value) <= INT_MAX) && (static_cast<qint64>(value) >= INT_MIN)) {
|
// unary + to silence gcc warning
|
||||||
|
if ((+static_cast<qint64>(value) <= INT_MAX) && (+static_cast<qint64>(value) >= INT_MIN)) {
|
||||||
int intValue = static_cast<int>(value);
|
int intValue = static_cast<int>(value);
|
||||||
QVariant intVar = intValue;
|
QVariant intVar = intValue;
|
||||||
QVERIFY(intVar.canConvert<Enum>());
|
QVERIFY(intVar.canConvert<Enum>());
|
||||||
@ -4702,7 +4703,8 @@ template<typename Enum> void testVariantMeta(Enum value, bool *ok, const char *s
|
|||||||
|
|
||||||
QVariant strVar = QString::fromLatin1(string);
|
QVariant strVar = QString::fromLatin1(string);
|
||||||
QVERIFY(strVar.canConvert<Enum>());
|
QVERIFY(strVar.canConvert<Enum>());
|
||||||
if ((static_cast<qint64>(value) > INT_MAX) || (static_cast<qint64>(value) < INT_MIN)) {
|
// unary + to silence gcc warning
|
||||||
|
if ((+static_cast<qint64>(value) > INT_MAX) || (+static_cast<qint64>(value) < INT_MIN)) {
|
||||||
QEXPECT_FAIL("", "QMetaEnum api uses 'int' as return type QTBUG-27451", Abort);
|
QEXPECT_FAIL("", "QMetaEnum api uses 'int' as return type QTBUG-27451", Abort);
|
||||||
*ok = true;
|
*ok = true;
|
||||||
}
|
}
|
||||||
|
@ -1356,7 +1356,8 @@ void tst_QMenuBar::menubarSizeHint()
|
|||||||
{
|
{
|
||||||
MyStyle() : QProxyStyle(QStyleFactory::create("windows")) { }
|
MyStyle() : QProxyStyle(QStyleFactory::create("windows")) { }
|
||||||
|
|
||||||
virtual int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const
|
int pixelMetric(PixelMetric metric, const QStyleOption *option = 0,
|
||||||
|
const QWidget *widget = 0) const override
|
||||||
{
|
{
|
||||||
// I chose strange values (prime numbers to be more sure that the size of the menubar is correct)
|
// I chose strange values (prime numbers to be more sure that the size of the menubar is correct)
|
||||||
switch (metric)
|
switch (metric)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user