Commit 50847431 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Reduce deprecated version in release

parent 6f254a53
......@@ -77,8 +77,8 @@ install(FILES
install(EXPORT KF5KontactInterfaceTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KontactInterfaceTargets.cmake NAMESPACE KF5::)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054000)
endif()
add_definitions(-DQT_NO_FOREACH)
......
......@@ -134,6 +134,7 @@ bool PimUniqueApplication::start(const QStringList &arguments)
// (which could be kontact or the standalone application),
// otherwise the current app being started will register to DBus.
qDebug() << "bool PimUniqueApplication::start(const QStringList &arguments) " << arguments;
const QString serviceName = QLatin1String("org.kde.") + appName;
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(serviceName)) {
QByteArray new_asn_id;
......
......@@ -165,12 +165,14 @@ KParts::ReadOnlyPart *Plugin::part()
QString Plugin::registerClient()
{
qDebug() << " QString Plugin::registerClient()";
if (d->serviceName.isEmpty()) {
d->serviceName = QLatin1String("org.kde.") + QLatin1String(objectName().toLatin1());
#ifdef Q_OS_WIN
const QString pid = QString::number(QCoreApplication::applicationPid());
d->serviceName.append(QLatin1String(".unique-") + pid);
#endif
qDebug() << " QString Plugin::registerClient() " << d->serviceName;
QDBusConnection::sessionBus().registerService(d->serviceName);
}
return d->serviceName;
......
Markdown is supported
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