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:
Jonathan White authored and Janek Bevendorff committed 2026-10-21 10:43:26 +02:00
1 parent 7f16ea5aa9
commit 7adcf2a001
8 files changed
+10 -13

No files matched your search

+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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:
+2 -3
View File
@@ -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);
-1
View File
@@ -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);
-1
View File
@@ -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);