Fix path against qt6/qt5

wilder-5.25
Laurent Montel 4 years ago
parent b55d32857e
commit d53aea4f66
  1. 5
      interactiveconsole/interactiveconsole.cpp
  2. 3
      kcms/formats/localelistmodel.cpp
  3. 4
      kcms/kfontinst/apps/Viewer.cpp

@ -120,8 +120,9 @@ InteractiveConsole::InteractiveConsole(ConsoleMode mode, QWidget *parent)
editorLayout->addWidget(toolBar);
auto tryLoadingKatePart = [=]() -> KTextEditor::Document * {
const auto loadResult = KPluginFactory::instantiatePlugin<KTextEditor::Document>(KPluginMetaData(QStringLiteral("kf5/parts/katepart")), this);
const auto loadResult =
KPluginFactory::instantiatePlugin<KTextEditor::Document>(KPluginMetaData(QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR) "/parts/katepart")),
this);
if (!loadResult) {
qWarning() << "Error loading katepart plugin:" << loadResult.errorString;
return nullptr;

@ -57,7 +57,8 @@ QVariant LocaleListModel::data(const QModelIndex &index, int role) const
if (split.count() > 1) {
flagCode = split[1].toLower();
}
auto flagIconPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/locale/countries/%1/flag.png").arg(flagCode));
auto flagIconPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR) "/locale/countries/%1/flag.png").arg(flagCode));
return flagIconPath;
}
case DisplayName: {

@ -28,7 +28,9 @@ namespace KFI
{
CViewer::CViewer()
{
const auto result = KPluginFactory::instantiatePlugin<KParts::ReadOnlyPart>(KPluginMetaData(QStringLiteral("kf5/parts/kfontviewpart")), this);
const auto result =
KPluginFactory::instantiatePlugin<KParts::ReadOnlyPart>(KPluginMetaData(QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR) "/parts/kfontviewpart")),
this);
if (!result) {
qCWarning(KFONTVIEW_DEBUG) << "Error loading kfontviewpart:" << result.errorString;

Loading…
Cancel
Save