mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 14:49:44 -09:00
Build with QT_NO_CONTEXTLESS_CONNECT
Disables the 3-argument connect without a context object. Not providing a context object can cause issues when the sending object is still alive but the receiver or an object refered to in the lambda is not.
This commit is contained in:
parent
1ede742383
commit
dbe076acf5
4 changed files with 7 additions and 3 deletions
|
|
@ -278,6 +278,10 @@ ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX PLASMA VERSION_HEADER plasm
|
|||
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
add_definitions(
|
||||
-DQT_NO_CONTEXTLESS_CONNECT
|
||||
)
|
||||
|
||||
configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
|
||||
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
|
||||
configure_file(config-build-options.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-build-options.h)
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ void Attica::KdePlatformDependent::loadAccessToken()
|
|||
}
|
||||
|
||||
auto job = new KAccounts::GetCredentialsJob(accountId, accountsManager);
|
||||
connect(job, &KJob::finished, [this, job, accountId = account->id()]() {
|
||||
connect(job, &KJob::finished, this, [this, job, accountId = account->id()]() {
|
||||
const auto credentialsData = job->credentialsData();
|
||||
const auto idToken = credentialsData[QStringLiteral("IdToken")].toString();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ using namespace Qt::Literals::StringLiterals;
|
|||
LayoutSearchModel::LayoutSearchModel(QObject *parent)
|
||||
: QSortFilterProxyModel(parent)
|
||||
{
|
||||
connect(this, &QSortFilterProxyModel::sourceModelChanged, [this]() {
|
||||
connect(this, &QSortFilterProxyModel::sourceModelChanged, this, [this]() {
|
||||
const auto originalRoles = sourceModel()->roleNames().keys();
|
||||
m_searchScoreRole = *std::max_element(originalRoles.begin(), originalRoles.end()) + 1;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ void AbstractJob::runScriptInTerminal(const QString &script, const QString &pwd)
|
|||
{
|
||||
auto job = new KTerminalLauncherJob(script);
|
||||
job->setWorkingDirectory(pwd);
|
||||
connect(job, &KJob::result, [this, job]() {
|
||||
connect(job, &KJob::result, this, [this, job]() {
|
||||
if (job->error()) {
|
||||
Q_EMIT error(xi18nc("@info:status", "Failed to run install script in terminal <message>%1</message>", job->errorString()));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue