From 5a3bddcec96959880d79de7bbcb05133efb3a10b Mon Sep 17 00:00:00 2001 From: Jeroen van Veldhuizen Date: Mon, 5 Apr 2021 15:00:14 +0200 Subject: [PATCH 1/5] fixed IOS gui issues - no multiple window support - storyboard is for splash screen, not main window - set client flag in main.cpp --- ios/Info.plist | 8 ++++---- src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/Info.plist b/ios/Info.plist index 728733ef44..dfc2d2937c 100644 --- a/ios/Info.plist +++ b/ios/Info.plist @@ -2,8 +2,6 @@ - NSMicrophoneUsageDescription - We need access to your microphone to let others hear you. CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -22,16 +20,18 @@ 1 LSRequiresIPhoneOS + NSMicrophoneUsageDescription + We need access to your microphone to let others hear you. UIApplicationSceneManifest UIApplicationSupportsMultipleScenes - + UIApplicationSupportsIndirectInputEvents UILaunchScreen - UIMainStoryboardFile + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities diff --git a/src/main.cpp b/src/main.cpp index 5484a63b85..5a8c9c9d08 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -632,7 +632,7 @@ int main ( int argc, char** argv ) QCoreApplication* pApp = new QCoreApplication ( argc, argv ); #else # if defined ( Q_OS_IOS ) - bIsClient = false; + bIsClient = true; bUseGUI = true; // bUseMultithreading = true; From 9cb1dcaa5eff6d958681df3ef91a796d942ddbab Mon Sep 17 00:00:00 2001 From: Jeroen van Veldhuizen Date: Mon, 5 Apr 2021 15:01:08 +0200 Subject: [PATCH 2/5] add close menu item for secondary windows make sure client settings and chat dialog can be closed in IOS --- src/chatdlg.cpp | 4 ++++ src/clientsettingsdlg.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index da8516779f..0bf8ff3b52 100755 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -67,6 +67,10 @@ CChatDlg::CChatDlg ( QWidget* parent ) : SLOT ( OnClearChatHistory() ), QKeySequence ( Qt::CTRL + Qt::Key_E ) ); pMenu->addMenu ( pEditMenu ); +#if defined ( Q_OS_IOS ) + QAction *action = pMenu->addAction (tr ( "&Close" )); + connect(action, SIGNAL(triggered()), this, SLOT(close())); +#endif // Now tell the layout about the menu layout()->setMenuBar ( pMenu ); diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 87638faa0e..bc9f8a94b7 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -35,6 +35,16 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, { setupUi ( this ); +#if defined ( Q_OS_IOS ) + // IOS needs menu to close + QMenuBar* pMenu = new QMenuBar ( this ); + QAction *action = pMenu->addAction (tr ( "&Close" )); + connect(action, SIGNAL(triggered()), this, SLOT(close())); + + // Now tell the layout about the menu + layout()->setMenuBar ( pMenu ); +#endif + // Add help text to controls ----------------------------------------------- // jitter buffer From 1a98771632c8166c543200ed878fb42d54ab877e Mon Sep 17 00:00:00 2001 From: Jeroen van Veldhuizen Date: Mon, 5 Apr 2021 23:26:35 +0200 Subject: [PATCH 3/5] linting fixes --- src/chatdlg.cpp | 4 ++-- src/clientsettingsdlg.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index 0bf8ff3b52..62dcfa74f2 100755 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -68,8 +68,8 @@ CChatDlg::CChatDlg ( QWidget* parent ) : pMenu->addMenu ( pEditMenu ); #if defined ( Q_OS_IOS ) - QAction *action = pMenu->addAction (tr ( "&Close" )); - connect(action, SIGNAL(triggered()), this, SLOT(close())); + QAction *action = pMenu->addAction ( tr ( "&Close" ) ); + connect ( action, SIGNAL( triggered() ), this, SLOT ( close() ) ); #endif // Now tell the layout about the menu diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index bc9f8a94b7..4c303b782c 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -38,8 +38,8 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, #if defined ( Q_OS_IOS ) // IOS needs menu to close QMenuBar* pMenu = new QMenuBar ( this ); - QAction *action = pMenu->addAction (tr ( "&Close" )); - connect(action, SIGNAL(triggered()), this, SLOT(close())); + QAction *action = pMenu->addAction ( tr ( "&Close" ) ); + connect ( action, SIGNAL ( triggered() ), this, SLOT ( close() ) ); // Now tell the layout about the menu layout()->setMenuBar ( pMenu ); From 1a0181ef5b35a1f9e06148c217fd67c59fb62014 Mon Sep 17 00:00:00 2001 From: Jeroen van Veldhuizen Date: Tue, 6 Apr 2021 20:12:53 +0200 Subject: [PATCH 4/5] removed obsolete client flag --- src/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 5a8c9c9d08..07463ee1a4 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -632,7 +632,6 @@ int main ( int argc, char** argv ) QCoreApplication* pApp = new QCoreApplication ( argc, argv ); #else # if defined ( Q_OS_IOS ) - bIsClient = true; bUseGUI = true; // bUseMultithreading = true; From 0011d8494f6782c0d5f8503112425084204c02be Mon Sep 17 00:00:00 2001 From: Jeroen van Veldhuizen Date: Sat, 10 Apr 2021 12:43:37 +0200 Subject: [PATCH 5/5] Update src/clientsettingsdlg.cpp spacing issue Co-authored-by: ann0see <20726856+ann0see@users.noreply.github.com> --- src/clientsettingsdlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 4c303b782c..94ce45be9e 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -37,7 +37,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, #if defined ( Q_OS_IOS ) // IOS needs menu to close - QMenuBar* pMenu = new QMenuBar ( this ); + QMenuBar* pMenu = new QMenuBar ( this ); QAction *action = pMenu->addAction ( tr ( "&Close" ) ); connect ( action, SIGNAL ( triggered() ), this, SLOT ( close() ) );