Commit 9583c576 authored by Laurent Montel's avatar Laurent Montel
Browse files

Remove old code

parent c2494c96
Pipeline #224314 passed with stage
in 57 seconds
......@@ -275,9 +275,7 @@ bool Cache::prepareToLoadCachedItems()
switch(version) {
case 2:
dataStreamVersion = CacheDataStream::Qt_4_3;
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
Q_FALLTHROUGH();
#endif
// Other than that we're compatible with cache v1, so fallthrough
// to setCacheVersion
......
......@@ -508,12 +508,7 @@ void CollectionListItem::refresh()
sharedData()->metadata[id] = toLower;
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
int newWidth = treeWidget()->fontMetrics().horizontalAdvance(text(i));
#else
// .width is deprecated in Qt 5.11 or later
int newWidth = treeWidget()->fontMetrics().width(text(i));
#endif
if(newWidth != sharedData()->cachedWidths[i])
playlist()->slotWeightDirty(i);
......
......@@ -942,11 +942,7 @@ void FileRenamer::setFolderIcon(const QUrl &dstURL, const PlaylistItem *item)
// Split path, and go through each path element. If a path element has
// the album information, set its folder icon.
QStringList elements = dstURL.path().split('/',
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
Qt::SkipEmptyParts
#else
QString::SkipEmptyParts
#endif
);
QString path;
......
......@@ -1917,11 +1917,7 @@ void Playlist::slotUpdateColumnWidths()
// convenience handler for deprecated text metrics
const auto textWidth = [](const QFontMetrics &fm, const QString &text) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
return fm.horizontalAdvance(text);
#else
return fm.width(text);
#endif
};
// No item content to auto-fit around, use the headers for now
......
......@@ -103,14 +103,6 @@ PlaylistCollection::PlaylistCollection(PlayerManager *player, QStackedWidget *pl
m_actionHandler = new ActionHandler(this);
#if KIO_VERSION < QT_VERSION_CHECK(5, 82, 0)
// KDirLister's auto error handling seems to crash JuK during startup in
// readConfig(). This auto handler was removed in KF5.82 so no longer
// needs disabled afterward.
m_dirLister.setAutoErrorHandlingEnabled(false, playlistStack);
#endif
readConfig();
}
......
......@@ -16,12 +16,7 @@
#include <QtGlobal>
#include <algorithm>
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
#include <QConcatenateTablesProxyModel>
#else
#include <KConcatenateRowsProxyModel>
typedef KConcatenateRowsProxyModel QConcatenateTablesProxyModel;
#endif
#include "playlistsearch.h"
#include "playlist.h"
......
Supports Markdown
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