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

Port some deprecated methods

parent 839add05
......@@ -139,7 +139,7 @@ FilterBar::FilterBar(QWidget *parent)
// Create filter editor
m_filterInput = new KLineEdit(this);
m_filterInput->setLayoutDirection(Qt::LeftToRight);
m_filterInput->setClearButtonShown(true);
m_filterInput->setClearButtonEnabled(true);
connect(m_filterInput, SIGNAL(textChanged(QString)),
this, SIGNAL(filterChanged(QString)));
setFocusProxy(m_filterInput);
......
......@@ -308,7 +308,7 @@ void SearchBarPlugin::showSelectionMenu()
for (int i = 0, count = m_searchEngines.count(); i != count; ++i) {
const KUriFilterSearchProvider &provider = m_searchProviders.value(m_searchEngines.at(i));
QAction *action = m_popupMenu->addAction(QIcon::fromTheme(provider.iconName()), provider.name());
action->setData(qVariantFromValue(i));
action->setData(QVariant::fromValue(i));
}
m_popupMenu->addSeparator();
......
......@@ -821,7 +821,7 @@ void KonqComboItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
KonqComboLineEdit::KonqComboLineEdit(QWidget *parent)
: KLineEdit(parent)
{
setClearButtonShown(true);
setClearButtonEnabled(true);
}
void KonqComboLineEdit::mouseDoubleClickEvent(QMouseEvent *e)
......
......@@ -182,7 +182,7 @@ void KonqSessionDlg::slotRename(QUrl dirpathTo)
KIO::RenameDialog dlg(this, i18nc("@title:window", "Rename Session"), dirpathFrom,
dirpathTo, KIO::RenameDialog_Options(nullptr));
if (dlg.exec() == KIO::R_RENAME) {
if (dlg.exec() == KIO::Result_Rename) {
dirpathTo = dlg.newDestUrl();
QDir dir(dirpathTo.path());
if (dir.exists()) {
......
......@@ -187,13 +187,13 @@ void KTabBar::wheelEvent(QWheelEvent *event)
{
if (!(event->orientation() == Qt::Horizontal)) {
if (receivers(SIGNAL(wheelDelta(int)))) {
emit(wheelDelta(event->delta()));
emit(wheelDelta(event->angleDelta().y()));
return;
}
int lastIndex = count() - 1;
//Set an invalid index as base case
int targetIndex = -1;
bool forward = event->delta() < 0;
bool forward = event->angleDelta().y() < 0;
if (forward && lastIndex == currentIndex()) {
targetIndex = 0;
} else if (!forward && 0 == currentIndex()) {
......
......@@ -284,7 +284,7 @@ static int errorCodeFromReply(QNetworkReply* reply)
switch (reply->error()) {
case QNetworkReply::ConnectionRefusedError:
return KIO::ERR_COULD_NOT_CONNECT;
return KIO::ERR_CANNOT_CONNECT;
case QNetworkReply::HostNotFoundError:
return KIO::ERR_UNKNOWN_HOST;
case QNetworkReply::TimeoutError:
......@@ -300,7 +300,7 @@ static int errorCodeFromReply(QNetworkReply* reply)
case QNetworkReply::ContentNotFoundError:
return KIO::ERR_NO_CONTENT;
case QNetworkReply::AuthenticationRequiredError:
return KIO::ERR_COULD_NOT_AUTHENTICATE;
return KIO::ERR_CANNOT_AUTHENTICATE;
case QNetworkReply::ProtocolUnknownError:
return KIO::ERR_UNSUPPORTED_PROTOCOL;
case QNetworkReply::ProtocolInvalidOperationError:
......
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