mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Qocoa compilation fix for MacOS.
This commit is contained in:
parent
d2ab008aa0
commit
a85ac07576
@ -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)
|
||||
|
||||
|
@ -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()
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
|
||||
void clicked()
|
||||
{
|
||||
emit qButton->clicked(qButton->isChecked());
|
||||
Q_EMIT qButton->clicked(qButton->isChecked());
|
||||
}
|
||||
|
||||
~QButtonPrivate() {
|
||||
|
@ -21,9 +21,9 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSString.h>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <QMacCocoaViewContainer>
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QMacCocoaViewContainer>
|
||||
|
||||
static inline NSString* fromQString(const QString &string)
|
||||
{
|
||||
|
@ -28,8 +28,8 @@ THE SOFTWARE.
|
||||
#import "Foundation/NSNotification.h"
|
||||
#import "AppKit/NSSearchField.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QClipboard>
|
||||
|
||||
#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> qSearchField;
|
||||
@ -193,7 +193,7 @@ void QSearchField::clear()
|
||||
return;
|
||||
|
||||
[pimpl->nsSearchField setStringValue:@""];
|
||||
emit textChanged(QString());
|
||||
Q_EMIT textChanged(QString());
|
||||
}
|
||||
|
||||
void QSearchField::selectAll()
|
||||
@ -246,7 +246,7 @@ void QSearchField::changeEvent(QEvent* event)
|
||||
return;
|
||||
|
||||
const bool enabled = isEnabled();
|
||||
[pimpl->nsSearchField setEnabled: enabled]
|
||||
[pimpl->nsSearchField setEnabled: enabled];
|
||||
}
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user