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)
|
if(UNIX AND NOT APPLE)
|
||||||
target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY})
|
target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
if(APPLE)
|
||||||
|
set_target_properties(${PROGNAME} PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||||
|
|
||||||
|
@ -45,6 +45,6 @@ endif()
|
|||||||
|
|
||||||
add_library (Qocoa STATIC ${SOURCES} ${MOC_SOURCES} ${HEADERS} ${RESOURCES_SOURCES})
|
add_library (Qocoa STATIC ${SOURCES} ${MOC_SOURCES} ${HEADERS} ${RESOURCES_SOURCES})
|
||||||
|
|
||||||
if(APPLE)
|
#if(APPLE)
|
||||||
set_target_properties(Qocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit")
|
# set_target_properties(Qocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit")
|
||||||
endif()
|
#endif()
|
||||||
|
@ -137,7 +137,7 @@ public:
|
|||||||
|
|
||||||
void clicked()
|
void clicked()
|
||||||
{
|
{
|
||||||
emit qButton->clicked(qButton->isChecked());
|
Q_EMIT qButton->clicked(qButton->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
~QButtonPrivate() {
|
~QButtonPrivate() {
|
||||||
|
@ -21,9 +21,9 @@ THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <QString>
|
#include <QtCore/QString>
|
||||||
#include <QVBoxLayout>
|
#include <QtGui/QVBoxLayout>
|
||||||
#include <QMacCocoaViewContainer>
|
#include <QtGui/QMacCocoaViewContainer>
|
||||||
|
|
||||||
static inline NSString* fromQString(const QString &string)
|
static inline NSString* fromQString(const QString &string)
|
||||||
{
|
{
|
||||||
|
@ -28,8 +28,8 @@ THE SOFTWARE.
|
|||||||
#import "Foundation/NSNotification.h"
|
#import "Foundation/NSNotification.h"
|
||||||
#import "AppKit/NSSearchField.h"
|
#import "AppKit/NSSearchField.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
|
||||||
#define KEYCODE_A 0
|
#define KEYCODE_A 0
|
||||||
#define KEYCODE_X 7
|
#define KEYCODE_X 7
|
||||||
@ -45,19 +45,19 @@ public:
|
|||||||
void textDidChange(const QString &text)
|
void textDidChange(const QString &text)
|
||||||
{
|
{
|
||||||
if (qSearchField)
|
if (qSearchField)
|
||||||
emit qSearchField->textChanged(text);
|
Q_EMIT qSearchField->textChanged(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void textDidEndEditing()
|
void textDidEndEditing()
|
||||||
{
|
{
|
||||||
if (qSearchField)
|
if (qSearchField)
|
||||||
emit qSearchField->editingFinished();
|
Q_EMIT qSearchField->editingFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void returnPressed()
|
void returnPressed()
|
||||||
{
|
{
|
||||||
if (qSearchField)
|
if (qSearchField)
|
||||||
emit qSearchField->returnPressed();
|
Q_EMIT qSearchField->returnPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointer<QSearchField> qSearchField;
|
QPointer<QSearchField> qSearchField;
|
||||||
@ -193,7 +193,7 @@ void QSearchField::clear()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
[pimpl->nsSearchField setStringValue:@""];
|
[pimpl->nsSearchField setStringValue:@""];
|
||||||
emit textChanged(QString());
|
Q_EMIT textChanged(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSearchField::selectAll()
|
void QSearchField::selectAll()
|
||||||
@ -246,9 +246,9 @@ void QSearchField::changeEvent(QEvent* event)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const bool enabled = isEnabled();
|
const bool enabled = isEnabled();
|
||||||
[pimpl->nsSearchField setEnabled: enabled]
|
[pimpl->nsSearchField setEnabled: enabled];
|
||||||
}
|
}
|
||||||
QWidget::changeEvent(event);
|
QWidget::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSearchField::resizeEvent(QResizeEvent *resizeEvent)
|
void QSearchField::resizeEvent(QResizeEvent *resizeEvent)
|
||||||
|
Loading…
Reference in New Issue
Block a user