Initial support for Qt 6
This commit is contained in:
parent
453fd8cdb5
commit
77ecb98f47
2 changed files with 4 additions and 5 deletions
|
@ -8,11 +8,10 @@ set(CMAKE_AUTOUIC ON)
|
|||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
# Find the QtWidgets library
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
find_package(Qt5PrintSupport CONFIG REQUIRED)
|
||||
find_package(Qt6 COMPONENTS Widgets Network PrintSupport CONFIG REQUIRED)
|
||||
|
||||
# For SingleApplication:
|
||||
find_package(Qt5Network CONFIG REQUIRED)
|
||||
#find_package(Qt5Network CONFIG REQUIRED)
|
||||
set(QAPPLICATION_CLASS QApplication)
|
||||
add_compile_definitions(QAPPLICATION_CLASS=${QAPPLICATION_CLASS})
|
||||
|
||||
|
@ -40,7 +39,7 @@ set(GUI_SOURCES
|
|||
add_executable(kima2 ${GUI_SOURCES} kima2.rc)
|
||||
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
|
||||
target_include_directories(kima2 PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/singleapplication/singleapplication.git)
|
||||
target_link_libraries(kima2 core printer Qt5::Widgets Qt5::PrintSupport Qt5::Network stdc++fs)
|
||||
target_link_libraries(kima2 core printer Qt::Core Qt::PrintSupport Qt::Network stdc++fs)
|
||||
if(WIN32)
|
||||
set_target_properties(kima2 PROPERTIES LINK_FLAGS "-mwindows")
|
||||
endif(WIN32)
|
||||
|
|
|
@ -96,7 +96,7 @@ MainWindow::MainWindow()
|
|||
connect(ui_.aboutQtAction, &QAction::triggered, this, &MainWindow::onAboutQt);
|
||||
connect(ui_.aboutAction, &QAction::triggered, this, &MainWindow::onAbout);
|
||||
connect(ui_.openManualAction, &QAction::triggered, this, []() {
|
||||
auto locations = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
|
||||
auto locations = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
|
||||
for (auto location : locations) {
|
||||
if (QFile::exists(location + QString("/Benutzerhandbuch.pdf"))) {
|
||||
QDesktopServices::openUrl(
|
||||
|
|
Loading…
Reference in a new issue