set(QT_MIN_VERSION "6.4.0")
set(KF6_MIN_VERSION "6.2.0")
+# use C++20 like KF6 itself
+set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
+
# ECM setup
find_package(ECM ${KF6_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
// Url changes are still done via m_urlNavigator.
connect(urlNavigator, &DolphinUrlNavigator::urlChanged, m_urlNavigator.get(), &DolphinUrlNavigator::setLocationUrl);
- connect(urlNavigator, &DolphinUrlNavigator::urlsDropped, this, [=](const QUrl &destination, QDropEvent *event) {
+ connect(urlNavigator, &DolphinUrlNavigator::urlsDropped, this, [=, this](const QUrl &destination, QDropEvent *event) {
m_view->dropUrls(destination, event, urlNavigator->dropWidget());
});
// Aside from these, only visual things need to be connected.
QAction *createFolderFromSelected = new QAction(i18nc("@action:inmenu", "Move to New Folder…"), parentWidget);
createFolderFromSelected->setIcon(QIcon::fromTheme(QStringLiteral("folder-new")));
- connect(createFolderFromSelected, &QAction::triggered, this, [=]() {
+ connect(createFolderFromSelected, &QAction::triggered, this, [=, this]() {
QString selectedFileDirPath = selectedItems.at(0).url().toString().remove(selectedItems.at(0).name());
if (selectedFileDirPath.endsWith(QStringLiteral("/"))) {
selectedFileDirPath.removeLast();
curve.addCubicBezierSegment(QPointF(0.4, 0.0), QPointF(1.0, 1.0), QPointF(1.0, 1.0));
animation->setEasingCurve(curve);
- connect(animation, &QVariantAnimation::valueChanged, this, [=](const QVariant &) {
+ connect(animation, &QVariantAnimation::valueChanged, this, [=, this](const QVariant &) {
update();
});
- connect(animation, &QVariantAnimation::finished, this, [=]() {
+ connect(animation, &QVariantAnimation::finished, this, [=, this]() {
m_rubberBandAnimations.removeAll(animation);
delete animation;
});
// If we can't do that for any reason, silently fail.
auto reply = m_kiofuseInterface.mountUrl(url.toString());
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) {
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) {
watcher->deleteLater();
if (!reply.isError()) {
// Successfully mounted, point to the KIOFuse equivalent path.
auto reply = m_kiofuseInterface.remoteUrl(m_konsolePartCurrentDirectory);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) {
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) {
watcher->deleteLater();
if (reply.isError()) {
// KIOFuse errored out... just show the normal URL
#ifndef Q_OS_WIN
connect(m_recursiveDirectorySizeLimit, &QSpinBox::valueChanged, this, &SettingsPageBase::changed);
connect(m_numberOfItems, &QRadioButton::toggled, this, &SettingsPageBase::changed);
- connect(m_sizeOfContents, &QRadioButton::toggled, this, [=]() {
+ connect(m_sizeOfContents, &QRadioButton::toggled, this, [=, this]() {
m_recursiveDirectorySizeLimit->setEnabled(m_sizeOfContents->isChecked());
});
connect(m_noDirectorySize, &QRadioButton::toggled, this, &SettingsPageBase::changed);
m_view->setAccessibleParentsObject(m_container);
#endif
setFocusProxy(m_container);
- connect(m_container->horizontalScrollBar(), &QScrollBar::valueChanged, this, [=] {
+ connect(m_container->horizontalScrollBar(), &QScrollBar::valueChanged, this, [this] {
hideToolTip();
});
- connect(m_container->verticalScrollBar(), &QScrollBar::valueChanged, this, [=] {
+ connect(m_container->verticalScrollBar(), &QScrollBar::valueChanged, this, [this] {
hideToolTip();
});