mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 11:08:05 -04:00
Rename x11 auto-type plugin to xcb.
This matches what QGuiApplication::platformName() returns.
This commit is contained in:
parent
20b13a4a2e
commit
ba1ca4ec08
9 changed files with 12 additions and 33 deletions
|
@ -49,7 +49,7 @@ AutoType::AutoType(QObject* parent, bool test)
|
||||||
|
|
||||||
QString pluginName = "keepassx-autotype-";
|
QString pluginName = "keepassx-autotype-";
|
||||||
if (!test) {
|
if (!test) {
|
||||||
pluginName += Tools::platform();
|
pluginName += QApplication::platformName();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pluginName += "test";
|
pluginName += "test";
|
||||||
|
|
|
@ -6,7 +6,7 @@ if(UNIX AND NOT APPLE)
|
||||||
add_feature_info(Qt5X11Extras Qt5X11Extras_FOUND "The Qt5X11Extras library is required for auto-type")
|
add_feature_info(Qt5X11Extras Qt5X11Extras_FOUND "The Qt5X11Extras library is required for auto-type")
|
||||||
|
|
||||||
if(X11_FOUND AND X11_XTest_FOUND AND Qt5X11Extras_FOUND)
|
if(X11_FOUND AND X11_XTest_FOUND AND Qt5X11Extras_FOUND)
|
||||||
add_subdirectory(x11)
|
add_subdirectory(xcb)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "AutoTypeX11.h"
|
#include "AutoTypeXCB.h"
|
||||||
#include "KeySymMap.h"
|
#include "KeySymMap.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef KEEPASSX_AUTOTYPEX11_H
|
#ifndef KEEPASSX_AUTOTYPEXCB_H
|
||||||
#define KEEPASSX_AUTOTYPEX11_H
|
#define KEEPASSX_AUTOTYPEXCB_H
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
@ -128,4 +128,4 @@ private:
|
||||||
AutoTypePlatformX11* const m_platform;
|
AutoTypePlatformX11* const m_platform;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KEEPASSX_AUTOTYPEX11_H
|
#endif // KEEPASSX_AUTOTYPEXCB_H
|
|
@ -1,11 +1,11 @@
|
||||||
include_directories(SYSTEM ${X11_X11_INCLUDE_PATH})
|
include_directories(SYSTEM ${X11_X11_INCLUDE_PATH})
|
||||||
|
|
||||||
set(autotype_X11_SOURCES
|
set(autotype_XCB_SOURCES
|
||||||
AutoTypeX11.cpp
|
AutoTypeXCB.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(keepassx-autotype-x11 MODULE ${autotype_X11_SOURCES})
|
add_library(keepassx-autotype-xcb MODULE ${autotype_XCB_SOURCES})
|
||||||
target_link_libraries(keepassx-autotype-x11 Qt5::Core Qt5::Widgets Qt5::X11Extras ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_XTest_LIB})
|
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-x11
|
install(TARGETS keepassx-autotype-xcb
|
||||||
BUNDLE DESTINATION . COMPONENT Runtime
|
BUNDLE DESTINATION . COMPONENT Runtime
|
||||||
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
|
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "Tools.h"
|
#include "Tools.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QCoreApplication>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
@ -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()
|
void disableCoreDumps()
|
||||||
{
|
{
|
||||||
// default to true
|
// default to true
|
||||||
|
|
|
@ -36,7 +36,6 @@ QString imageReaderFilter();
|
||||||
bool isHex(const QByteArray& ba);
|
bool isHex(const QByteArray& ba);
|
||||||
void sleep(int ms);
|
void sleep(int ms);
|
||||||
void wait(int ms);
|
void wait(int ms);
|
||||||
QString platform();
|
|
||||||
void disableCoreDumps();
|
void disableCoreDumps();
|
||||||
|
|
||||||
} // namespace Tools
|
} // namespace Tools
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue