diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b7ac25b2..b7a532b91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -238,6 +238,9 @@ target_link_libraries(${PROGNAME} if(UNIX AND NOT APPLE) target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY}) endif() +if(APPLE) + set_target_properties(${PROGNAME} PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit") +endif() set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON) diff --git a/src/gui/qocoa/CMakeLists.txt b/src/gui/qocoa/CMakeLists.txt index 7ea00cc65..c1dcdce35 100644 --- a/src/gui/qocoa/CMakeLists.txt +++ b/src/gui/qocoa/CMakeLists.txt @@ -45,6 +45,6 @@ endif() add_library (Qocoa STATIC ${SOURCES} ${MOC_SOURCES} ${HEADERS} ${RESOURCES_SOURCES}) -if(APPLE) - set_target_properties(Qocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit") -endif() +#if(APPLE) +# set_target_properties(Qocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit") +#endif() diff --git a/src/gui/qocoa/qbutton_mac.mm b/src/gui/qocoa/qbutton_mac.mm index 15490e453..dccc771ac 100644 --- a/src/gui/qocoa/qbutton_mac.mm +++ b/src/gui/qocoa/qbutton_mac.mm @@ -137,7 +137,7 @@ public: void clicked() { - emit qButton->clicked(qButton->isChecked()); + Q_EMIT qButton->clicked(qButton->isChecked()); } ~QButtonPrivate() { diff --git a/src/gui/qocoa/qocoa_mac.h b/src/gui/qocoa/qocoa_mac.h index ced431173..74bee4418 100644 --- a/src/gui/qocoa/qocoa_mac.h +++ b/src/gui/qocoa/qocoa_mac.h @@ -21,9 +21,9 @@ THE SOFTWARE. */ #include -#include -#include -#include +#include +#include +#include static inline NSString* fromQString(const QString &string) { diff --git a/src/gui/qocoa/qsearchfield_mac.mm b/src/gui/qocoa/qsearchfield_mac.mm index 7b43ecc75..4c2db3944 100644 --- a/src/gui/qocoa/qsearchfield_mac.mm +++ b/src/gui/qocoa/qsearchfield_mac.mm @@ -28,8 +28,8 @@ THE SOFTWARE. #import "Foundation/NSNotification.h" #import "AppKit/NSSearchField.h" -#include -#include +#include +#include #define KEYCODE_A 0 #define KEYCODE_X 7 @@ -45,19 +45,19 @@ public: void textDidChange(const QString &text) { if (qSearchField) - emit qSearchField->textChanged(text); + Q_EMIT qSearchField->textChanged(text); } void textDidEndEditing() { if (qSearchField) - emit qSearchField->editingFinished(); + Q_EMIT qSearchField->editingFinished(); } void returnPressed() { if (qSearchField) - emit qSearchField->returnPressed(); + Q_EMIT qSearchField->returnPressed(); } QPointer qSearchField; @@ -193,7 +193,7 @@ void QSearchField::clear() return; [pimpl->nsSearchField setStringValue:@""]; - emit textChanged(QString()); + Q_EMIT textChanged(QString()); } void QSearchField::selectAll() @@ -246,9 +246,9 @@ void QSearchField::changeEvent(QEvent* event) return; const bool enabled = isEnabled(); - [pimpl->nsSearchField setEnabled: enabled] + [pimpl->nsSearchField setEnabled: enabled]; } - QWidget::changeEvent(event); + QWidget::changeEvent(event); } void QSearchField::resizeEvent(QResizeEvent *resizeEvent)