Commit dc5e7e98 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

use the actual filesharingpage API when appropriate

setFileSharingPage and showFileSharingPage were effectively no-op until
5.75. they have been repaired and so we can use them properly now.

we are already in 20.12 dependency freeze so we'll want to avoid bumping
the required version. for trivial backwards compat there's a legacy
addPage() call still
parent 66c6d493
......@@ -30,6 +30,7 @@
#include <KSambaShareData>
#include <KService>
#include <KIO/ApplicationLauncherJob>
#include <KCoreAddons>
#include "model.h"
#include "usermanager.h"
......@@ -212,11 +213,14 @@ SambaUserSharePlugin::SambaUserSharePlugin(QObject *parent, const QList<QVariant
const QUrl url(QStringLiteral("qrc:/org.kde.filesharing.samba/qml/main.qml"));
auto item = properties->addPage(m_page.get(), i18nc("@title:tab", "Share"));
if (qEnvironmentVariableIsSet("TEST_FOCUS_SHARE")) {
QTimer::singleShot(100, [item, this] {
// Bump dependency after our 20.12 release to get rid of the if.
if (KCoreAddons::version() >= QT_VERSION_CHECK(5, 75, 0)) {
if (qEnvironmentVariableIsSet("TEST_FOCUS_SHARE")) {
QTimer::singleShot(100, properties, &KPropertiesDialog::showFileSharingPage);
} else { // << 7.75 was broken, hack around it
properties->addPage(m_page.get(), i18nc("@title:tab", "Share"));
QTimer::singleShot(0, [this] {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment