mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Fix Qt6 build for windows
This commit is contained in:
@@ -917,22 +917,24 @@ inline bool Profile::canInheritProperty(Property p)
|
||||
template<class T>
|
||||
inline T Profile::property(Property p) const
|
||||
{
|
||||
return property<QVariant>(p).value<T>();
|
||||
}
|
||||
auto getVariant = [this, p]() {
|
||||
auto it = _propertyValues.find(p);
|
||||
if (it != _propertyValues.end()) {
|
||||
return it->second;
|
||||
} else if (_parent && canInheritProperty(p)) {
|
||||
return _parent->property<QVariant>(p);
|
||||
} else {
|
||||
return QVariant();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
inline QVariant Profile::property(Property p) const
|
||||
{
|
||||
auto it = _propertyValues.find(p);
|
||||
if (it != _propertyValues.end()) {
|
||||
return it->second;
|
||||
} else if (_parent && canInheritProperty(p)) {
|
||||
return _parent->property<QVariant>(p);
|
||||
} else {
|
||||
return QVariant();
|
||||
if constexpr (std::is_same_v<T, QVariant>) {
|
||||
return getVariant();
|
||||
}
|
||||
}
|
||||
|
||||
const QVariant variant = getVariant();
|
||||
return variant.value<T>();
|
||||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
#define IPTYPROCESS_H
|
||||
|
||||
#include <QDebug>
|
||||
#include <QIODevice>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
|
||||
#define CONPTY_MINIMAL_WINDOWS_VERSION 18309
|
||||
|
||||
|
||||
Reference in New Issue
Block a user