diff --git a/deepin-devicemanager/CMakeLists.txt b/deepin-devicemanager/CMakeLists.txt index da978795..83b36d8c 100644 --- a/deepin-devicemanager/CMakeLists.txt +++ b/deepin-devicemanager/CMakeLists.txt @@ -43,6 +43,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") +if(${QT_VERSION_MAJOR} EQUAL 6) + add_definitions(-DDISABLE_DRIVER) + message(STATUS "DISABLE_DRIVER macro added for Qt6 build") +else() + message(STATUS "DISABLE_DRIVER macro NOT added for Qt5 build") +endif() + option (PERF_ON "Use provided math implementation" ON) if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64") diff --git a/deepin-devicemanager/src/Page/MainWindow.cpp b/deepin-devicemanager/src/Page/MainWindow.cpp index 175b4ff3..a618d7ee 100644 --- a/deepin-devicemanager/src/Page/MainWindow.cpp +++ b/deepin-devicemanager/src/Page/MainWindow.cpp @@ -477,14 +477,12 @@ void MainWindow::initWindowTitle() } }); titlebar()->addWidget(mp_ButtonBox); - // 特殊处理 if (!Common::boardVendorType().isEmpty()) mp_ButtonBox->hide(); + #ifdef DISABLE_DRIVER mp_ButtonBox->hide(); #endif - // Hide hardware info and driver management buttons from title bar - mp_ButtonBox->hide(); } void MainWindow::initWidgets()