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

Make it compiles without deprecated method

parent 01ea8423
......@@ -57,6 +57,9 @@ find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED)
# Disables automatic conversions from QString (or char *) to QUrl.
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
find_package(X11)
find_package(XCB COMPONENTS XCB)
......
......@@ -5,7 +5,7 @@
*/
#include "sudlg.h"
#include <kwidgetsaddons_version.h>
#include <QByteArray>
#include <KLocalizedString>
......@@ -16,7 +16,11 @@ KDEsuDialog::KDEsuDialog(QByteArray user, QByteArray authUser, bool enableKeep,
: KPasswordDialog(nullptr, enableKeep ? ShowKeepPassword : NoFlags)
{
if ( !icon.isEmpty() ) {
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5,63,0)
setIcon(QIcon::fromTheme(icon));
#else
setPixmap(QIcon::fromTheme(icon).pixmap(style()->pixelMetric(QStyle::PM_LargeIconSize)));
#endif
}
if ( withIgnoreButton ) {
......
......@@ -332,7 +332,7 @@ void FileTypeDetails::setMimeTypeData( MimeTypeData * mimeTypeData, TypesListIte
iconButton->setToolTip(mimeTypeData->icon());
}
else
iconLabel->setPixmap(DesktopIcon(mimeTypeData->icon()));
iconLabel->setPixmap(QIcon::fromTheme(mimeTypeData->icon()).pixmap(KIconLoader::SizeLarge));
description->setText(mimeTypeData->comment());
m_rbGroupSettings->setText( i18n("Use settings for '%1' group", mimeTypeData->majorType() ) );
extensionLB->clear();
......
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