Fix Qt6 building (#4393)
This commit is contained in:
@@ -62,7 +62,11 @@ QString ResizingTextEdit::textUnderCursor(bool *hadSpace) const
|
||||
|
||||
auto textUpToCursor = currentText.left(tc.selectionStart());
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
auto words = QStringView{textUpToCursor}.split(' ');
|
||||
#else
|
||||
auto words = textUpToCursor.splitRef(' ');
|
||||
#endif
|
||||
if (words.size() == 0)
|
||||
{
|
||||
return QString();
|
||||
|
||||
@@ -54,7 +54,7 @@ void SettingsDialogTab::paintEvent(QPaintEvent *)
|
||||
QPainter painter(this);
|
||||
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
opt.initFrom(this);
|
||||
|
||||
this->style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user