mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed build and crash in YACReader MacOSX
This commit is contained in:
parent
877f68fd98
commit
dd8a1eb417
@ -46,7 +46,7 @@ macx{
|
|||||||
#LIBS += -L/usr/local/lib -lpoppler-qt4
|
#LIBS += -L/usr/local/lib -lpoppler-qt4
|
||||||
#}
|
#}
|
||||||
CONFIG += objective_c
|
CONFIG += objective_c
|
||||||
QT += macextras
|
QT += macextras gui-private
|
||||||
|
|
||||||
|
|
||||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||||
|
@ -162,6 +162,7 @@ YACReaderMacOSXToolbar::YACReaderMacOSXToolbar(QObject *parent)
|
|||||||
((MyToolbarDelegate *)delegate)->mytoolbar = this;
|
((MyToolbarDelegate *)delegate)->mytoolbar = this;
|
||||||
[nativeToolBar setDelegate:(MyToolbarDelegate *)delegate];
|
[nativeToolBar setDelegate:(MyToolbarDelegate *)delegate];
|
||||||
|
|
||||||
|
#ifdef YACREADER_LIBRARY
|
||||||
NSWindow *nswindow = (NSWindow*) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", ((QMainWindow*)parent)->windowHandle());
|
NSWindow *nswindow = (NSWindow*) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", ((QMainWindow*)parent)->windowHandle());
|
||||||
if([nswindow respondsToSelector:@selector(setTitleVisibility:)])
|
if([nswindow respondsToSelector:@selector(setTitleVisibility:)])
|
||||||
{
|
{
|
||||||
@ -169,6 +170,8 @@ YACReaderMacOSXToolbar::YACReaderMacOSXToolbar(QObject *parent)
|
|||||||
[nswindow setTitleVisibility:1];
|
[nswindow setTitleVisibility:1];
|
||||||
}else
|
}else
|
||||||
yosemite = false;
|
yosemite = false;
|
||||||
|
#endif
|
||||||
|
yosemite = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void YACReaderMacOSXToolbar::addAction(QAction *action)
|
void YACReaderMacOSXToolbar::addAction(QAction *action)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user