]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Remove dead code
authorManuel Alcaraz Zambrano <manuelalcarazzam@gmail.com>
Wed, 17 Jul 2024 15:56:25 +0000 (17:56 +0200)
committerManuel Alcaraz Zambrano <manuelalcarazzam@gmail.com>
Wed, 17 Jul 2024 15:56:25 +0000 (17:56 +0200)
src/kitemviews/kstandarditemlistwidget.cpp
src/kitemviews/private/kitemlistsmoothscroller.cpp
src/main.cpp

index d2806082afc7f56ceb4d24d21f6981011a4247ff..cddd433306c05f7ecd447109cd35bcb6b211a69f 100644 (file)
@@ -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 (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));
             ret.append(QStringView(text).right(extensionLength));
-#endif
             return ret;
         }
     }
             return ret;
         }
     }
index 1fc452542ea7148951945ab9f17c6dd731e40efe..fd26d198f23b5c4a8dd22ccf0dec4ad9d71e18ea 100644 (file)
@@ -207,15 +207,9 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent *event)
 
     m_smoothScrolling = true;
 
 
     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());
     QWheelEvent *copy = event->clone();
     QApplication::sendEvent(m_scrollBar, copy);
     event->setAccepted(copy->isAccepted());
-#else
-    QWheelEvent copy = *event;
-    QApplication::sendEvent(m_scrollBar, &copy);
-    event->setAccepted(copy.isAccepted());
-#endif
 
     m_smoothScrolling = previous;
 }
 
     m_smoothScrolling = previous;
 }
index d68cc3cc1e8f429d06f8235b8629598038b9999d..703161b1e83726fee543778b74bcfef9f6373606 100644 (file)
 #include <KLocalizedString>
 #include <KWindowSystem>
 
 #include <KLocalizedString>
 #include <KWindowSystem>
 
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#include <Kdelibs4ConfigMigrator>
-#endif
-
 #define HAVE_STYLE_MANAGER __has_include(<KStyleManager>)
 #if HAVE_STYLE_MANAGER
 #include <KStyleManager>
 #define HAVE_STYLE_MANAGER __has_include(<KStyleManager>)
 #if HAVE_STYLE_MANAGER
 #include <KStyleManager>
 #include <QSessionManager>
 
 #if HAVE_X11
 #include <QSessionManager>
 
 #if HAVE_X11
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
 #include <private/qtx11extras_p.h>
 #include <private/qtx11extras_p.h>
-#else
-#include <QX11Info>
-#endif
 #endif
 
 #ifndef Q_OS_WIN
 #endif
 
 #ifndef Q_OS_WIN
@@ -81,13 +73,6 @@ int main(int argc, char **argv)
     KIconTheme::initTheme();
 #endif
 
     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()));
 
     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();
 
 
     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"),
     KLocalizedString::setApplicationDomain(dolphinTranslationDomain);
 
     KAboutData aboutData(QStringLiteral("dolphin"),