From 961803debad3c8db8753bca302887d633c8769ad Mon Sep 17 00:00:00 2001 From: nilyt <78598394+nilyt@users.noreply.github.com> Date: Sat, 7 Aug 2021 10:37:02 +0000 Subject: [PATCH] Allow building against Qt 5.11 (#3105) Co-authored-by: pajlada --- CHANGELOG.md | 1 + chatterino.pro | 2 +- src/widgets/splits/SplitInput.cpp | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f779cc74a..cb22f6b22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Bugfix: Fixed comma appended to username completion when not at the beginning of the message. (#3060) - Bugfix: Fixed bug misplacing chat when zooming on Chrome with Chatterino Native Host extension (#1936) - Bugfix: Channel point redemptions from ignored users are now properly blocked. (#3102) +- Dev: Allow building against Qt 5.11 (#3105) - Dev: Ubuntu packages are now available (#2936) - Dev: Disabled update checker on Flatpak. (#3051) - Dev: Add logging for HTTP requests (#2991) diff --git a/chatterino.pro b/chatterino.pro index cb5104bb9..2586ac790 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -14,7 +14,7 @@ CCACHE_BIN = $$system(which ccache) CONFIG+=ccache } -MINIMUM_REQUIRED_QT_VERSION = 5.12.0 +MINIMUM_REQUIRED_QT_VERSION = 5.11.0 !versionAtLeast(QT_VERSION, $$MINIMUM_REQUIRED_QT_VERSION) { error("You're trying to compile with Qt $$QT_VERSION, but minimum required Qt version is $$MINIMUM_REQUIRED_QT_VERSION") diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 41aea0132..26888f365 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -134,14 +134,18 @@ void SplitInput::themeChangedEvent() QPalette palette, placeholderPalette; palette.setColor(QPalette::WindowText, this->theme->splits.input.text); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) placeholderPalette.setColor( QPalette::PlaceholderText, this->theme->messages.textColors.chatPlaceholder); +#endif this->updateEmoteButton(); this->ui_.textEditLength->setPalette(palette); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) this->ui_.textEdit->setPalette(placeholderPalette); +#endif this->ui_.textEdit->setStyleSheet(this->theme->splits.input.styleSheet); this->ui_.hbox->setMargin(