Explorar o código

UI: Remove compatibility for QT < 5.10

derrod %!s(int64=3) %!d(string=hai) anos
pai
achega
5620a469a9
Modificáronse 4 ficheiros con 0 adicións e 21 borrados
  1. 0 14
      UI/auth-youtube.cpp
  2. 0 1
      UI/auth-youtube.hpp
  3. 0 2
      UI/obs-proxy-style.cpp
  4. 0 4
      UI/properties-view.cpp

+ 0 - 14
UI/auth-youtube.cpp

@@ -7,9 +7,7 @@
 #include <QDesktopServices>
 #include <QHBoxLayout>
 #include <QUrl>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
 #include <QRandomGenerator>
-#endif
 
 #ifdef WIN32
 #include <windows.h>
@@ -200,7 +198,6 @@ void YoutubeAuth::ResetChat()
 
 QString YoutubeAuth::GenerateState()
 {
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
 	char state[YOUTUBE_API_STATE_LENGTH + 1];
 	QRandomGenerator *rng = QRandomGenerator::system();
 	int i;
@@ -210,17 +207,6 @@ QString YoutubeAuth::GenerateState()
 	state[i] = 0;
 
 	return state;
-#else
-	std::uniform_int_distribution<> distr(0, allowedCount);
-	std::string result;
-	result.reserve(YOUTUBE_API_STATE_LENGTH);
-	std::generate_n(std::back_inserter(result), YOUTUBE_API_STATE_LENGTH,
-			[&] {
-				return static_cast<char>(
-					allowedChars[distr(randomSeed)]);
-			});
-	return result.c_str();
-#endif
 }
 
 // Static.

+ 0 - 1
UI/auth-youtube.hpp

@@ -40,7 +40,6 @@ class YoutubeAuth : public OAuthStreamKey {
 	Q_OBJECT
 
 	bool uiLoaded = false;
-	std::mt19937 randomSeed;
 	std::string section;
 
 #ifdef BROWSER_AVAILABLE

+ 0 - 2
UI/obs-proxy-style.cpp

@@ -82,10 +82,8 @@ int OBSIgnoreWheelProxyStyle::styleHint(StyleHint hint,
 					const QWidget *widget,
 					QStyleHintReturn *returnData) const
 {
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
 	if (hint == SH_ComboBox_AllowWheelScrolling)
 		return 0;
-#endif
 
 	return QProxyStyle::styleHint(hint, option, widget, returnData);
 }

+ 0 - 4
UI/properties-view.cpp

@@ -269,11 +269,7 @@ QWidget *OBSPropertiesView::AddText(obs_property_t *prop, QFormLayout *layout,
 
 	if (type == OBS_TEXT_MULTILINE) {
 		QPlainTextEdit *edit = new QPlainTextEdit(QT_UTF8(val));
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
 		edit->setTabStopDistance(40);
-#else
-		edit->setTabStopWidth(40);
-#endif
 		if (monospace) {
 			QFont f("Courier");
 			f.setStyleHint(QFont::Monospace);