Commit 55e5d911 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated methods

parent 2d5a695d
......@@ -528,7 +528,7 @@ QVariantList IconModule::previewIcons(const QString &themeName, int size, qreal
+ QString::number(dpr,'f',1) + QLatin1Char('@') + iconNames.join(QLatin1Char(','));
QPixmap pix;
if (!QPixmapCache::find(cacheKey, pix)) {
if (!QPixmapCache::find(cacheKey, &pix)) {
if (!theme) {
theme.reset(new KIconTheme(themeName));
}
......
......@@ -27,6 +27,7 @@
#include <QX11Info>
#include <QStandardPaths>
#include <QDebug>
#include <QElapsedTimer>
#include <kprocess.h>
......@@ -100,7 +101,7 @@ void restoreXmodmap()
//TODO: make private
bool XkbHelper::runConfigLayoutCommand(const QStringList& setxkbmapCommandArguments)
{
QTime timer;
QElapsedTimer timer;
timer.start();
KProcess setxkbmapProcess;
......
......@@ -1289,7 +1289,7 @@ void CFontListSortFilterProxy::setFilterGroup(CGroupListItem *grp)
itsGroup=grp;
// if(!(wasNull && itsGroup && CGroupListItem::ALL==itsGroup->type()))
clear();
invalidate();
}
}
......@@ -1362,7 +1362,7 @@ void CFontListSortFilterProxy::timeout()
}
else
{
clear();
invalidate();
emit refresh();
}
}
......@@ -1371,7 +1371,7 @@ void CFontListSortFilterProxy::fcResults()
{
if(CFontFilter::CRIT_FONTCONFIG==itsFilterCriteria)
{
clear();
invalidate();
emit refresh();
}
}
......@@ -1386,8 +1386,8 @@ CFontListView::CFontListView(QWidget *parent, CFontList *model)
itsModel=model;
header()->setStretchLastSection(false);
resizeColumnToContents(COL_STATUS);
header()->setResizeMode(COL_STATUS, QHeaderView::Fixed);
header()->setResizeMode(COL_FONT, QHeaderView::Stretch);
header()->setSectionResizeMode(COL_STATUS, QHeaderView::Fixed);
header()->setSectionResizeMode(COL_FONT, QHeaderView::Stretch);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setSortingEnabled(true);
......@@ -1398,7 +1398,7 @@ CFontListView::CFontListView(QWidget *parent, CFontList *model)
setDropIndicatorShown(false);
setDragEnabled(true);
setDragDropMode(QAbstractItemView::DragDrop);
header()->setClickable(true);
header()->setSectionsClickable(true);
header()->setSortIndicatorShown(true);
connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(itemCollapsed(QModelIndex)));
connect(header(), SIGNAL(sectionClicked(int)), SLOT(setSortColumn(int)));
......@@ -1710,7 +1710,7 @@ void CFontListView::setSortColumn(int col)
if(col!=itsProxy->filterKeyColumn())
{
itsProxy->setFilterKeyColumn(col);
itsProxy->clear();
itsProxy->invalidate();
}
}
......
......@@ -157,7 +157,7 @@ class CPreviewListViewDelegate : public QStyledItemDelegate
QTextStream(&key) << "kfi-" << item->name() << "-" << item->style() << "-" << text.rgba();
if(!QPixmapCache::find(key, pix))
if(!QPixmapCache::find(key, &pix))
{
QColor bgnd(Qt::black);
......
......@@ -34,6 +34,7 @@
#include <QProcess>
#include <QTemporaryFile>
#include <QStandardPaths>
#include <QUrlQuery>
#include <unistd.h>
#include <ctype.h>
......
......@@ -156,9 +156,9 @@ void CFontPreview::mouseMoveEvent(QMouseEvent *event)
void CFontPreview::wheelEvent(QWheelEvent *e)
{
if(e->delta()>0)
if(e->angleDelta().y()>0)
zoomIn();
else if(e->delta()<0)
else if(e->angleDelta().y()<0)
zoomOut();
e->accept();
......
......@@ -848,7 +848,7 @@ void runRdb( uint flags )
applyQtSettings( kglobalcfg, *settings ); // For kcmstyle
delete settings;
QApplication::flush();
QCoreApplication::processEvents();
#if HAVE_X11
if (qApp->platformName() == QLatin1String("xcb")) {
// We let KIPC take care of ourselves, as we are in a KDE app with
......
......@@ -379,10 +379,10 @@ XcbAtom &LibinputTouchpad::touchpadOffAtom()
template<typename T>
bool LibinputTouchpad::valueLoader(Prop<T> &prop)
{
const Parameter *p = findParameter(QString::fromAscii(prop.name));
const Parameter *p = findParameter(QString::fromLatin1(prop.name));
if (!p) {
qCCritical(KCM_TOUCHPAD) << "Error on read of " << QString::fromAscii(prop.name);
qCCritical(KCM_TOUCHPAD) << "Error on read of " << QString::fromLatin1(prop.name);
}
QVariant reply = getParameter(p);
......
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