mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-04 15:52:46 -08:00
Additional fixes for macOS and modern Qt6
* Replace Q_OS_MAC with Q_OS_MACOS * Remove deleted macro QTEST_DISABLE_KEYPAD_NAVIGATION
This commit is contained in:
1 parent
7f16ea5aa9
commit
7adcf2a001
8 files changed
+10
-13
No files matched your search
@@ -545,7 +545,7 @@ void AutoType::performGlobalAutoType(const QList<QSharedPointer<Database>>& dbLi
|
||||
|
||||
void AutoType::restoreWindowState()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
if (getMainWindow()) {
|
||||
if (m_windowState == WindowState::Minimized) {
|
||||
getMainWindow()->showMinimized();
|
||||
|
||||
@@ -355,7 +355,7 @@ void AutoTypeSelectDialog::buildActionMenu()
|
||||
submitAutoTypeMatch(match);
|
||||
});
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
|
||||
auto typeVirtualAction = new QAction(icons()->icon("auto-type"), tr("Use Virtual Keyboard"), nullptr);
|
||||
m_actionMenu->insertAction(copyUsernameAction, typeVirtualAction);
|
||||
typeVirtualAction->setShortcut(Qt::CTRL | Qt::Key_5);
|
||||
|
||||
@@ -2159,7 +2159,7 @@ void MainWindow::initActionCollection()
|
||||
|
||||
// Prevent conflicts with global Mac shortcuts (force Control on all platforms)
|
||||
// Note: Qt::META means Ctrl on Mac.
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
ac->setDefaultShortcut(m_ui->actionEntryAddToAgent, Qt::META | Qt::Key_H);
|
||||
ac->setDefaultShortcut(m_ui->actionEntryRemoveFromAgent, Qt::META | Qt::SHIFT | Qt::Key_H);
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,7 @@ PasswordWidget::PasswordWidget(QWidget* parent)
|
||||
setEchoMode(QLineEdit::Password);
|
||||
|
||||
// Prevent conflicts with global Mac shortcuts (force Control on all platforms)
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
constexpr auto modifier = Qt::MetaModifier;
|
||||
#else
|
||||
constexpr auto modifier = Qt::ControlModifier;
|
||||
|
||||
@@ -724,7 +724,7 @@ namespace Phantom
|
||||
|
||||
qreal dpiScaled(qreal value)
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
// On mac the DPI is always 72 so we should not scale it
|
||||
return value;
|
||||
#else
|
||||
@@ -4579,7 +4579,7 @@ int BaseStyle::styleHint(StyleHint hint,
|
||||
return 1;
|
||||
case SH_Menu_SupportsSections:
|
||||
return 0;
|
||||
#ifndef Q_OS_MAC
|
||||
#ifndef Q_OS_MACOS
|
||||
case SH_MenuBar_AltKeyNavigation:
|
||||
return 1;
|
||||
#endif
|
||||
@@ -4610,7 +4610,7 @@ int BaseStyle::styleHint(StyleHint hint,
|
||||
case SH_ItemView_ScrollMode:
|
||||
return QAbstractItemView::ScrollPerPixel;
|
||||
case SH_ScrollBar_ContextMenu:
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
@@ -4676,7 +4676,7 @@ int BaseStyle::styleHint(StyleHint hint,
|
||||
return 1;
|
||||
case SH_Menu_SubMenuResetWhenReenteringParent:
|
||||
return 0;
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
case SH_Menu_FlashTriggeredItem:
|
||||
return 1;
|
||||
case SH_Menu_FadeOutOnHide:
|
||||
|
||||
@@ -86,7 +86,6 @@ int main(int argc, char* argv[])
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true);
|
||||
app.applyTheme();
|
||||
QTEST_DISABLE_KEYPAD_NAVIGATION
|
||||
TestGui tc;
|
||||
QTEST_SET_MAIN_SOURCE_PATH
|
||||
return QTest::qExec(&tc, argc, argv);
|
||||
@@ -969,7 +968,7 @@ void TestGui::testPasswordEntryEntropy()
|
||||
QVERIFY(passwordEdit);
|
||||
QTest::mouseClick(passwordEdit, Qt::LeftButton);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QTest::keyClick(passwordEdit, Qt::Key_G, Qt::MetaModifier);
|
||||
#else
|
||||
QTest::keyClick(passwordEdit, Qt::Key_G, Qt::ControlModifier);
|
||||
@@ -1030,7 +1029,7 @@ void TestGui::testDicewareEntryEntropy()
|
||||
QVERIFY(passwordEdit);
|
||||
QTest::mouseClick(passwordEdit, Qt::LeftButton);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QTest::keyClick(passwordEdit, Qt::Key_G, Qt::MetaModifier);
|
||||
#else
|
||||
QTest::keyClick(passwordEdit, Qt::Key_G, Qt::ControlModifier);
|
||||
|
||||
@@ -49,7 +49,6 @@ int main(int argc, char* argv[])
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true);
|
||||
app.applyTheme();
|
||||
QTEST_DISABLE_KEYPAD_NAVIGATION
|
||||
TestGuiBrowser tc;
|
||||
QTEST_SET_MAIN_SOURCE_PATH
|
||||
return QTest::qExec(&tc, argc, argv);
|
||||
|
||||
@@ -56,7 +56,6 @@ int main(int argc, char* argv[])
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true);
|
||||
app.applyTheme();
|
||||
QTEST_DISABLE_KEYPAD_NAVIGATION
|
||||
TestGuiFdoSecrets tc;
|
||||
QTEST_SET_MAIN_SOURCE_PATH
|
||||
return QTest::qExec(&tc, argc, argv);
|
||||
|
||||
Reference in new issue
Block a user