Commit 0813d670 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove deprecated methods

parent 18c3aa64
......@@ -27,7 +27,6 @@
K_PLUGIN_FACTORY(KCMComponentChooserFactory,
registerPlugin<KCMComponentChooser>();
)
K_EXPORT_PLUGIN(KCMComponentChooserFactory("kcmcomponentchooser"))
KCMComponentChooser::KCMComponentChooser(QWidget *parent, const QVariantList &):
KCModule(parent) {
......
......@@ -19,6 +19,7 @@
***************************************************************************/
#include "emoticonslist.h"
#include <kconfigwidgets_version.h>
#include <QString>
#include <QDir>
#include <QIcon>
......@@ -232,7 +233,11 @@ void EmoticonList::selectTheme()
new QListWidgetItem(QIcon(it.key()), text, emoList);
}
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
void EmoticonList::btRemoveThemeClicked()
......@@ -302,7 +307,11 @@ void EmoticonList::addEmoticon()
if (theme.addEmoticon(dlg->getEmoticon(), dlg->getText(), KEmoticonsProvider::Copy)) {
new QListWidgetItem(QPixmap(dlg->getEmoticon()), dlg->getText(), emoList);
themeList->currentItem()->setIcon(QIcon(previewEmoticon(theme)));
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
delete dlg;
}
......@@ -355,7 +364,11 @@ void EmoticonList::editEmoticon()
new QListWidgetItem(QPixmap(emo), dlg->getText(), emoList);
}
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
delete dlg;
}
......
......@@ -77,7 +77,6 @@
K_PLUGIN_FACTORY(FontInstallFactory,
registerPlugin<KFI::CKCmFontInst>();
)
K_EXPORT_PLUGIN(FontInstallFactory("fontinst"))
namespace KFI
{
......
......@@ -625,20 +625,20 @@ void CKioFonts::createUDSEntry(KIO::UDSEntry &entry, EFolder folder)
{
KFI_DBUG << QString(FOLDER_SYS==folder ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER));
entry.clear();
entry.insert(KIO::UDSEntry::UDS_NAME, FOLDER_ROOT==folder || Misc::root()
entry.fastInsert(KIO::UDSEntry::UDS_NAME, FOLDER_ROOT==folder || Misc::root()
? i18n("Fonts")
: FOLDER_SYS==folder
? i18n(KFI_KIO_FONTS_SYS)
: i18n(KFI_KIO_FONTS_USER));
entry.insert(KIO::UDSEntry::UDS_ACCESS, !Misc::root() && FOLDER_SYS==folder ? 0444 : 0744);
entry.insert(KIO::UDSEntry::UDS_USER, Misc::root() || FOLDER_SYS==folder
entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, !Misc::root() && FOLDER_SYS==folder ? 0444 : 0744);
entry.fastInsert(KIO::UDSEntry::UDS_USER, Misc::root() || FOLDER_SYS==folder
? QString::fromLatin1("root")
: getUserName(getuid()));
entry.insert(KIO::UDSEntry::UDS_GROUP, Misc::root() || FOLDER_SYS==folder
entry.fastInsert(KIO::UDSEntry::UDS_GROUP, Misc::root() || FOLDER_SYS==folder
? QString::fromLatin1("root")
: getGroupName(getgid()));
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, QString::fromLatin1("inode/directory"));
entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
entry.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, QString::fromLatin1("inode/directory"));
}
bool CKioFonts::createUDSEntry(KIO::UDSEntry &entry, EFolder folder, const Family &family, const Style &style)
......@@ -681,9 +681,9 @@ bool CKioFonts::createUDSEntry(KIO::UDSEntry &entry, EFolder folder, const Famil
entry.clear();
entry.insert(KIO::UDSEntry::UDS_NAME, name);
entry.insert(KIO::UDSEntry::UDS_SIZE, size);
entry.insert(UDS_EXTRA_FC_STYLE, style.value());
entry.fastInsert(KIO::UDSEntry::UDS_NAME, name);
entry.fastInsert(KIO::UDSEntry::UDS_SIZE, size);
entry.fastInsert(UDS_EXTRA_FC_STYLE, style.value());
QList<File>::ConstIterator it(files.constBegin()),
end(files.constEnd());
......@@ -727,19 +727,19 @@ bool CKioFonts::createUDSEntry(KIO::UDSEntry &entry, EFolder folder, const Famil
extension=(*patterns.begin()).remove("*");
}
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, buff.st_mode&S_IFMT);
entry.insert(KIO::UDSEntry::UDS_ACCESS, buff.st_mode&07777);
entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, buff.st_mtime);
entry.insert(KIO::UDSEntry::UDS_ACCESS_TIME, buff.st_atime);
entry.insert(KIO::UDSEntry::UDS_USER, getUserName(buff.st_uid));
entry.insert(KIO::UDSEntry::UDS_GROUP, getGroupName(buff.st_gid));
entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, mt);
entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, buff.st_mode&S_IFMT);
entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, buff.st_mode&07777);
entry.fastInsert(KIO::UDSEntry::UDS_MODIFICATION_TIME, buff.st_mtime);
entry.fastInsert(KIO::UDSEntry::UDS_ACCESS_TIME, buff.st_atime);
entry.fastInsert(KIO::UDSEntry::UDS_USER, getUserName(buff.st_uid));
entry.fastInsert(KIO::UDSEntry::UDS_GROUP, getGroupName(buff.st_gid));
entry.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, mt);
if(hidden)
{
entry.insert(KIO::UDSEntry::UDS_HIDDEN, 1);
entry.insert(UDS_EXTRA_FILE_NAME, (*it).path());
entry.insert(UDS_EXTRA_FILE_FACE, (*it).path());
entry.fastInsert(KIO::UDSEntry::UDS_HIDDEN, 1);
entry.fastInsert(UDS_EXTRA_FILE_NAME, (*it).path());
entry.fastInsert(UDS_EXTRA_FILE_FACE, (*it).path());
}
QString path(QString::fromLatin1("/"));
......@@ -758,7 +758,7 @@ bool CKioFonts::createUDSEntry(KIO::UDSEntry &entry, EFolder folder, const Famil
QUrl url(QUrl::fromLocalFile(path));
url.setScheme(KFI_KIO_FONTS_PROTOCOL);
entry.insert(KIO::UDSEntry::UDS_URL, url.url());
entry.fastInsert(KIO::UDSEntry::UDS_URL, url.url());
return true;
}
}
......
......@@ -222,7 +222,9 @@ bool KNetAttach::validateCurrentPage()
return false;
}
KRun::runUrl(url, QStringLiteral("inode/directory"), this);
KRun::RunFlags flags;
flags |= KRun::RunExecutables;
KRun::runUrl(url, QStringLiteral("inode/directory"), this, flags);
QString name = _connectionName->text().trimmed();
......
......@@ -19,7 +19,7 @@
***************************************************************************/
#include "DeviceAutomounterKCM.h"
#include <kconfigwidgets_version.h>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QStandardItem>
......@@ -61,7 +61,11 @@ DeviceAutomounterKCM::DeviceAutomounterKCM(QWidget *parent, const QVariantList &
deviceView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
auto emitChanged = [this] {
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
};
connect(automountOnLogin, &QCheckBox::stateChanged, this, emitChanged);
......@@ -106,7 +110,11 @@ void DeviceAutomounterKCM::forgetSelectedDevices()
m_devices->forgetDevice(selected->selectedIndexes()[offset].data(DeviceModel::UdiRole).toString());
}
}
changed();
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
void DeviceAutomounterKCM::enabledChanged()
......
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