diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp
index ce68ae47..92349dc5 100644
--- a/src/autotype/AutoType.cpp
+++ b/src/autotype/AutoType.cpp
@@ -49,7 +49,7 @@ AutoType::AutoType(QObject* parent, bool test)
QString pluginName = "keepassx-autotype-";
if (!test) {
- pluginName += Tools::platform();
+ pluginName += QApplication::platformName();
}
else {
pluginName += "test";
diff --git a/src/autotype/CMakeLists.txt b/src/autotype/CMakeLists.txt
index 044bf90b..a129961e 100644
--- a/src/autotype/CMakeLists.txt
+++ b/src/autotype/CMakeLists.txt
@@ -6,7 +6,7 @@ if(UNIX AND NOT APPLE)
add_feature_info(Qt5X11Extras Qt5X11Extras_FOUND "The Qt5X11Extras library is required for auto-type")
if(X11_FOUND AND X11_XTest_FOUND AND Qt5X11Extras_FOUND)
- add_subdirectory(x11)
+ add_subdirectory(xcb)
endif()
endif()
diff --git a/src/autotype/x11/AutoTypeX11.cpp b/src/autotype/xcb/AutoTypeXCB.cpp
similarity index 99%
rename from src/autotype/x11/AutoTypeX11.cpp
rename to src/autotype/xcb/AutoTypeXCB.cpp
index 71316e77..22bd81f9 100644
--- a/src/autotype/x11/AutoTypeX11.cpp
+++ b/src/autotype/xcb/AutoTypeXCB.cpp
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "AutoTypeX11.h"
+#include "AutoTypeXCB.h"
#include "KeySymMap.h"
#include
diff --git a/src/autotype/x11/AutoTypeX11.h b/src/autotype/xcb/AutoTypeXCB.h
similarity index 97%
rename from src/autotype/x11/AutoTypeX11.h
rename to src/autotype/xcb/AutoTypeXCB.h
index 424749c1..973c40a5 100644
--- a/src/autotype/x11/AutoTypeX11.h
+++ b/src/autotype/xcb/AutoTypeXCB.h
@@ -16,8 +16,8 @@
* along with this program. If not, see .
*/
-#ifndef KEEPASSX_AUTOTYPEX11_H
-#define KEEPASSX_AUTOTYPEX11_H
+#ifndef KEEPASSX_AUTOTYPEXCB_H
+#define KEEPASSX_AUTOTYPEXCB_H
#include
#include
@@ -128,4 +128,4 @@ private:
AutoTypePlatformX11* const m_platform;
};
-#endif // KEEPASSX_AUTOTYPEX11_H
+#endif // KEEPASSX_AUTOTYPEXCB_H
diff --git a/src/autotype/x11/CMakeLists.txt b/src/autotype/xcb/CMakeLists.txt
similarity index 53%
rename from src/autotype/x11/CMakeLists.txt
rename to src/autotype/xcb/CMakeLists.txt
index cff19167..3b56b311 100644
--- a/src/autotype/x11/CMakeLists.txt
+++ b/src/autotype/xcb/CMakeLists.txt
@@ -1,11 +1,11 @@
include_directories(SYSTEM ${X11_X11_INCLUDE_PATH})
-set(autotype_X11_SOURCES
- AutoTypeX11.cpp
+set(autotype_XCB_SOURCES
+ AutoTypeXCB.cpp
)
-add_library(keepassx-autotype-x11 MODULE ${autotype_X11_SOURCES})
-target_link_libraries(keepassx-autotype-x11 Qt5::Core Qt5::Widgets Qt5::X11Extras ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_XTest_LIB})
-install(TARGETS keepassx-autotype-x11
+add_library(keepassx-autotype-xcb MODULE ${autotype_XCB_SOURCES})
+target_link_libraries(keepassx-autotype-xcb Qt5::Core Qt5::Widgets Qt5::X11Extras ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_XTest_LIB})
+install(TARGETS keepassx-autotype-xcb
BUNDLE DESTINATION . COMPONENT Runtime
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
diff --git a/src/autotype/x11/KeySymMap.h b/src/autotype/xcb/KeySymMap.h
similarity index 100%
rename from src/autotype/x11/KeySymMap.h
rename to src/autotype/xcb/KeySymMap.h
diff --git a/src/autotype/x11/keysymmap.py b/src/autotype/xcb/keysymmap.py
similarity index 100%
rename from src/autotype/x11/keysymmap.py
rename to src/autotype/xcb/keysymmap.py
diff --git a/src/core/Tools.cpp b/src/core/Tools.cpp
index 3d5ee997..009d226c 100644
--- a/src/core/Tools.cpp
+++ b/src/core/Tools.cpp
@@ -17,7 +17,7 @@
#include "Tools.h"
-#include
+#include
#include
#include
#include
@@ -192,26 +192,6 @@ void wait(int ms)
}
}
-QString platform()
-{
- // TODO: move callers to QApplication::platformName()
-
- QString platform = QApplication::platformName();
-
- if (platform == "xcb") {
- return "x11";
- }
- else if (platform == "cocoa") {
- return "mac";
- }
- else if (platform == "windows") {
- return "win";
- }
- else {
- return platform;
- }
-}
-
void disableCoreDumps()
{
// default to true
diff --git a/src/core/Tools.h b/src/core/Tools.h
index 51d6e5ad..07341da0 100644
--- a/src/core/Tools.h
+++ b/src/core/Tools.h
@@ -36,7 +36,6 @@ QString imageReaderFilter();
bool isHex(const QByteArray& ba);
void sleep(int ms);
void wait(int ms);
-QString platform();
void disableCoreDumps();
} // namespace Tools