From 6866597563f810fc7be55d7c77b104e549f708cd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Aug 2014 16:22:21 +0530 Subject: [PATCH] Fix the unified title and toolbar on Mac tweak causing calibre to fail to work because of a bug in PyQt5 --- src/calibre/gui2/layout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/layout.py b/src/calibre/gui2/layout.py index 6aa9bce46e..09dccf6cb5 100644 --- a/src/calibre/gui2/layout.py +++ b/src/calibre/gui2/layout.py @@ -297,7 +297,10 @@ class MainWindowMixin(object): # {{{ # This is disabled because it introduces various toolbar related bugs # The width of the toolbar becomes the sum of both toolbars if tweaks['unified_title_toolbar_on_osx']: - self.setUnifiedTitleAndToolBarOnMac(True) + try: + self.setUnifiedTitleAndToolBarOnMac(True) + except AttributeError: + pass # PyQt5 seems to be missing this property l = self.centralwidget.layout() l.addWidget(self.search_bar)