diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 8f9565fb5..1cd0a40a3 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -22,12 +22,12 @@ #include "ServerConfigDialog.h" #include "common/constants.h" #include "dialogs/AboutDialog.h" +#include "dialogs/SettingsDialog.h" #include "gui/Logger.h" #include "gui/config/ConfigScopes.h" #include "gui/constants.h" #include "gui/core/CoreProcess.h" #include "gui/diagnostic.h" -#include "gui/dialogs/SettingsDialog.h" #include "gui/messages.h" #include "gui/string_utils.h" #include "gui/styles.h" diff --git a/src/lib/gui/dialogs/SettingsDialog.cpp b/src/gui/src/dialogs/SettingsDialog.cpp similarity index 100% rename from src/lib/gui/dialogs/SettingsDialog.cpp rename to src/gui/src/dialogs/SettingsDialog.cpp diff --git a/src/lib/gui/dialogs/SettingsDialog.h b/src/gui/src/dialogs/SettingsDialog.h similarity index 100% rename from src/lib/gui/dialogs/SettingsDialog.h rename to src/gui/src/dialogs/SettingsDialog.h diff --git a/src/lib/gui/dialogs/SettingsDialogBase.ui b/src/gui/src/dialogs/SettingsDialogBase.ui similarity index 100% rename from src/lib/gui/dialogs/SettingsDialogBase.ui rename to src/gui/src/dialogs/SettingsDialogBase.ui diff --git a/src/lib/gui/CMakeLists.txt b/src/lib/gui/CMakeLists.txt index 91fe15d8d..d30ce9f81 100644 --- a/src/lib/gui/CMakeLists.txt +++ b/src/lib/gui/CMakeLists.txt @@ -25,7 +25,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) file(GLOB_RECURSE sources *.cpp) file(GLOB_RECURSE headers *.h) -file(GLOB_RECURSE ui_files *.ui) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") file(GLOB mac_sources *.mm) @@ -39,7 +38,7 @@ endif() # generated includes include_directories(${PROJECT_BINARY_DIR}/config) -add_library(${target} STATIC ${sources} ${ui_files} ${qrc_file}) +add_library(${target} STATIC ${sources} ${qrc_file}) target_link_libraries( ${target} diff --git a/src/test/unittests/gui/dialogs/SettingsDialogTests.cpp b/src/test/unittests/gui/dialogs/SettingsDialogTests.cpp deleted file mode 100644 index b87bd2277..000000000 --- a/src/test/unittests/gui/dialogs/SettingsDialogTests.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * Copyright (C) 2024 Symless Ltd. - * - * This package is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * found in the file LICENSE that should have accompanied this file. - * - * This package is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// `TestQtFullApp` freezes on Windows CI, so exclude this test for now. -#ifndef WIN32 - -#include "gui/core/CoreProcess.h" -#include "gui/dialogs/SettingsDialog.h" -#include "shared/gui/TestQtFullApp.h" -#include "shared/gui/mocks/AppConfigMock.h" -#include "shared/gui/mocks/ServerConfigMock.h" - -#include - -using namespace testing; -using namespace deskflow::gui; - -TEST(SettingsDialogTests, ctor_getsScreenName) -{ - TestQtFullApp app; - NiceMock appConfig; - NiceMock serverConfig; - auto cpDeps = std::make_shared(); - CoreProcess coreProcess(appConfig, serverConfig, cpDeps); - - EXPECT_CALL(appConfig, screenName()).Times(1); - - SettingsDialog settingsDialog(nullptr, appConfig, serverConfig, coreProcess); -} - -#endif