mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix autotype test (build) failures on Mac OS and Windows.
We need to tell Windows what symbols the main program exports and the autotype plugin imports. On both systems the linker needs the path of the main program that loads the plugin.
This commit is contained in:
parent
98e59215b8
commit
5550d7af0d
@ -198,6 +198,7 @@ qt4_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
||||
qt4_wrap_cpp(keepassx_SOURCES ${keepassx_MOC})
|
||||
|
||||
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
||||
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
||||
|
||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
||||
target_link_libraries(${PROGNAME}
|
||||
@ -211,6 +212,8 @@ if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY})
|
||||
endif()
|
||||
|
||||
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||
|
||||
if(APPLE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
set_target_properties(${PROGNAME} PROPERTIES
|
||||
|
@ -21,9 +21,11 @@
|
||||
#include <QtCore/QChar>
|
||||
#include <QtCore/Qt>
|
||||
|
||||
#include "core/Global.h"
|
||||
|
||||
class AutoTypeExecutor;
|
||||
|
||||
class AutoTypeAction
|
||||
class KEEPASSX_EXPORT AutoTypeAction
|
||||
{
|
||||
public:
|
||||
virtual ~AutoTypeAction() {}
|
||||
@ -31,7 +33,7 @@ public:
|
||||
virtual void accept(AutoTypeExecutor* executor) = 0;
|
||||
};
|
||||
|
||||
class AutoTypeChar : public AutoTypeAction
|
||||
class KEEPASSX_EXPORT AutoTypeChar : public AutoTypeAction
|
||||
{
|
||||
public:
|
||||
explicit AutoTypeChar(const QChar& character);
|
||||
@ -41,7 +43,7 @@ public:
|
||||
const QChar character;
|
||||
};
|
||||
|
||||
class AutoTypeKey : public AutoTypeAction
|
||||
class KEEPASSX_EXPORT AutoTypeKey : public AutoTypeAction
|
||||
{
|
||||
public:
|
||||
explicit AutoTypeKey(Qt::Key key);
|
||||
@ -51,7 +53,7 @@ public:
|
||||
const Qt::Key key;
|
||||
};
|
||||
|
||||
class AutoTypeDelay : public AutoTypeAction
|
||||
class KEEPASSX_EXPORT AutoTypeDelay : public AutoTypeAction
|
||||
{
|
||||
public:
|
||||
explicit AutoTypeDelay(int delayMs);
|
||||
@ -61,7 +63,7 @@ public:
|
||||
const int delayMs;
|
||||
};
|
||||
|
||||
class AutoTypeClearField : public AutoTypeAction
|
||||
class KEEPASSX_EXPORT AutoTypeClearField : public AutoTypeAction
|
||||
{
|
||||
public:
|
||||
explicit AutoTypeClearField();
|
||||
@ -69,7 +71,7 @@ public:
|
||||
void accept(AutoTypeExecutor* executor);
|
||||
};
|
||||
|
||||
class AutoTypeExecutor
|
||||
class KEEPASSX_EXPORT AutoTypeExecutor
|
||||
{
|
||||
public:
|
||||
virtual ~AutoTypeExecutor() {}
|
||||
|
@ -9,4 +9,4 @@ set(autotype_test_MOC
|
||||
qt4_wrap_cpp(autotype_test_SOURCES ${autotype_test_MOC})
|
||||
|
||||
add_library(keepassx-autotype-test MODULE ${autotype_test_SOURCES})
|
||||
target_link_libraries(keepassx-autotype-test ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||
target_link_libraries(keepassx-autotype-test testautotype ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||
|
@ -118,4 +118,14 @@ template <> class QStaticAssertFailure<true> {};
|
||||
#endif // COMPILER_STATIC_ASSERT
|
||||
#endif // !defined(Q_STATIC_ASSERT) && !defined(Q_STATIC_ASSERT_X)
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
# if defined(KEEPASSX_BUILDING_CORE)
|
||||
# define KEEPASSX_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define KEEPASSX_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define KEEPASSX_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // KEEPASSX_GLOBAL_H
|
||||
|
@ -154,6 +154,7 @@ add_unit_test(NAME testwildcardmatcher SOURCES TestWildcardMatcher.cpp MOCS Test
|
||||
|
||||
add_unit_test(NAME testautotype SOURCES TestAutoType.cpp MOCS TestAutoType.h
|
||||
LIBS ${TEST_LIBRARIES})
|
||||
set_target_properties(testautotype PROPERTIES ENABLE_EXPORTS ON)
|
||||
|
||||
add_unit_test(NAME testentry SOURCES TestEntry.cpp MOCS TestEntry.h
|
||||
LIBS ${TEST_LIBRARIES})
|
||||
|
Loading…
Reference in New Issue
Block a user