mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
🏁 Fix winsock and autotype error when compiling on Windows
This commit is contained in:
parent
7c4129033a
commit
24a17c05ab
@ -116,6 +116,7 @@ if(MINGW)
|
|||||||
set(CMAKE_RC_COMPILER_INIT windres)
|
set(CMAKE_RC_COMPILER_INIT windres)
|
||||||
enable_language(RC)
|
enable_language(RC)
|
||||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||||
|
link_libraries(ws2_32 wsock32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE OR MINGW)
|
if(APPLE OR MINGW)
|
||||||
@ -201,7 +202,7 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${MHD_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
|
|
||||||
|
@ -13,5 +13,8 @@ if(UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_TESTS)
|
if(WITH_TESTS)
|
||||||
add_subdirectory(test)
|
# autotype non supported on Windows right now
|
||||||
endif()
|
if(UNIX)
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -717,8 +717,8 @@ void MainWindow::repairDatabase()
|
|||||||
KeePass2Writer writer;
|
KeePass2Writer writer;
|
||||||
writer.writeDatabase(saveFileName, dbRepairWidget->database());
|
writer.writeDatabase(saveFileName, dbRepairWidget->database());
|
||||||
if (writer.hasError()) {
|
if (writer.hasError()) {
|
||||||
MessageBox::critical(this, tr("Error"), tr("Writing the database failed.") + "\n\n"
|
QMessageBox::critical(this, tr("Error"),
|
||||||
+ writer.errorString());
|
tr("Writing the database failed.").append("\n\n").append(writer.errorString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QtNetwork/QHostInfo>
|
#include <QtNetwork/QHostInfo>
|
||||||
#include <QtNetwork/QHostAddress>
|
#include <QtNetwork/QHostAddress>
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace KeepassHttpProtocol;
|
using namespace KeepassHttpProtocol;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user