Commit 4a94f0c2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It compiles fine without deprecated methods

parent f9b8de2e
......@@ -18,6 +18,12 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core)
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS DBusAddons DNSSD I18n KIO)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
add_subdirectory(ioslave)
add_subdirectory(kdedmodule)
......
......@@ -234,12 +234,12 @@ void ZeroConfProtocol::addServiceType( const QString& serviceType )
void ZeroConfProtocol::addService( KDNSSD::RemoteService::Ptr service )
{
UDSEntry entry;
entry.insert( UDSEntry::UDS_NAME, service->serviceName() );
entry.insert( UDSEntry::UDS_ACCESS, 0666);
entry.insert( UDSEntry::UDS_FILE_TYPE, S_IFDIR );
entry.fastInsert(UDSEntry::UDS_NAME, service->serviceName() );
entry.fastInsert( UDSEntry::UDS_ACCESS, 0666);
entry.fastInsert( UDSEntry::UDS_FILE_TYPE, S_IFDIR );
const QString iconName = KProtocolInfo::icon( knownProtocols[service->type()].protocol );
if (!iconName.isNull())
entry.insert( UDSEntry::UDS_ICON_NAME, iconName );
entry.fastInsert( UDSEntry::UDS_ICON_NAME, iconName );
listEntry( entry );
}
......@@ -266,12 +266,12 @@ void ZeroConfProtocol::onBrowserFinished()
void ZeroConfProtocol::feedEntryAsDir( UDSEntry* entry, const QString& name, const QString& displayName )
{
entry->insert( UDSEntry::UDS_NAME, name );
entry->insert( UDSEntry::UDS_ACCESS, 0555 );
entry->insert( UDSEntry::UDS_FILE_TYPE, S_IFDIR );
entry->insert( UDSEntry::UDS_MIME_TYPE, QStringLiteral("inode/directory") );
entry->fastInsert( UDSEntry::UDS_NAME, name );
entry->fastInsert( UDSEntry::UDS_ACCESS, 0555 );
entry->fastInsert( UDSEntry::UDS_FILE_TYPE, S_IFDIR );
entry->fastInsert( UDSEntry::UDS_MIME_TYPE, QStringLiteral("inode/directory") );
if (!displayName.isEmpty())
entry->insert( UDSEntry::UDS_DISPLAY_NAME, displayName );
entry->fastInsert( UDSEntry::UDS_DISPLAY_NAME, displayName );
}
void ZeroConfProtocol::enterLoop()
......
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