forked from qt-creator/qt-creator
Drop Qt5: CorePlugin: Remove code below Qt 6.0.0
Change-Id: Ib00643f43ae1dfa42ae7ce6b4275fd50dd572765 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -122,18 +122,12 @@ static QKeySequence keySequenceFromEditString(const QString &editString)
|
||||
return QKeySequence::fromString(text, QKeySequence::PortableText);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
using KeyCombination = int;
|
||||
#else
|
||||
using KeyCombination = QKeyCombination;
|
||||
#endif
|
||||
|
||||
static bool keySequenceIsValid(const QKeySequence &sequence)
|
||||
{
|
||||
if (sequence.isEmpty())
|
||||
return false;
|
||||
for (int i = 0; i < sequence.count(); ++i) {
|
||||
if (sequence[i] == KeyCombination(Qt::Key_unknown))
|
||||
if (sequence[i] == QKeyCombination(Qt::Key_unknown))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1427,11 +1427,7 @@ public:
|
||||
// with the last pixel visible
|
||||
if (fmt.property(QTextFormat::HeadingLevel) == 2) {
|
||||
QTextCharFormat charFmt = currentBlock().charFormat();
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
|
||||
charFmt.setVerticalAlignment(QTextCharFormat::AlignSuperScript);
|
||||
#else
|
||||
charFmt.setBaselineOffset(15);
|
||||
#endif
|
||||
setFormat(0, text.length(), charFmt);
|
||||
|
||||
if (h2Brush.style() == Qt::NoBrush) {
|
||||
|
||||
Reference in New Issue
Block a user