mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 19:50:27 +00:00
Remove kdelibs4 migration code when using Qt6
Upgrading 4->6 is not supported by KF6
This commit is contained in:
parent
e41f682b3d
commit
4addfcc4ec
|
@ -61,7 +61,9 @@
|
|||
#include <KProcess>
|
||||
#include <KRun>
|
||||
#include <KShell>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <Kdelibs4Migration>
|
||||
#endif
|
||||
#include <kio_version.h>
|
||||
#include <kzip.h>
|
||||
|
||||
|
@ -2288,6 +2290,8 @@ QString DocumentPrivate::docDataFileName(const QUrl &url, qint64 document_size)
|
|||
QDir().mkpath(docdataDir);
|
||||
}
|
||||
QString newokularfile = docdataDir + QLatin1Char('/') + fn;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
// we don't want to accidentally migrate old files when running unit tests
|
||||
if (!QFile::exists(newokularfile) && !QStandardPaths::isTestModeEnabled()) {
|
||||
// see if an KDE4 file still exists
|
||||
|
@ -2303,6 +2307,7 @@ QString DocumentPrivate::docDataFileName(const QUrl &url, qint64 document_size)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return newokularfile;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,8 +74,10 @@
|
|||
#include <KToggleAction>
|
||||
#include <KToggleFullScreenAction>
|
||||
#include <KToolBar>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <Kdelibs4ConfigMigrator>
|
||||
#include <Kdelibs4Migration>
|
||||
#endif
|
||||
#if HAVE_KWALLET
|
||||
#include <KWallet>
|
||||
#endif
|
||||
|
@ -623,6 +625,7 @@ void Part::setupConfigSkeleton(const QVariantList &args, const QString &componen
|
|||
configFilePath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1Char('/') + configFileName;
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
// Migrate old config
|
||||
if (!QFile::exists(configFilePath)) {
|
||||
qCDebug(OkularUiDebug) << "Did not find a config file, attempting to look for old config";
|
||||
|
@ -655,6 +658,7 @@ void Part::setupConfigSkeleton(const QVariantList &args, const QString &componen
|
|||
qCDebug(OkularUiDebug) << "Migrated old okular config";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
KSharedConfigPtr config = KSharedConfig::openConfig(configFilePath);
|
||||
|
||||
|
|
Loading…
Reference in a new issue