Browse Source

UI: Fix build issue with older linux Qt5 packages

QMainWindow::resizeDocks isn't supported on certain long-term support
distros (ubuntu trusty in particular), so instead just restore the
starting state and don't try to recalculate the ideal positioning.
jp9000 8 years ago
parent
commit
8b68ccdc13
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UI/window-basic-main.cpp

+ 2 - 0
UI/window-basic-main.cpp

@@ -5288,6 +5288,7 @@ void OBSBasic::on_resetUI_triggered()
 {
 	restoreState(startingDockLayout);
 
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
 	int cx = width();
 	int cy = height();
 
@@ -5322,6 +5323,7 @@ void OBSBasic::on_resetUI_triggered()
 
 	resizeDocks(docks, {cy, cy, cy, cy, cy}, Qt::Vertical);
 	resizeDocks(docks, sizes, Qt::Horizontal);
+#endif
 }
 
 void OBSBasic::on_lockUI_toggled(bool lock)