Merge integration refs/builds/qtci/dev/1618224780
This commit is contained in:
commit
6d624ab01a
@ -596,7 +596,7 @@ endmacro()
|
|||||||
|
|
||||||
macro(translate_list_input name cmake_var)
|
macro(translate_list_input name cmake_var)
|
||||||
if(DEFINED INPUT_${name})
|
if(DEFINED INPUT_${name})
|
||||||
list(JOIN INPUT_${name} "\\;" value)
|
list(JOIN INPUT_${name} "[[;]]" value)
|
||||||
list(APPEND cmake_args "-D${cmake_var}=${value}")
|
list(APPEND cmake_args "-D${cmake_var}=${value}")
|
||||||
drop_input(${name})
|
drop_input(${name})
|
||||||
endif()
|
endif()
|
||||||
@ -763,7 +763,7 @@ if(nr_of_build_configs EQUAL 1)
|
|||||||
push("-DCMAKE_BUILD_TYPE=${build_configs}")
|
push("-DCMAKE_BUILD_TYPE=${build_configs}")
|
||||||
elseif(nr_of_build_configs GREATER 1)
|
elseif(nr_of_build_configs GREATER 1)
|
||||||
set(multi_config ON)
|
set(multi_config ON)
|
||||||
string(REPLACE ";" "\\;" escaped_build_configs "${build_configs}")
|
string(REPLACE ";" "[[;]]" escaped_build_configs "${build_configs}")
|
||||||
# We must not use the push macro here to avoid variable expansion.
|
# We must not use the push macro here to avoid variable expansion.
|
||||||
# That would destroy our escaping.
|
# That would destroy our escaping.
|
||||||
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
|
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
|
||||||
|
@ -131,7 +131,7 @@ void BlockSizeManager::timeAfterUser()
|
|||||||
if (controlPartElapsed.isMedianValid() == false)
|
if (controlPartElapsed.isMedianValid() == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (controlPartElapsed.median() * TargetRatio < userPartElapsed.median())
|
if (controlPartElapsed.median() * int(TargetRatio) < userPartElapsed.median())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_blockSize = qMin(m_blockSize * 2, maxBlockSize);
|
m_blockSize = qMin(m_blockSize * 2, maxBlockSize);
|
||||||
|
@ -807,34 +807,34 @@ static QFuture<ArgsType<Signal>> connect(Sender *sender, Signal signal)
|
|||||||
if constexpr (std::is_void_v<ArgsType>) {
|
if constexpr (std::is_void_v<ArgsType>) {
|
||||||
connections->first =
|
connections->first =
|
||||||
QObject::connect(sender, signal, sender, [promise, connections]() mutable {
|
QObject::connect(sender, signal, sender, [promise, connections]() mutable {
|
||||||
promise.reportFinished();
|
|
||||||
QObject::disconnect(connections->first);
|
QObject::disconnect(connections->first);
|
||||||
QObject::disconnect(connections->second);
|
QObject::disconnect(connections->second);
|
||||||
|
promise.reportFinished();
|
||||||
});
|
});
|
||||||
} else if constexpr (QtPrivate::isTupleV<ArgsType>) {
|
} else if constexpr (QtPrivate::isTupleV<ArgsType>) {
|
||||||
connections->first = QObject::connect(sender, signal, sender,
|
connections->first = QObject::connect(sender, signal, sender,
|
||||||
[promise, connections](auto... values) mutable {
|
[promise, connections](auto... values) mutable {
|
||||||
promise.reportResult(std::make_tuple(values...));
|
|
||||||
promise.reportFinished();
|
|
||||||
QObject::disconnect(connections->first);
|
QObject::disconnect(connections->first);
|
||||||
QObject::disconnect(connections->second);
|
QObject::disconnect(connections->second);
|
||||||
|
promise.reportResult(std::make_tuple(values...));
|
||||||
|
promise.reportFinished();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
connections->first = QObject::connect(sender, signal, sender,
|
connections->first = QObject::connect(sender, signal, sender,
|
||||||
[promise, connections](ArgsType value) mutable {
|
[promise, connections](ArgsType value) mutable {
|
||||||
promise.reportResult(value);
|
|
||||||
promise.reportFinished();
|
|
||||||
QObject::disconnect(connections->first);
|
QObject::disconnect(connections->first);
|
||||||
QObject::disconnect(connections->second);
|
QObject::disconnect(connections->second);
|
||||||
|
promise.reportResult(value);
|
||||||
|
promise.reportFinished();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
connections->second =
|
connections->second =
|
||||||
QObject::connect(sender, &QObject::destroyed, sender, [promise, connections]() mutable {
|
QObject::connect(sender, &QObject::destroyed, sender, [promise, connections]() mutable {
|
||||||
promise.reportCanceled();
|
|
||||||
promise.reportFinished();
|
|
||||||
QObject::disconnect(connections->first);
|
QObject::disconnect(connections->first);
|
||||||
QObject::disconnect(connections->second);
|
QObject::disconnect(connections->second);
|
||||||
|
promise.reportCanceled();
|
||||||
|
promise.reportFinished();
|
||||||
});
|
});
|
||||||
|
|
||||||
return promise.future();
|
return promise.future();
|
||||||
|
@ -432,7 +432,7 @@ QNetworkInformationBackendFactory::~QNetworkInformationBackendFactory()
|
|||||||
|
|
||||||
\value Unknown
|
\value Unknown
|
||||||
If this value is returned then we may be connected but the OS
|
If this value is returned then we may be connected but the OS
|
||||||
has still not confirmed full connectivity, or this features
|
has still not confirmed full connectivity, or this feature
|
||||||
is not supported.
|
is not supported.
|
||||||
\value Disconnected
|
\value Disconnected
|
||||||
Indicates that the system may have no connectivity at all.
|
Indicates that the system may have no connectivity at all.
|
||||||
|
@ -3228,6 +3228,25 @@ void tst_QFuture::signalConnect()
|
|||||||
QVERIFY(future.isCanceled());
|
QVERIFY(future.isCanceled());
|
||||||
QVERIFY(!future.isValid());
|
QVERIFY(!future.isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Signal emitted, causing Sender to be destroyed
|
||||||
|
{
|
||||||
|
SenderObject *sender = new SenderObject();
|
||||||
|
|
||||||
|
auto future = QtFuture::connect(sender, &SenderObject::intArgSignal);
|
||||||
|
future.then([sender](int) {
|
||||||
|
// Scenario: Sender no longer needed, so it's deleted
|
||||||
|
delete sender;
|
||||||
|
});
|
||||||
|
|
||||||
|
QSignalSpy spy(sender, &SenderObject::destroyed);
|
||||||
|
emit sender->intArgSignal(5);
|
||||||
|
spy.wait();
|
||||||
|
|
||||||
|
QVERIFY(future.isFinished());
|
||||||
|
QVERIFY(!future.isCanceled());
|
||||||
|
QVERIFY(future.isValid());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QFuture::waitForFinished()
|
void tst_QFuture::waitForFinished()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user