From: Manuel Alcaraz Zambrano Date: Wed, 17 Jul 2024 15:56:25 +0000 (+0200) Subject: Remove dead code X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/285c14dd4e2127a34c5bd936e7563be3e62baa90 Remove dead code --- diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index d2806082a..cddd43330 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1256,11 +1256,7 @@ QString KStandardItemListWidget::elideRightKeepExtension(const QString &text, in if (elidingWidth > extensionWidth && extensionLength < 6 && (float(extensionWidth) / float(elidingWidth)) < 0.3) { // if we have room to display the file extension and the extension is not too long QString ret = m_customizedFontMetrics.elidedText(text.chopped(extensionLength), Qt::ElideRight, elidingWidth - extensionWidth); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - ret.append(text.rightRef(extensionLength)); -#else ret.append(QStringView(text).right(extensionLength)); -#endif return ret; } } diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index 1fc452542..fd26d198f 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -207,15 +207,9 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent *event) m_smoothScrolling = true; -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QWheelEvent *copy = event->clone(); QApplication::sendEvent(m_scrollBar, copy); event->setAccepted(copy->isAccepted()); -#else - QWheelEvent copy = *event; - QApplication::sendEvent(m_scrollBar, ©); - event->setAccepted(copy.isAccepted()); -#endif m_smoothScrolling = previous; } diff --git a/src/main.cpp b/src/main.cpp index d68cc3cc1..703161b1e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,10 +27,6 @@ #include #include -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#include -#endif - #define HAVE_STYLE_MANAGER __has_include() #if HAVE_STYLE_MANAGER #include @@ -43,11 +39,7 @@ #include #if HAVE_X11 -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include -#else -#include -#endif #endif #ifndef Q_OS_WIN @@ -81,13 +73,6 @@ int main(int argc, char **argv) KIconTheme::initTheme(); #endif - /** - * enable high dpi support - */ -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); -#endif QApplication app(argc, argv); app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon())); @@ -108,13 +93,6 @@ int main(int argc, char **argv) KCrash::initialize(); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - Kdelibs4ConfigMigrator migrate(QStringLiteral("dolphin")); - migrate.setConfigFiles(QStringList() << QStringLiteral("dolphinrc")); - migrate.setUiFiles(QStringList() << QStringLiteral("dolphinpart.rc") << QStringLiteral("dolphinui.rc")); - migrate.migrate(); -#endif - KLocalizedString::setApplicationDomain(dolphinTranslationDomain); KAboutData aboutData(QStringLiteral("dolphin"),