Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16.0)

# Version setup
set(OPENBSDISKS_VERSION_MAJOR "0")
set(OPENBSDISKS_VERSION_MINOR "4")
set(OPENBSDISKS_VERSION_MINOR "5")
set(OPENBSDISKS_VERSION_PATCH "0")
set(OPENBSDISKS_VERSION "${OPENBSDISKS_VERSION_MAJOR}.${OPENBSDISKS_VERSION_MINOR}.${OPENBSDISKS_VERSION_PATCH}")

Expand All @@ -17,6 +17,8 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()

set(QT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6")

include(GNUInstallDirs)

option(INSTALL_POLKIT_RULES "Install polkit rules" OFF)
Expand All @@ -25,8 +27,7 @@ option(INSTALL_MAN_PAGES "Install man pages" ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

set(QT5COMPONENTS Core DBus)
find_package(Qt5 COMPONENTS ${QT5COMPONENTS} REQUIRED)
find_package(Qt${QT_MAJOR_VERSION} COMPONENTS Core DBus REQUIRED)
find_package(Threads REQUIRED)

set(SOURCE
Expand All @@ -46,7 +47,7 @@ set(SOURCE
)
add_executable(openbsdisks2 ${SOURCE})

target_link_libraries(openbsdisks2 Qt5::DBus Qt5::Core util)
target_link_libraries(openbsdisks2 Qt${QT_MAJOR_VERSION}::DBus Qt${QT_MAJOR_VERSION}::Core util)

target_compile_features(openbsdisks2 PRIVATE cxx_std_17)
target_compile_options(openbsdisks2 PRIVATE "-Wall")
Expand Down
1 change: 0 additions & 1 deletion src/adaptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
class QString;
class QStringList;
class QVariant;

#include <QVariantMap>
Expand Down
2 changes: 1 addition & 1 deletion src/disk_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void DiskLabel::analyseDev(const QString& dev)
for (int i = 0; i < lab.d_npartitions; i++) {
pp = &lab.d_partitions[i];
if (DL_GETPSIZE(pp) > 0) {
QString p('a' + i);
const QString p = QChar('a' + i);
if (p != QStringLiteral("c")) {
if (isValidFileSysetem(pp->p_fstype)) {
auto block = createBlock(
Expand Down
2 changes: 1 addition & 1 deletion src/manageradaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;

class QString;
class QStringList;
class QVariant;

typedef QMap<QString, QVariantMap> QVariantMapMap;
Expand Down